responsive settings
This commit is contained in:
parent
9dd005ce5a
commit
016ef337df
|
@ -3629,9 +3629,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
* @see baseModule::get_configOptions()
|
* @see baseModule::get_configOptions()
|
||||||
*/
|
*/
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
$return = parent::get_configOptions($scopes, $allScopes);
|
$configContainer = new htmlResponsiveRow();
|
||||||
// configuration settings
|
|
||||||
$configContainer = new htmlTable();
|
|
||||||
if (isset($_SESSION['conf_config'])) {
|
if (isset($_SESSION['conf_config'])) {
|
||||||
// add password hash type if posixAccount is inactive
|
// add password hash type if posixAccount is inactive
|
||||||
$unixModuleFound = false;
|
$unixModuleFound = false;
|
||||||
|
@ -3646,87 +3644,57 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
if (!$unixModuleFound) {
|
if (!$unixModuleFound) {
|
||||||
$optionsSelected = array('SSHA');
|
$optionsSelected = array('SSHA');
|
||||||
$hashOption = new htmlTable();
|
$hashOption = new htmlResponsiveSelect('posixAccount_pwdHash', getSupportedHashTypes(), $optionsSelected, _("Password hash type"), 'pwdHash');
|
||||||
$hashOption->addElement(new htmlTableExtendedSelect('posixAccount_pwdHash', getSupportedHashTypes(), $optionsSelected, _("Password hash type"), 'pwdHash'));
|
$configContainer->add($hashOption, 12);
|
||||||
$configContainer->addElement($hashOption, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$configContainerHead = new htmlTable();
|
$configContainerHead = new htmlGroup();
|
||||||
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$configContainerOptions = new htmlTable();
|
$configContainer->add($configContainerHead, 12);
|
||||||
$configContainer->addElement($configContainerHead, true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideDescription', false, _('Description'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideDescription', false, _('Description'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideStreet', false, _('Street'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePostOfficeBox', false, _('Post office box'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideStreet', false, _('Street'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePostalCode', false, _('Postal code'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideLocation', false, _('Location'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePostOfficeBox', false, _('Post office box'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideState', false, _('State'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePostalAddress', false, _('Postal address'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePostalCode', false, _('Postal code'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideRegisteredAddress', false, _('Registered address'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideOfficeName', false, _('Office name'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideLocation', false, _('Location'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideRoomNumber', false, _('Room number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addNewLine();
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideTelephoneNumber', false, _('Telephone number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideState', false, _('State'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideHomeTelephoneNumber', false, _('Home telephone number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideMobileNumber', false, _('Mobile number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePostalAddress', false, _('Postal address'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideFaxNumber', false, _('Fax number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePager', true, _('Pager'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideRegisteredAddress', false, _('Registered address'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideEMailAddress', false, _('Email address'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideJobTitle', false, _('Job title'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideOfficeName', false, _('Office name'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideCarLicense', false, _('Car license'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideEmployeeType', false, _('Employee type'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideRoomNumber', false, _('Room number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideBusinessCategory', false, _('Business category'), null, true), 12, 4);
|
||||||
$configContainerOptions->addNewLine();
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideDepartments', false, _('Department'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideTelephoneNumber', false, _('Telephone number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideManager', false, _('Manager'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideOu', false, _('Organisational unit'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideHomeTelephoneNumber', false, _('Home telephone number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideO', false, _('Organisation'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideEmployeeNumber', false, _('Employee number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideMobileNumber', false, _('Mobile number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideInitials', false, _('Initials'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideLabeledURI', false, _('Web site'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideFaxNumber', false, _('Fax number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideuserCertificate', false, _('User certificates'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidejpegPhoto', false, _('Photo'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePager', true, _('Pager'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideEMailAddress', false, _('Email address'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideJobTitle', false, _('Job title'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideCarLicense', false, _('Car license'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideEmployeeType', false, _('Employee type'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideBusinessCategory', false, _('Business category'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideDepartments', false, _('Department'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideManager', false, _('Manager'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideOu', false, _('Organisational unit'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideO', false, _('Organisation'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideEmployeeNumber', false, _('Employee number'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideInitials', false, _('Initials'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideLabeledURI', false, _('Web site'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideuserCertificate', false, _('User certificates'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidejpegPhoto', false, _('Photo'), null, false));
|
|
||||||
if (isset($_SESSION['conf_config'])) {
|
if (isset($_SESSION['conf_config'])) {
|
||||||
$confActiveUnixUserModules = $_SESSION['conf_config']->get_AccountModules('user');
|
$confActiveUnixUserModules = $_SESSION['conf_config']->get_AccountModules('user');
|
||||||
// option to hide uid
|
// option to hide uid
|
||||||
if (!in_array('posixAccount', $confActiveUnixUserModules)) {
|
if (!in_array('posixAccount', $confActiveUnixUserModules)) {
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideUID', false, _('User name'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideUID', false, _('User name'), null, false));
|
}
|
||||||
|
else {
|
||||||
|
$configContainer->add(new htmlOutputText(''), 0, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
$configContainer->addVerticalSpacer('1rem');
|
||||||
$advancedOptions = new htmlTable();
|
$advancedOptions = new htmlResponsiveRow();
|
||||||
$addressbookTable = new htmlTable();
|
$advancedOptions->add(new htmlResponsiveInputCheckbox('inetOrgPerson_addAddressbook', false, _('Add addressbook (ou=addressbook)'), 'addAddressbook'), 12);
|
||||||
$addressbookTable->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_addAddressbook', false, _('Add addressbook (ou=addressbook)'), 'addAddressbook'));
|
$advancedOptions->add(new htmlSubTitle(_('Read-only fields')), 12);
|
||||||
$advancedOptions->addElement($addressbookTable, true);
|
|
||||||
$advancedOptions->addElement(new htmlSubTitle(_('Read-only fields')), true);
|
|
||||||
$readOnlyOptions = array(
|
$readOnlyOptions = array(
|
||||||
_('Description') => 'inetOrgPerson_readOnly_description', _('Street') => 'inetOrgPerson_readOnly_street',
|
_('Description') => 'inetOrgPerson_readOnly_description', _('Street') => 'inetOrgPerson_readOnly_street',
|
||||||
_('First name') => 'inetOrgPerson_readOnly_givenName', _('Last name') => 'inetOrgPerson_readOnly_sn',
|
_('First name') => 'inetOrgPerson_readOnly_givenName', _('Last name') => 'inetOrgPerson_readOnly_sn',
|
||||||
|
@ -3751,31 +3719,18 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$readOnlyOptions[_('Common name')] = 'inetOrgPerson_readOnly_cn';
|
$readOnlyOptions[_('Common name')] = 'inetOrgPerson_readOnly_cn';
|
||||||
}
|
}
|
||||||
ksort($readOnlyOptions);
|
ksort($readOnlyOptions);
|
||||||
$readOnlyCounter = 0;
|
|
||||||
$readOnlyOptionsTable = new htmlTable();
|
|
||||||
$readOnlyOptionsTable->colspan = 5;
|
|
||||||
foreach ($readOnlyOptions as $label => $id) {
|
foreach ($readOnlyOptions as $label => $id) {
|
||||||
$readOnlyOptionsTable->addElement(new htmlTableExtendedInputCheckbox($id, false, $label, null, false));
|
$advancedOptions->add(new htmlResponsiveInputCheckbox($id, false, $label, null, true), 12, 4);
|
||||||
$readOnlyCounter++;
|
|
||||||
if (($readOnlyCounter % 5) == 0) {
|
|
||||||
$readOnlyOptionsTable->addNewLine();
|
|
||||||
}
|
}
|
||||||
}
|
$advancedOptions->add(new htmlSubTitle(_('Photo')), 12);
|
||||||
$advancedOptions->addElement($readOnlyOptionsTable, true);
|
|
||||||
$advancedOptions->addElement(new htmlSubTitle(_('Photo')), true);
|
|
||||||
$photoTable = new htmlTable();
|
|
||||||
$photoTable->colspan = 2;
|
|
||||||
if (extension_loaded('imagick')) {
|
if (extension_loaded('imagick')) {
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum width (px)'), 'inetOrgPerson_jpegPhoto_maxWidth', null, 'crop'), true);
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum width (px)'), 'inetOrgPerson_jpegPhoto_maxWidth', null, 'crop'), 12);
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum height (px)'), 'inetOrgPerson_jpegPhoto_maxHeight', null, 'crop'), true);
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum height (px)'), 'inetOrgPerson_jpegPhoto_maxHeight', null, 'crop'), 12);
|
||||||
}
|
}
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum file size (kB)'), 'inetOrgPerson_jpegPhoto_maxSize'), true);
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum file size (kB)'), 'inetOrgPerson_jpegPhoto_maxSize'), 12);
|
||||||
$advancedOptions->addElement($photoTable, true);
|
|
||||||
$advancedOptionsAccordion = new htmlAccordion('inetOrgPersonAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
$advancedOptionsAccordion = new htmlAccordion('inetOrgPersonAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
||||||
$advancedOptionsAccordion->colspan = 5;
|
$configContainer->add($advancedOptionsAccordion, 12);
|
||||||
$configContainer->addElement($advancedOptionsAccordion);
|
return $configContainer;
|
||||||
$return[] = $configContainer;
|
|
||||||
return $return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue