responsive self service
This commit is contained in:
parent
d5ea258c10
commit
a53a432c2b
|
@ -1428,8 +1428,8 @@ abstract class baseModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
$row->add(new htmlOutputText($this->getSelfServiceLabel($name, $label)), 12, 6, 6, 'responsiveLabel');
|
$row->addLabel(new htmlOutputText($this->getSelfServiceLabel($name, $label)));
|
||||||
$row->add($field, 12, 6, 6, 'responsiveField');
|
$row->addField($field);
|
||||||
$container[$name] = $row;
|
$container[$name] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3279,6 +3279,24 @@ class htmlResponsiveRow extends htmlElement {
|
||||||
$this->addCell(new htmlResponsiveCell($content, $numMobile, $tabletCols, $tabletCols, $classes));
|
$this->addCell(new htmlResponsiveCell($content, $numMobile, $tabletCols, $tabletCols, $classes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the content as a typical label with 12/6/6 columns and CSS class "responsiveLabel".
|
||||||
|
*
|
||||||
|
* @param htmlElement $content label
|
||||||
|
*/
|
||||||
|
public function addLabel($content) {
|
||||||
|
$this->add($content, 12, 6, 6, 'responsiveLabel');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the content as a typical field with 12/6/6 columns and CSS class "responsiveField".
|
||||||
|
*
|
||||||
|
* @param htmlElement $content field
|
||||||
|
*/
|
||||||
|
public function addField($content) {
|
||||||
|
$this->add($content, 12, 6, 6, 'responsiveField');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints the HTML code for this element.
|
* Prints the HTML code for this element.
|
||||||
*
|
*
|
||||||
|
|
|
@ -789,7 +789,7 @@ class kolabUser extends baseModule {
|
||||||
* @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) {
|
||||||
if ($passwordChangeOnly) {
|
if ($passwordChangeOnly) {
|
||||||
|
@ -842,10 +842,10 @@ class kolabUser extends baseModule {
|
||||||
$delegateContainer->addElement(new htmlTableExtendedInputCheckbox('new_delegate', false, _("Add"), null, false), true);
|
$delegateContainer->addElement(new htmlTableExtendedInputCheckbox('new_delegate', false, _("Add"), null, false), true);
|
||||||
}
|
}
|
||||||
$delegateLabel = new htmlOutputText($this->getSelfServiceLabel('kolabDelegate', _('Delegates')));
|
$delegateLabel = new htmlOutputText($this->getSelfServiceLabel('kolabDelegate', _('Delegates')));
|
||||||
$delegateLabel->alignment = htmlElement::ALIGN_TOP;
|
$row = new htmlResponsiveRow();
|
||||||
$return['kolabDelegate'] = new htmlTableRow(array(
|
$row->addLabel($delegateLabel);
|
||||||
$delegateLabel, $delegateContainer
|
$row->addField($delegateContainer);
|
||||||
));
|
$return['kolabDelegate'] = $row;
|
||||||
}
|
}
|
||||||
// invitation policies
|
// invitation policies
|
||||||
if (in_array('kolabInvitationPolicy', $fields)) {
|
if (in_array('kolabInvitationPolicy', $fields)) {
|
||||||
|
@ -890,10 +890,10 @@ class kolabUser extends baseModule {
|
||||||
$invitationContainer->addElement(new htmlTableExtendedInputCheckbox('addInvPol', false, _("Add"), null, false), true);
|
$invitationContainer->addElement(new htmlTableExtendedInputCheckbox('addInvPol', false, _("Add"), null, false), true);
|
||||||
}
|
}
|
||||||
$invitationLabel = new htmlOutputText($this->getSelfServiceLabel('kolabInvitationPolicy', _('Invitation policy')));
|
$invitationLabel = new htmlOutputText($this->getSelfServiceLabel('kolabInvitationPolicy', _('Invitation policy')));
|
||||||
$invitationLabel->alignment = htmlElement::ALIGN_TOP;
|
$row = new htmlResponsiveRow();
|
||||||
$return['kolabInvitationPolicy'] = new htmlTableRow(array(
|
$row->addLabel($invitationLabel);
|
||||||
$invitationLabel, $invitationContainer
|
$row->addField($invitationContainer);
|
||||||
));
|
$return['kolabInvitationPolicy'] = $row;
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,7 +230,7 @@ class ldapPublicKey extends baseModule {
|
||||||
* @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();
|
||||||
|
@ -254,10 +254,10 @@ class ldapPublicKey extends baseModule {
|
||||||
$uploadStatus->colspan = 7;
|
$uploadStatus->colspan = 7;
|
||||||
$keyTable->addElement($uploadStatus, true);
|
$keyTable->addElement($uploadStatus, true);
|
||||||
$keyLabel = new htmlOutputText($this->getSelfServiceLabel('sshPublicKey', _('SSH public keys')));
|
$keyLabel = new htmlOutputText($this->getSelfServiceLabel('sshPublicKey', _('SSH public keys')));
|
||||||
$keyLabel->alignment = htmlElement::ALIGN_TOP;
|
$row = new htmlResponsiveRow();
|
||||||
$keyCells = array($keyLabel, $keyTable);
|
$row->addLabel($keyLabel);
|
||||||
$keyRow = new htmlTableRow($keyCells);
|
$row->addField($keyTable);
|
||||||
$return['sshPublicKey'] = $keyRow;
|
$return['sshPublicKey'] = $row;
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2681,8 +2681,8 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$cnField = new htmlOutputText($cn);
|
$cnField = new htmlOutputText($cn);
|
||||||
}
|
}
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
$row->add(new htmlOutputText($this->getSelfServiceLabel('cn', _('Common name'))), 12, 6, 6, 'responsiveLabel');
|
$row->addLabel(new htmlOutputText($this->getSelfServiceLabel('cn', _('Common name'))));
|
||||||
$row->add($cnField, 12, 6, 6, 'responsiveField');
|
$row->addField($cnField);
|
||||||
$return['cn'] = $row;
|
$return['cn'] = $row;
|
||||||
}
|
}
|
||||||
if (in_array('loginShell', $fields)) {
|
if (in_array('loginShell', $fields)) {
|
||||||
|
@ -2694,8 +2694,8 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$loginShellField = new htmlOutputText($loginShell);
|
$loginShellField = new htmlOutputText($loginShell);
|
||||||
}
|
}
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
$row->add(new htmlOutputText($this->getSelfServiceLabel('loginShell', _('Login shell'))), 12, 6, 6, 'responsiveLabel');
|
$row->addLabel(new htmlOutputText($this->getSelfServiceLabel('loginShell', _('Login shell'))));
|
||||||
$row->add($loginShellField, 12, 6, 6, 'responsiveField');
|
$row->addField($loginShellField);
|
||||||
$return['loginShell'] = $row;
|
$return['loginShell'] = $row;
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|
|
@ -950,16 +950,16 @@ class pykotaUser extends baseModule {
|
||||||
$pykotaBalance = '';
|
$pykotaBalance = '';
|
||||||
if (isset($attributes['pykotaBalance'][0])) $pykotaBalance = $attributes['pykotaBalance'][0];
|
if (isset($attributes['pykotaBalance'][0])) $pykotaBalance = $attributes['pykotaBalance'][0];
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
$row->add(new htmlOutputText($this->getSelfServiceLabel('pykotaBalance', _('Balance'))), 12, 6, 6, 'responsiveLabel');
|
$row->addLabel(new htmlOutputText($this->getSelfServiceLabel('pykotaBalance', _('Balance'))));
|
||||||
$row->add(new htmlOutputText($pykotaBalance), 12, 6, 6, 'responsiveField');
|
$row->addField(new htmlOutputText($pykotaBalance));
|
||||||
$return['pykotaBalance'] = $row;
|
$return['pykotaBalance'] = $row;
|
||||||
}
|
}
|
||||||
if (in_array('pykotaLifeTimePaid', $fields)) {
|
if (in_array('pykotaLifeTimePaid', $fields)) {
|
||||||
$pykotaLifeTimePaid = '';
|
$pykotaLifeTimePaid = '';
|
||||||
if (isset($attributes['pykotaLifeTimePaid'][0])) $pykotaLifeTimePaid = $attributes['pykotaLifeTimePaid'][0];
|
if (isset($attributes['pykotaLifeTimePaid'][0])) $pykotaLifeTimePaid = $attributes['pykotaLifeTimePaid'][0];
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
$row->add(new htmlOutputText($this->getSelfServiceLabel('pykotaLifeTimePaid', _('Total paid'))), 12, 6, 6, 'responsiveLabel');
|
$row->addLabel(new htmlOutputText($this->getSelfServiceLabel('pykotaLifeTimePaid', _('Total paid'))));
|
||||||
$row->add(new htmlOutputText($pykotaLifeTimePaid), 12, 6, 6, 'responsiveField');
|
$row->addField(new htmlOutputText($pykotaLifeTimePaid));
|
||||||
$return['pykotaLifeTimePaid'] = $row;
|
$return['pykotaLifeTimePaid'] = $row;
|
||||||
}
|
}
|
||||||
// payment history
|
// payment history
|
||||||
|
|
|
@ -2254,8 +2254,8 @@ class sambaSamAccount extends baseModule implements passwordService {
|
||||||
$sambaPwdLastSet = date('d.m.Y H:i', $attributes['sambaPwdLastSet'][0]);
|
$sambaPwdLastSet = date('d.m.Y H:i', $attributes['sambaPwdLastSet'][0]);
|
||||||
}
|
}
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
$row->add(new htmlOutputText($this->getSelfServiceLabel('sambaPwdLastSet', _('Last password change'))), 12, 6, 6, 'responsiveLabel');
|
$row->addLabel(new htmlOutputText($this->getSelfServiceLabel('sambaPwdLastSet', _('Last password change'))));
|
||||||
$row->add(new htmlOutputText($sambaPwdLastSet), 12, 6, 6, 'responsiveField');
|
$row->addField(new htmlOutputText($sambaPwdLastSet));
|
||||||
$return['sambaPwdLastSet'] = $row;
|
$return['sambaPwdLastSet'] = $row;
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|
|
@ -743,8 +743,8 @@ class shadowAccount extends baseModule implements passwordService {
|
||||||
$shadowLastChange = $date['mday'] . "." . $date['mon'] . "." . $date['year'];
|
$shadowLastChange = $date['mday'] . "." . $date['mon'] . "." . $date['year'];
|
||||||
}
|
}
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
$row->add(new htmlOutputText($this->getSelfServiceLabel('shadowLastChange', _('Last password change'))), 12, 6, 6, 'responsiveLabel');
|
$row->addLabel(new htmlOutputText($this->getSelfServiceLabel('shadowLastChange', _('Last password change'))));
|
||||||
$row->add(new htmlOutputText($shadowLastChange), 12, 6, 6, 'responsiveField');
|
$row->addField(new htmlOutputText($shadowLastChange));
|
||||||
$return['shadowLastChange'] = $row;
|
$return['shadowLastChange'] = $row;
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|
Loading…
Reference in New Issue