responsive self service
This commit is contained in:
parent
a74e645ea3
commit
d5ea258c10
|
@ -2650,28 +2650,25 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
* @param array $attributes attributes of LDAP account
|
* @param array $attributes attributes of LDAP account
|
||||||
* @param boolean $passwordChangeOnly indicates that the user is only allowed to change his password and no LDAP content is readable
|
* @param boolean $passwordChangeOnly indicates that the user is only allowed to change his password and no LDAP content is readable
|
||||||
* @param array $readOnlyFields list of read-only fields
|
* @param array $readOnlyFields list of read-only fields
|
||||||
* @return array list of meta HTML elements (field name => htmlTableRow)
|
* @return array list of meta HTML elements (field name => htmlResponsiveRow)
|
||||||
*/
|
*/
|
||||||
function getSelfServiceOptions($fields, $attributes, $passwordChangeOnly, $readOnlyFields) {
|
function getSelfServiceOptions($fields, $attributes, $passwordChangeOnly, $readOnlyFields) {
|
||||||
$return = array();
|
$return = array();
|
||||||
if (in_array('password', $fields)) {
|
if (in_array('password', $fields)) {
|
||||||
$pwdTable = new htmlTable();
|
$row = new htmlResponsiveRow();
|
||||||
$pwdTable->colspan = 3;
|
|
||||||
if (!empty($this->selfServiceSettings->moduleSettings['posixAccount_useOldPwd']) && ($this->selfServiceSettings->moduleSettings['posixAccount_useOldPwd'][0] == 'true')) {
|
if (!empty($this->selfServiceSettings->moduleSettings['posixAccount_useOldPwd']) && ($this->selfServiceSettings->moduleSettings['posixAccount_useOldPwd'][0] == 'true')) {
|
||||||
$pwd0 = new htmlTableExtendedInputField(_('Old password'), 'posixAccount_passwordOld');
|
$pwd0 = new htmlResponsiveInputField(_('Old password'), 'posixAccount_passwordOld');
|
||||||
$pwd0->setIsPassword(true, true);
|
$pwd0->setIsPassword(true, true);
|
||||||
$pwdTable->addElement($pwd0, true);
|
$row->add($pwd0, 12);
|
||||||
}
|
}
|
||||||
$pwd1 = new htmlTableExtendedInputField($this->getSelfServiceLabel('password', _('New password')), 'posixAccount_password');
|
$pwd1 = new htmlResponsiveInputField($this->getSelfServiceLabel('password', _('New password')), 'posixAccount_password');
|
||||||
$pwd1->setIsPassword(true, true);
|
$pwd1->setIsPassword(true, true);
|
||||||
$pwdTable->addElement($pwd1, true);
|
$row->add($pwd1, 12);
|
||||||
$pwd2 = new htmlTableExtendedInputField(_('Reenter password'), 'posixAccount_password2');
|
$pwd2 = new htmlResponsiveInputField(_('Reenter password'), 'posixAccount_password2');
|
||||||
$pwd2->setIsPassword(true);
|
$pwd2->setIsPassword(true);
|
||||||
$pwd2->setSameValueFieldID('posixAccount_password');
|
$pwd2->setSameValueFieldID('posixAccount_password');
|
||||||
$pwdTable->addElement($pwd2);
|
$row->add($pwd2, 12);
|
||||||
$return['password'] = new htmlTableRow(array(
|
$return['password'] = $row;
|
||||||
$pwdTable
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
if ($passwordChangeOnly) {
|
if ($passwordChangeOnly) {
|
||||||
return $return; // only password fields as long no LDAP content can be read
|
return $return; // only password fields as long no LDAP content can be read
|
||||||
|
@ -2683,9 +2680,10 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
if (in_array('cn', $readOnlyFields)) {
|
if (in_array('cn', $readOnlyFields)) {
|
||||||
$cnField = new htmlOutputText($cn);
|
$cnField = new htmlOutputText($cn);
|
||||||
}
|
}
|
||||||
$return['cn'] = new htmlTableRow(array(
|
$row = new htmlResponsiveRow();
|
||||||
new htmlOutputText($this->getSelfServiceLabel('cn', _('Common name'))), $cnField
|
$row->add(new htmlOutputText($this->getSelfServiceLabel('cn', _('Common name'))), 12, 6, 6, 'responsiveLabel');
|
||||||
));
|
$row->add($cnField, 12, 6, 6, 'responsiveField');
|
||||||
|
$return['cn'] = $row;
|
||||||
}
|
}
|
||||||
if (in_array('loginShell', $fields)) {
|
if (in_array('loginShell', $fields)) {
|
||||||
$shelllist = $this->getShells(); // list of all valid shells
|
$shelllist = $this->getShells(); // list of all valid shells
|
||||||
|
@ -2695,9 +2693,10 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
if (in_array('loginShell', $readOnlyFields)) {
|
if (in_array('loginShell', $readOnlyFields)) {
|
||||||
$loginShellField = new htmlOutputText($loginShell);
|
$loginShellField = new htmlOutputText($loginShell);
|
||||||
}
|
}
|
||||||
$return['loginShell'] = new htmlTableRow(array(
|
$row = new htmlResponsiveRow();
|
||||||
new htmlOutputText($this->getSelfServiceLabel('loginShell', _('Login shell'))), $loginShellField
|
$row->add(new htmlOutputText($this->getSelfServiceLabel('loginShell', _('Login shell'))), 12, 6, 6, 'responsiveLabel');
|
||||||
));
|
$row->add($loginShellField, 12, 6, 6, 'responsiveField');
|
||||||
|
$return['loginShell'] = $row;
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -672,6 +672,10 @@ h4.schema_oclass_sub {
|
||||||
|
|
||||||
/** responsive styles */
|
/** responsive styles */
|
||||||
|
|
||||||
|
.row input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
div.dialog-page {
|
div.dialog-page {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue