responsive
This commit is contained in:
parent
caf809c87e
commit
44fc341de9
|
@ -1177,7 +1177,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
function display_html_attributes() {
|
function display_html_attributes() {
|
||||||
$this->initCache();
|
$this->initCache();
|
||||||
$container = new htmlResponsiveRow();
|
$container = new htmlResponsiveRow();
|
||||||
$fieldContainer = new htmlTable();
|
$fieldContainer = new htmlResponsiveRow();
|
||||||
$fieldTabletColumns = $this->isBooleanConfigOptionSet('inetOrgPerson_hidejpegPhoto') ? 12 : 6;
|
$fieldTabletColumns = $this->isBooleanConfigOptionSet('inetOrgPerson_hidejpegPhoto') ? 12 : 6;
|
||||||
$container->add($fieldContainer, 12, $fieldTabletColumns);
|
$container->add($fieldContainer, 12, $fieldTabletColumns);
|
||||||
// uid
|
// uid
|
||||||
|
@ -1236,7 +1236,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideState') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hidePostalAddress')
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideState') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hidePostalAddress')
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideOfficeName') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideRoomNumber')
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideOfficeName') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideRoomNumber')
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideRegisteredAddress')) {
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideRegisteredAddress')) {
|
||||||
$fieldContainer->addElement(new htmlSubTitle(_('Address')), true);
|
$fieldContainer->add(new htmlSubTitle(_('Address')), 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
// street
|
// street
|
||||||
|
@ -1297,7 +1297,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
$addressLabel = new htmlOutputText(_('Postal address'));
|
$addressLabel = new htmlOutputText(_('Postal address'));
|
||||||
$addressLabel->alignment = htmlElement::ALIGN_TOP;
|
$addressLabel->alignment = htmlElement::ALIGN_TOP;
|
||||||
$fieldContainer->addElement($addressLabel);
|
$fieldContainer->addLabel($addressLabel);
|
||||||
$addressContainer = new htmlGroup();
|
$addressContainer = new htmlGroup();
|
||||||
for ($i = 0; $i < sizeof($postalAddresses); $i++) {
|
for ($i = 0; $i < sizeof($postalAddresses); $i++) {
|
||||||
if ($this->isAdminReadOnly('postalAddress')) {
|
if ($this->isAdminReadOnly('postalAddress')) {
|
||||||
|
@ -1314,19 +1314,13 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$addressContainer->addElement(new htmlButton('addPostalAddress', 'add.png', true));
|
$addressContainer->addElement(new htmlButton('addPostalAddress', 'add.png', true));
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$fieldContainer->addElement($addressContainer);
|
|
||||||
if ($this->isAdminReadOnly('postalAddress')) {
|
|
||||||
$fieldContainer->addNewLine();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$addressHelp = new htmlHelpLink('postalAddress');
|
$addressHelp = new htmlHelpLink('postalAddress');
|
||||||
$addressHelp->alignment = htmlElement::ALIGN_TOP;
|
$addressContainer->addElement($addressHelp);
|
||||||
$fieldContainer->addElement($addressHelp, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
$fieldContainer->addField($addressContainer);
|
||||||
|
}
|
||||||
// registered address
|
// registered address
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideRegisteredAddress')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideRegisteredAddress')) {
|
||||||
$registeredAddresses = array();
|
$registeredAddresses = array();
|
||||||
|
@ -1340,7 +1334,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
$registeredAddressLabel = new htmlOutputText(_('Registered address'));
|
$registeredAddressLabel = new htmlOutputText(_('Registered address'));
|
||||||
$registeredAddressLabel->alignment = htmlElement::ALIGN_TOP;
|
$registeredAddressLabel->alignment = htmlElement::ALIGN_TOP;
|
||||||
$fieldContainer->addElement($registeredAddressLabel);
|
$fieldContainer->addLabel($registeredAddressLabel);
|
||||||
$registeredAddressContainer = new htmlGroup();
|
$registeredAddressContainer = new htmlGroup();
|
||||||
for ($i = 0; $i < sizeof($registeredAddresses); $i++) {
|
for ($i = 0; $i < sizeof($registeredAddresses); $i++) {
|
||||||
if ($this->isAdminReadOnly('registeredAddress')) {
|
if ($this->isAdminReadOnly('registeredAddress')) {
|
||||||
|
@ -1357,19 +1351,13 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$registeredAddressContainer->addElement(new htmlButton('addRegisteredAddress', 'add.png', true));
|
$registeredAddressContainer->addElement(new htmlButton('addRegisteredAddress', 'add.png', true));
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$fieldContainer->addElement($registeredAddressContainer);
|
|
||||||
if ($this->isAdminReadOnly('registeredAddress')) {
|
|
||||||
$fieldContainer->addNewLine();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$registeredAddressHelp = new htmlHelpLink('registeredAddress');
|
$registeredAddressHelp = new htmlHelpLink('registeredAddress');
|
||||||
$registeredAddressHelp->alignment = htmlElement::ALIGN_TOP;
|
$registeredAddressContainer->addElement($registeredAddressHelp);
|
||||||
$fieldContainer->addElement($registeredAddressHelp, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
$fieldContainer->addField($registeredAddressContainer);
|
||||||
|
}
|
||||||
// office name
|
// office name
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideOfficeName')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideOfficeName')) {
|
||||||
if ($this->isAdminReadOnly('physicalDeliveryOfficeName')) {
|
if ($this->isAdminReadOnly('physicalDeliveryOfficeName')) {
|
||||||
|
@ -1391,7 +1379,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideTelephoneNumber') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideHomeTelephoneNumber')
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideTelephoneNumber') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideHomeTelephoneNumber')
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideMobileNumber') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideFaxNumber')
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideMobileNumber') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideFaxNumber')
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideEMailAddress') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideLabeledURI')) {
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideEMailAddress') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideLabeledURI')) {
|
||||||
$fieldContainer->addElement(new htmlSubTitle(_('Contact data')), true);
|
$fieldContainer->add(new htmlSubTitle(_('Contact data')), 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideTelephoneNumber')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideTelephoneNumber')) {
|
||||||
|
@ -1455,7 +1443,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideEmployeeType') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideBusinessCategory')
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideEmployeeType') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideBusinessCategory')
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideDepartments') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideManager')
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideDepartments') || !$this->isBooleanConfigOptionSet('inetOrgPerson_hideManager')
|
||||||
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideuserCertificate')) {
|
|| !$this->isBooleanConfigOptionSet('inetOrgPerson_hideuserCertificate')) {
|
||||||
$fieldContainer->addElement(new htmlSubTitle(_('Work details')), true);
|
$fieldContainer->add(new htmlSubTitle(_('Work details')), 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideJobTitle')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideJobTitle')) {
|
||||||
|
@ -1526,7 +1514,8 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
// user certificates
|
// user certificates
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideuserCertificate')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideuserCertificate')) {
|
||||||
$fieldContainer->addElement(new htmlOutputText(_('User certificates')));
|
$fieldContainer->addVerticalSpacer('0.5rem');
|
||||||
|
$fieldContainer->addLabel(new htmlOutputText(_('User certificates')));
|
||||||
$userCertificateGroup = new htmlGroup();
|
$userCertificateGroup = new htmlGroup();
|
||||||
$userCertificateCount = 0;
|
$userCertificateCount = 0;
|
||||||
if (isset($this->attributes['userCertificate;binary'])) {
|
if (isset($this->attributes['userCertificate;binary'])) {
|
||||||
|
@ -1536,24 +1525,19 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$userCertificateGroup->addElement(new htmlSpacer('10px', null));
|
$userCertificateGroup->addElement(new htmlSpacer('10px', null));
|
||||||
if (!$this->isAdminReadOnly('manager')) {
|
if (!$this->isAdminReadOnly('manager')) {
|
||||||
$userCertificateGroup->addElement(new htmlAccountPageButton(get_class($this), 'userCertificate', 'manage', _('Manage')));
|
$userCertificateGroup->addElement(new htmlAccountPageButton(get_class($this), 'userCertificate', 'manage', _('Manage')));
|
||||||
|
$userCertificateGroup->addElement(new htmlHelpLink('userCertificate'));
|
||||||
}
|
}
|
||||||
$fieldContainer->addElement($userCertificateGroup);
|
$fieldContainer->addField($userCertificateGroup);
|
||||||
if ($this->isAdminReadOnly('manager')) {
|
|
||||||
$fieldContainer->addNewLine();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$fieldContainer->addElement(new htmlHelpLink('userCertificate'), true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// manager
|
// manager
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideManager')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideManager')) {
|
||||||
$fieldContainer->addElement(new htmlOutputText(_('Manager')));
|
$fieldContainer->addVerticalSpacer('0.5rem');
|
||||||
if ($this->isAdminReadOnly('manager')) {
|
$fieldContainer->addLabel(new htmlOutputText(_('Manager')));
|
||||||
$fieldContainer->addNewLine();
|
if (!$this->isAdminReadOnly('manager')) {
|
||||||
}
|
$managerButtonGroup = new htmlGroup();
|
||||||
else {
|
$managerButtonGroup->addElement(new htmlAccountPageButton(get_class($this), 'manager', 'change', _("Change")));
|
||||||
$fieldContainer->addElement(new htmlAccountPageButton(get_class($this), 'manager', 'change', _("Change")));
|
$managerButtonGroup->addElement(new htmlHelpLink('manager'));
|
||||||
$fieldContainer->addElement(new htmlHelpLink('manager'), true);
|
$fieldContainer->addField($managerButtonGroup);
|
||||||
}
|
}
|
||||||
if (isset($this->attributes['manager'][0])) {
|
if (isset($this->attributes['manager'][0])) {
|
||||||
$managerList = array();
|
$managerList = array();
|
||||||
|
@ -1569,13 +1553,13 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$manager->alignment = htmlElement::ALIGN_RIGHT;
|
$manager->alignment = htmlElement::ALIGN_RIGHT;
|
||||||
$managers->addElement($manager, true);
|
$managers->addElement($manager, true);
|
||||||
}
|
}
|
||||||
$fieldContainer->addElement(new htmlOutputText(''));
|
$fieldContainer->addLabel(new htmlOutputText(' ', false));
|
||||||
$fieldContainer->addElement($managers, true);
|
$fieldContainer->addField($managers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// password buttons
|
// password buttons
|
||||||
if (!$this->isUnixActive() && checkIfWriteAccessIsAllowed($this->get_scope()) && isset($this->attributes['userPassword'][0]) && !$this->isAdminReadOnly('userPassword')) {
|
if (!$this->isUnixActive() && checkIfWriteAccessIsAllowed($this->get_scope()) && isset($this->attributes['userPassword'][0]) && !$this->isAdminReadOnly('userPassword')) {
|
||||||
$fieldContainer->addElement(new htmlSubTitle(_('Password')), true);
|
$fieldContainer->add(new htmlSubTitle(_('Password')), 12);
|
||||||
$pwdContainer = new htmlTable();
|
$pwdContainer = new htmlTable();
|
||||||
if (pwd_is_enabled($this->attributes['userPassword'][0])) {
|
if (pwd_is_enabled($this->attributes['userPassword'][0])) {
|
||||||
$pwdContainer->addElement(new htmlButton('lockPassword', _('Lock password')));
|
$pwdContainer->addElement(new htmlButton('lockPassword', _('Lock password')));
|
||||||
|
@ -1584,12 +1568,12 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$pwdContainer->addElement(new htmlButton('unlockPassword', _('Unlock password')));
|
$pwdContainer->addElement(new htmlButton('unlockPassword', _('Unlock password')));
|
||||||
}
|
}
|
||||||
$pwdContainer->addElement(new htmlButton('removePassword', _('Remove password')));
|
$pwdContainer->addElement(new htmlButton('removePassword', _('Remove password')));
|
||||||
$pwdContainer->colspan = 2;
|
|
||||||
$fieldContainer->addElement($pwdContainer);
|
$fieldContainer->addElement($pwdContainer);
|
||||||
}
|
}
|
||||||
// photo
|
// photo
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hidejpegPhoto')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hidejpegPhoto')) {
|
||||||
$imageContainer = new htmlTable();
|
$imageContainer = new htmlTable();
|
||||||
|
$imageContainer->setCSSClasses(array('div-center'));
|
||||||
$imageContainer->alignment = htmlElement::ALIGN_TOP;
|
$imageContainer->alignment = htmlElement::ALIGN_TOP;
|
||||||
$photoFile = '../../graphics/userDefault.png';
|
$photoFile = '../../graphics/userDefault.png';
|
||||||
$noPhoto = true;
|
$noPhoto = true;
|
||||||
|
|
Loading…
Reference in New Issue