From a74e645ea3595d38ab3a30ac9913f9421dd28965 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 6 Aug 2015 19:20:54 +0000 Subject: [PATCH] responsive self service --- lam/lib/modules/pykotaUser.inc | 92 ++++++++++++----------------- lam/lib/modules/sambaSamAccount.inc | 92 ++++++++++++++--------------- lam/lib/modules/shadowAccount.inc | 43 +++++++------- lam/style/500_layout.css | 14 ++++- 4 files changed, 119 insertions(+), 122 deletions(-) diff --git a/lam/lib/modules/pykotaUser.inc b/lam/lib/modules/pykotaUser.inc index 3087b0cc..9838abc5 100644 --- a/lam/lib/modules/pykotaUser.inc +++ b/lam/lib/modules/pykotaUser.inc @@ -936,7 +936,7 @@ class pykotaUser extends baseModule { * @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 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) { if ($passwordChangeOnly) { @@ -949,86 +949,70 @@ class pykotaUser extends baseModule { if (in_array('pykotaBalance', $fields)) { $pykotaBalance = ''; if (isset($attributes['pykotaBalance'][0])) $pykotaBalance = $attributes['pykotaBalance'][0]; - $return['pykotaBalance'] = new htmlTableRow(array( - new htmlOutputText($this->getSelfServiceLabel('pykotaBalance', _('Balance'))), new htmlOutputText($pykotaBalance) - )); + $row = new htmlResponsiveRow(); + $row->add(new htmlOutputText($this->getSelfServiceLabel('pykotaBalance', _('Balance'))), 12, 6, 6, 'responsiveLabel'); + $row->add(new htmlOutputText($pykotaBalance), 12, 6, 6, 'responsiveField'); + $return['pykotaBalance'] = $row; } if (in_array('pykotaLifeTimePaid', $fields)) { $pykotaLifeTimePaid = ''; if (isset($attributes['pykotaLifeTimePaid'][0])) $pykotaLifeTimePaid = $attributes['pykotaLifeTimePaid'][0]; - $return['pykotaLifeTimePaid'] = new htmlTableRow(array( - new htmlOutputText($this->getSelfServiceLabel('pykotaLifeTimePaid', _('Total paid'))), new htmlOutputText($pykotaLifeTimePaid) - )); + $row = new htmlResponsiveRow(); + $row->add(new htmlOutputText($this->getSelfServiceLabel('pykotaLifeTimePaid', _('Total paid'))), 12, 6, 6, 'responsiveLabel'); + $row->add(new htmlOutputText($pykotaLifeTimePaid), 12, 6, 6, 'responsiveField'); + $return['pykotaLifeTimePaid'] = $row; } // payment history if (in_array('pykotaPayments', $fields)) { - $pykotaPayments = new htmlTable(); - $pykotaPayments->colspan = 5; + $pykotaPayments = new htmlResponsiveRow(); if (!empty($attributes['pykotaPayments'][0])) { - $spacer = new htmlSpacer('10px', null); - $pykotaPayments->addElement(new htmlOutputText(_('Date')), false, true); - $pykotaPayments->addElement($spacer); - $pykotaPayments->addElement(new htmlOutputText(_('Amount')), false, true); - $pykotaPayments->addElement($spacer); - $pykotaPayments->addElement(new htmlOutputText(_('Comment')), true, true); + $pykotaPayments->add(new htmlOutputText(_('Date')), 3, 3, 3, 'bold'); + $pykotaPayments->add(new htmlOutputText(_('Amount')), 3, 3, 3, 'bold'); + $pykotaPayments->add(new htmlOutputText(_('Comment')), 6, 6, 6, 'bold'); rsort($attributes['pykotaPayments']); foreach ($attributes['pykotaPayments'] as $payment) { $parts = explode(' # ', $payment); - $pykotaPayments->addElement(new htmlOutputText($parts[0])); - $pykotaPayments->addElement($spacer); + $pykotaPayments->add(new htmlOutputText($parts[0]), 3); $amount = new htmlOutputText($parts[1]); $amount->alignment = htmlElement::ALIGN_RIGHT; - $pykotaPayments->addElement($amount); - $pykotaPayments->addElement($spacer); - if (!empty($parts[2])) { - $pykotaPayments->addElement(new htmlOutputText(base64_decode($parts[2]))); - } - $pykotaPayments->addNewLine(); + $pykotaPayments->add($amount, 3); + $comment = empty($parts[2]) ? '' : $parts[2]; + $pykotaPayments->add(new htmlOutputText(base64_decode($parts[2])), 6); } } - $pykotaPaymentsLabel = new htmlOutputText($this->getSelfServiceLabel('pykotaPayments', _('Payment history'))); - $pykotaPaymentsLabel->alignment = htmlElement::ALIGN_TOP; - $return['pykotaPayments'] = new htmlTableRow(array( - $pykotaPaymentsLabel, $pykotaPayments - )); + $row->add(new htmlSpacer(null, '10px'), 12); + $row = new htmlResponsiveRow(); + $row->add(new htmlOutputText($this->getSelfServiceLabel('pykotaPayments', _('Payment history'))), 12, 12, 12, 'bold text-left'); + $row->add($pykotaPayments, 12); + $return['pykotaPayments'] = $row; } // job history if (in_array('pykotaJobHistory', $fields) && !empty($this->selfServiceSettings->moduleSettings['pykotaUser_jobSuffix'][0]) && !empty($attributes['pykotaUserName'][0])) { $jobs = $this->getJobs($attributes['pykotaUserName'][0], $this->selfServiceSettings->moduleSettings['pykotaUser_jobSuffix'][0]); - $pykotaJobs = new htmlTable(); - $pykotaJobs->colspan = 5; - $spacer = new htmlSpacer('10px', null); - $pykotaJobs->addElement(new htmlOutputText(_('Date')), false, true); - $pykotaJobs->addElement($spacer); - $pykotaJobs->addElement(new htmlOutputText(_('Printer')), false, true); - $pykotaJobs->addElement($spacer); - $pykotaJobs->addElement(new htmlOutputText(_('Price')), false, true); - $pykotaJobs->addElement($spacer); - $pykotaJobs->addElement(new htmlOutputText(_('Size')), false, true); - $pykotaJobs->addElement($spacer); + $pykotaJobs = new htmlResponsiveRow(); + $pykotaJobs->add(new htmlOutputText(_('Date')), 3, 3, 3, 'bold'); + $pykotaJobs->add(new htmlOutputText(_('Printer')), 3, 3, 3, 'bold'); + $pykotaJobs->add(new htmlOutputText(_('Price')), 2, 2, 2, 'bold'); + $pykotaJobs->add(new htmlOutputText(_('Size')), 1, 1, 1, 'bold'); $title = new htmlOutputText(_('Title')); $title->alignment = htmlElement::ALIGN_LEFT; - $pykotaJobs->addElement($title, true, true); + $pykotaJobs->add($title, 3, 3, 3, 'bold'); foreach ($jobs as $job) { - $pykotaJobs->addElement(new htmlOutputText(formatLDAPTimestamp($job['createtimestamp'][0]))); - $pykotaJobs->addElement($spacer); - $pykotaJobs->addElement(new htmlOutputText($job['pykotaprintername'][0])); - $pykotaJobs->addElement($spacer); + $pykotaJobs->add(new htmlOutputText(formatLDAPTimestamp($job['createtimestamp'][0])), 3); + $pykotaJobs->add(new htmlOutputText($job['pykotaprintername'][0]), 3); $price = new htmlOutputText($job['pykotajobprice'][0]); $price->alignment = htmlElement::ALIGN_RIGHT; - $pykotaJobs->addElement($price); - $pykotaJobs->addElement($spacer); + $pykotaJobs->add($price, 2); $size = new htmlOutputText($job['pykotajobsize'][0]); $size->alignment = htmlElement::ALIGN_RIGHT; - $pykotaJobs->addElement($size); - $pykotaJobs->addElement($spacer); - $pykotaJobs->addElement(new htmlOutputText($job['pykotatitle'][0]), true); + $pykotaJobs->add($size, 1); + $pykotaJobs->add(new htmlOutputText($job['pykotatitle'][0]), 3); } - $pykotaJobsLabel = new htmlOutputText($this->getSelfServiceLabel('pykotaJobHistory', _('Job history'))); - $pykotaJobsLabel->alignment = htmlElement::ALIGN_TOP; - $return['pykotaJobHistory'] = new htmlTableRow(array( - $pykotaJobsLabel, $pykotaJobs - )); + $row = new htmlResponsiveRow(); + $row->add(new htmlSpacer(null, '10px'), 12); + $row->add(new htmlOutputText($this->getSelfServiceLabel('pykotaJobHistory', _('Job history'))), 12, 12, 12, 'bold text-left'); + $row->add($pykotaJobs, 12); + $return['pykotaJobHistory'] = $row; } return $return; } diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 83a20451..46f4f2a3 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -66,7 +66,7 @@ class sambaSamAccount extends baseModule implements passwordService { private $cachedDomainList = null; /** delimiter for lamdaemon commands */ private static $SPLIT_DELIMITER = "###x##y##x###"; - + /** * Creates a new sambaSamAccount object. @@ -124,7 +124,7 @@ class sambaSamAccount extends baseModule implements passwordService { /** * Returns true if this module can manage accounts of the current type, otherwise false. - * + * * @return boolean true if module fits */ public function can_manage() { @@ -135,7 +135,7 @@ class sambaSamAccount extends baseModule implements passwordService { * Returns meta data that is interpreted by parent class * * @return array array with meta data - * + * * @see baseModule::get_metaData() */ function get_metaData() { @@ -609,10 +609,10 @@ class sambaSamAccount extends baseModule implements passwordService { if ($attrs['uid'][0]=='') return false; return true; } - + /** * This function is used to check if all settings for this module have been made. - * + * * @see baseModule::module_complete * * @return boolean true, if settings are complete @@ -624,7 +624,7 @@ class sambaSamAccount extends baseModule implements passwordService { if ($this->get_scope() == "host") { $attrs = $this->getAccountContainer()->getAccountModule('posixAccount')->getAttributes(); if (substr($attrs['uid'][0], -1, 1) != '$') { - return false; + return false; } } if (!isset($this->attributes['sambaSID']) || ($this->attributes['sambaSID'] == '')) { @@ -1035,7 +1035,7 @@ class sambaSamAccount extends baseModule implements passwordService { if (isset($this->attributes['sambaMungedDial'][0])) { $mDial->load($this->attributes['sambaMungedDial'][0]); } - $mDial->setTsLogin(!isset($_POST['tsAllowLogin'])); + $mDial->setTsLogin(!isset($_POST['tsAllowLogin'])); $mDial->ctx['CtxWFHomeDir'] = $_POST['tsHomeDir']; $mDial->ctx['CtxWFHomeDirDrive'] = $_POST['tsHomeDrive']; $mDial->ctx['CtxWFProfilePath'] = $_POST['tsProfilePath']; @@ -1057,7 +1057,7 @@ class sambaSamAccount extends baseModule implements passwordService { /** * Returns the HTML meta data for the main account page. - * + * * @return htmlElement HTML meta data */ function display_html_attributes() { @@ -1168,7 +1168,7 @@ class sambaSamAccount extends baseModule implements passwordService { $tempTable->addElement(new htmlAccountPageButton(get_class($this), 'time', 'sambaKickoffTime', _('Change'))); $return->addElement($tempTable); $return->addElement(new htmlHelpLink('expireDate'), true); - // home drive + // home drive if (!$this->isBooleanConfigOptionSet('sambaSamAccount_hideHomeDrive')) { $drives = array('-'); for ($i=90; $i>67; $i--) $drives[] = chr($i).':'; @@ -1278,7 +1278,7 @@ class sambaSamAccount extends baseModule implements passwordService { } $return->addElement(new htmlSpacer(null, '10px'), true); - + $remButton = new htmlButton('remObjectClass', _('Remove Samba 3 extension')); $remButton->colspan = 3; $return->addElement($remButton); @@ -1300,7 +1300,7 @@ class sambaSamAccount extends baseModule implements passwordService { // Get list of all hosts. $userWorkstations = array(); $availableUserWorkstations = array(); - + $result = $this->getHostList(); foreach ($result as $host) $availableUserWorkstations[] = str_replace("$", '', $host); sort($availableUserWorkstations, SORT_STRING); @@ -1327,9 +1327,9 @@ class sambaSamAccount extends baseModule implements passwordService { $wsAvailSelect->setMultiSelect(true); $return->addElement($wsAvailSelect); $return->addNewLine(); - + $return->addElement(new htmlSpacer(null, '10px'), true); - + $backButton = new htmlAccountPageButton(get_class($this), 'attributes', 'back', _('Back')); $backButton->colspan = 3; $return->addElement($backButton); @@ -1393,11 +1393,11 @@ class sambaSamAccount extends baseModule implements passwordService { } $return->addElement(new htmlOutputText("$hour:00 - $hour:59")); for ($d = 0; $d < 7; $d++) { - $return->addElement($boxes[$h][$d]); + $return->addElement($boxes[$h][$d]); } $return->addNewLine(); } - + $return->addElement(new htmlSpacer(null, '10px'), true); $buttonContainer = new htmlTable(); $buttonContainer->colspan = 5; @@ -1454,7 +1454,7 @@ class sambaSamAccount extends baseModule implements passwordService { $buttons->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'back' . $attr, _('Cancel'))); $buttons->colspan = 6; $return->addElement($buttons); - return $return; + return $return; } /** @@ -1540,9 +1540,9 @@ class sambaSamAccount extends baseModule implements passwordService { $buttonContainer->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'abort', _('Cancel'))); $buttonContainer->colspan = 3; $return->addElement($buttonContainer); - return $return; + return $return; } - + /** * Displays manage profile path page. * @@ -2225,7 +2225,7 @@ class sambaSamAccount extends baseModule implements passwordService { * @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 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) { $return = array(); @@ -2236,27 +2236,27 @@ class sambaSamAccount extends baseModule implements passwordService { return $return; } if (in_array('password', $fields)) { - $pwdTable = new htmlTable(); - $pwdTable->colspan = 3; - $pwd1 = new htmlTableExtendedInputField($this->getSelfServiceLabel('password', _('New password')), 'sambaSamAccount_password'); + $group = new htmlGroup(); + $pwd1 = new htmlResponsiveInputField($this->getSelfServiceLabel('password', _('New password')), 'sambaSamAccount_password'); $pwd1->setIsPassword(true, true); - $pwdTable->addElement($pwd1, true); - $pwd2 = new htmlTableExtendedInputField(_('Reenter password'), 'sambaSamAccount_password2'); + $group->addElement($pwd1); + $pwd2 = new htmlResponsiveInputField(_('Reenter password'), 'sambaSamAccount_password2'); $pwd2->setIsPassword(true); $pwd2->setSameValueFieldID('sambaSamAccount_password'); - $pwdTable->addElement($pwd2); - $return['password'] = new htmlTableRow(array( - $pwdTable - )); + $group->addElement($pwd2); + $row = new htmlResponsiveRow(); + $row->add($group, 12); + $return['password'] = $row; } if (in_array('sambaPwdLastSet', $fields)) { $sambaPwdLastSet = ''; if (isset($attributes['sambaPwdLastSet'][0])) { $sambaPwdLastSet = date('d.m.Y H:i', $attributes['sambaPwdLastSet'][0]); } - $return['sambaPwdLastSet'] = new htmlTableRow(array( - new htmlOutputText($this->getSelfServiceLabel('sambaPwdLastSet', _('Last password change'))), new htmlOutputText($sambaPwdLastSet) - )); + $row = new htmlResponsiveRow(); + $row->add(new htmlOutputText($this->getSelfServiceLabel('sambaPwdLastSet', _('Last password change'))), 12, 6, 6, 'responsiveLabel'); + $row->add(new htmlOutputText($sambaPwdLastSet), 12, 6, 6, 'responsiveField'); + $return['sambaPwdLastSet'] = $row; } return $return; } @@ -2269,7 +2269,7 @@ class sambaSamAccount extends baseModule implements passwordService { *
del: array of attributes to remove *
mod: array of attributes to modify *
info: array of values with informational value (e.g. to be used later by pre/postModify actions) - * + * * Calling this method does not require the existence of an enclosing {@link accountContainer}. * * @param string $fields input fields @@ -2362,13 +2362,13 @@ class sambaSamAccount extends baseModule implements passwordService { /** * Specifies if this module supports to force that a user must change his password on next login. - * + * * @return boolean force password change supported */ public function supportsForcePasswordChange() { return true; } - + /** * This function is called whenever the password should be changed. Account modules * must change their password attributes only if the modules list contains their module name. @@ -2394,7 +2394,7 @@ class sambaSamAccount extends baseModule implements passwordService { } return array(); } - + /** * Returns the group name of the group with the given group ID. * @@ -2408,7 +2408,7 @@ class sambaSamAccount extends baseModule implements passwordService { } return null; } - + /** * Returns the time when the user needs to change his password. * @@ -2422,7 +2422,7 @@ class sambaSamAccount extends baseModule implements passwordService { $return = '     -      '; // check if password expires at all if ($this->noexpire) { - return $return; + return $return; } // check if there is a time set for the last password change if (!isset($this->attributes['sambaPwdLastSet'][0])) { @@ -2440,7 +2440,7 @@ class sambaSamAccount extends baseModule implements passwordService { } return $return; } - + /** * Returns the time when the user can change his password. * @@ -2468,7 +2468,7 @@ class sambaSamAccount extends baseModule implements passwordService { } return $return; } - + /** * Returns a list of existing hosts. * @@ -2533,25 +2533,25 @@ class sambaSamAccount extends baseModule implements passwordService { $this->attributes['sambaKickoffTime'][0] = gmmktime(0, 0, 0, intval($month), intval($day), intval($year)); } - + /** * Returns if the Samba extension is enabled. - * + * * @return boolean Samba extension is active */ public function isExtensionEnabled() { return in_array('sambaSamAccount', $this->attributes['objectClass']); } - + /** * Returns if the Samba part of the current account is deactivated. - * + * * @return boolean account is locked */ public function isDeactivated() { return $this->deactivated; } - + /** * Deactivates this account. */ @@ -2563,7 +2563,7 @@ class sambaSamAccount extends baseModule implements passwordService { } $this->attributes['sambaAcctFlags'][0] = $flags; } - + /** * Activates this account. */ @@ -2572,7 +2572,7 @@ class sambaSamAccount extends baseModule implements passwordService { $this->attributes['sambaAcctFlags'][0] = str_replace('D', '', $this->attributes['sambaAcctFlags'][0]); $this->attributes['sambaAcctFlags'][0] = str_replace(']', ' ]', $this->attributes['sambaAcctFlags'][0]); } - + } ?> diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index 47bbe2bb..84825fe3 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -37,7 +37,7 @@ $Id$ * @package modules */ class shadowAccount extends baseModule implements passwordService { - + /** * Creates a new shadowAccount object. * @@ -69,7 +69,7 @@ class shadowAccount extends baseModule implements passwordService { /** * Returns true if this module can manage accounts of the current type, otherwise false. - * + * * @return boolean true if module fits */ public function can_manage() { @@ -80,7 +80,7 @@ class shadowAccount extends baseModule implements passwordService { * Returns meta data that is interpreted by parent class * * @return array array with meta data - * + * * @see baseModule::get_metaData() */ function get_metaData() { @@ -318,7 +318,7 @@ class shadowAccount extends baseModule implements passwordService { $pwdWarnInput->setFieldSize(5); $pwdWarnInput->setValidationRule(htmlElement::VALIDATE_NUMERIC); $return->addElement($pwdWarnInput, true); - + $shPwdExpiration = ''; if (isset($this->attributes['shadowInactive'][0])) $shPwdExpiration = $this->attributes['shadowInactive'][0]; $pwdExpInput = new htmlTableExtendedInputField(_('Password expiration'), 'shadowInactive', $shPwdExpiration, 'shadowInactive'); @@ -326,7 +326,7 @@ class shadowAccount extends baseModule implements passwordService { $pwdExpInput->setFieldSize(5); $pwdExpInput->setValidationRule(htmlElement::VALIDATE_NUMERIC); $return->addElement($pwdExpInput, true); - + $shMinAge = ''; if (isset($this->attributes['shadowMin'][0])) $shMinAge = $this->attributes['shadowMin'][0]; $minAgeInput = new htmlTableExtendedInputField(_('Minimum password age'), 'shadowMin', $shMinAge, 'shadowMin'); @@ -334,7 +334,7 @@ class shadowAccount extends baseModule implements passwordService { $minAgeInput->setFieldSize(5); $minAgeInput->setValidationRule(htmlElement::VALIDATE_NUMERIC); $return->addElement($minAgeInput, true); - + $shMaxAge = ''; if (isset($this->attributes['shadowMax'][0])) $shMaxAge = $this->attributes['shadowMax'][0]; $maxAgeInput = new htmlTableExtendedInputField(_('Maximum password age'), 'shadowMax', $shMaxAge, 'shadowMax'); @@ -342,7 +342,7 @@ class shadowAccount extends baseModule implements passwordService { $maxAgeInput->setFieldSize(5); $maxAgeInput->setValidationRule(htmlElement::VALIDATE_NUMERIC); $return->addElement($maxAgeInput, true); - + $expirationDate = "     -      "; if (isset($this->attributes['shadowExpire'][0])) { $shAccExpirationDate = $this->attributes['shadowExpire'][0]; @@ -355,7 +355,7 @@ class shadowAccount extends baseModule implements passwordService { $expireTable->addElement(new htmlAccountPageButton('shadowAccount', 'expire', 'open', 'edit.png', true, _('Change'))); $return->addElement($expireTable); $return->addElement(new htmlHelpLink('shadowExpire'), true); - + $pwdChangeDate = "     -      "; if (isset($this->attributes['shadowLastChange'][0])) { $shPwdChangeDate = $this->attributes['shadowLastChange'][0]; @@ -371,7 +371,7 @@ class shadowAccount extends baseModule implements passwordService { } $return->addElement($pwdChangeTable); $return->addElement(new htmlHelpLink('shadowLastChange'), true); - + $return->addElement(new htmlOutputText(''), true); $remButton = new htmlAccountPageButton('shadowAccount', 'attributes', 'remObjectClass', _('Remove Shadow account extension')); $remButton->colspan = 4; @@ -433,9 +433,9 @@ class shadowAccount extends baseModule implements passwordService { null, null, null); } } - return $errors; + return $errors; } - + /** * This function will create the meta HTML code to show a page with the expiration date. * @@ -498,9 +498,9 @@ class shadowAccount extends baseModule implements passwordService { elseif (isset($_POST['form_subpage_shadowAccount_attributes_delPwdChange'])) { unset($this->attributes['shadowLastChange']); } - return $errors; + return $errors; } - + /** * This function will create the meta HTML code to show a page with the password change date. * @@ -654,13 +654,13 @@ class shadowAccount extends baseModule implements passwordService { /** * Specifies if this module supports to force that a user must change his password on next login. - * + * * @return boolean force password change supported */ public function supportsForcePasswordChange() { return true; } - + /** * This function is called whenever the password should be changed. Account modules * must change their password attributes only if the modules list contains their module name. @@ -702,7 +702,7 @@ class shadowAccount extends baseModule implements passwordService { $this->attributes['shadowExpire'][0] = intval(gmmktime(0, 0, 0, intval($month), intval($day), intval($year))/3600/24); } - + /** * Sets the last password change date of this account. * If all parameters are null the password change date will be removed. @@ -719,7 +719,7 @@ class shadowAccount extends baseModule implements passwordService { $this->attributes['shadowLastChange'][0] = intval(gmmktime(0, 0, 0, intval($month), intval($day), intval($year))/3600/24); } - + /** * Returns the meta HTML code for each input field. * format: array( => array(), ...) @@ -729,7 +729,7 @@ class shadowAccount extends baseModule implements passwordService { * @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 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) { $return = array(); @@ -742,9 +742,10 @@ class shadowAccount extends baseModule implements passwordService { $date = getdate($attributes['shadowLastChange'][0] * 3600 * 24); $shadowLastChange = $date['mday'] . "." . $date['mon'] . "." . $date['year']; } - $return['shadowLastChange'] = new htmlTableRow(array( - new htmlOutputText($this->getSelfServiceLabel('shadowLastChange', _('Last password change'))), new htmlOutputText($shadowLastChange) - )); + $row = new htmlResponsiveRow(); + $row->add(new htmlOutputText($this->getSelfServiceLabel('shadowLastChange', _('Last password change'))), 12, 6, 6, 'responsiveLabel'); + $row->add(new htmlOutputText($shadowLastChange), 12, 6, 6, 'responsiveField'); + $return['shadowLastChange'] = $row; } return $return; } diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index 6c73f105..f6cc59fb 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -149,6 +149,18 @@ table.collapse { text-align: right; } +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.bold { + font-weight: bold; +} + /** buttons */ .saveButton { background-image: url(../graphics/save.png) !important; @@ -661,7 +673,7 @@ h4.schema_oclass_sub { /** responsive styles */ div.dialog-page { - max-width: 45em; + float: left; } /* mobile */