diff --git a/lam/HISTORY b/lam/HISTORY index 87f595c4..3fbb4c5f 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -12,6 +12,7 @@ December 2013 4.4 -> Samba/Shadow: display password change date in self service -> Custom fields: support custom label and icon, auto-completion -> User self registration: support constant attribute values + -> Self service: allow to set custom field labels - fixed bugs: -> Format of photo in Personal tab (158) diff --git a/lam/docs/manual-sources/howto.xml b/lam/docs/manual-sources/howto.xml index be1781ea..2fc26cd4 100644 --- a/lam/docs/manual-sources/howto.xml +++ b/lam/docs/manual-sources/howto.xml @@ -6176,6 +6176,10 @@ objectclass: top used to show your users additional data on the self service page that must not be changed by themselves (e.g. first/last name). + Sometimes, you may want to set a custom label for an input + field. Click on the edit icon to set your own label text (Personal: + Department is relabeled as "Business unit" here). + diff --git a/lam/docs/manual-sources/images/conf5.jpg b/lam/docs/manual-sources/images/conf5.jpg index 6a635c80..65ee227a 100644 Binary files a/lam/docs/manual-sources/images/conf5.jpg and b/lam/docs/manual-sources/images/conf5.jpg differ diff --git a/lam/graphics/editNo.png b/lam/graphics/editNo.png new file mode 100644 index 00000000..e6ca46c3 Binary files /dev/null and b/lam/graphics/editNo.png differ diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 1b603af7..ce1c0189 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -1342,7 +1342,7 @@ abstract class baseModule { } } $container[$name] = new htmlTableRow(array( - new htmlOutputText($label), $field + new htmlOutputText($this->getSelfServiceLabel($name, $label)), $field )); } @@ -1476,6 +1476,7 @@ abstract class baseModule { * * @param String $fieldID field identifier * @param selfServiceProfile $profile currently edited profile + * @return boolean may be set read-only */ public function canSelfServiceFieldBeReadOnly($fieldID, $profile) { if (isset($this->meta['selfServiceReadOnlyFields']) && is_array($this->meta['selfServiceReadOnlyFields'])) { @@ -1483,6 +1484,35 @@ abstract class baseModule { } return false; } + + /** + * Returns if a self service field can be relabeled. + * + * @param String $fieldID field ID + * @param selfServiceProfile $profile currently edited profile + * @return boolean may be relabeled + */ + public function canSelfServiceFieldBeRelabeled($fieldID, $profile) { + if (isset($this->meta['selfServiceNoRelabelFields']) && is_array($this->meta['selfServiceNoRelabelFields'])) { + return !in_array($fieldID, $this->meta['selfServiceNoRelabelFields']); + } + return true; + } + + /** + * Returns the field label. This can be either the given default label or an override value from profile. + * + * @param String $fieldID field ID + * @param String $defaultLabel default label text + * @return String label + */ + protected function getSelfServiceLabel($fieldID, $defaultLabel) { + if (!$this->canSelfServiceFieldBeRelabeled($fieldID, $this->selfServiceSettings)) { + return $defaultLabel; + } + $key = get_class($this) . '_' . $fieldID; + return empty($this->selfServiceSettings->relabelFields[$key]) ? $defaultLabel : $this->selfServiceSettings->relabelFields[$key]; + } /** * Returns the meta HTML code for each input field. diff --git a/lam/lib/modules/asteriskAccount.inc b/lam/lib/modules/asteriskAccount.inc index 7617e215..0633b8b1 100644 --- a/lam/lib/modules/asteriskAccount.inc +++ b/lam/lib/modules/asteriskAccount.inc @@ -88,6 +88,8 @@ class asteriskAccount extends baseModule implements passwordService { $return['selfServiceFieldSettings'] = array( 'syncAsteriskPassword' => _('Sync Asterisk password with Unix password'), ); + // self service: fields that cannot be relabeled + $return['selfServiceNoRelabelFields'] = array('syncAsteriskPassword'); // help $return['help'] = array( 'AstAccountCallerID' => array( diff --git a/lam/lib/modules/asteriskVoicemail.inc b/lam/lib/modules/asteriskVoicemail.inc index 349142bd..0e1628c7 100644 --- a/lam/lib/modules/asteriskVoicemail.inc +++ b/lam/lib/modules/asteriskVoicemail.inc @@ -76,6 +76,8 @@ class asteriskVoicemail extends baseModule implements passwordService { $return['selfServiceFieldSettings'] = array( 'syncAsteriskVoicemailPassword' => _('Sync Asterisk password with Unix password'), ); + // self service: fields that cannot be relabeled + $return['selfServiceNoRelabelFields'] = array('syncAsteriskVoicemailPassword'); // help $return['help'] = array( 'AstContext' => array( diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 5d4b9f46..5aecb0ba 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -2417,7 +2417,7 @@ class inetOrgPerson extends baseModule implements passwordService { $firstNameField = new htmlOutputText($firstName); } $return['firstName'] = new htmlTableRow(array( - new htmlOutputText(_('First name')), $firstNameField + new htmlOutputText($this->getSelfServiceLabel('firstName', _('First name'))), $firstNameField )); } if (in_array('lastName', $fields)) { @@ -2428,7 +2428,7 @@ class inetOrgPerson extends baseModule implements passwordService { $lastNameField = new htmlOutputText($lastName); } $return['lastName'] = new htmlTableRow(array( - new htmlOutputText(_('Last name')), $lastNameField + new htmlOutputText($this->getSelfServiceLabel('lastName', _('Last name'))), $lastNameField )); } if (in_array('mail', $fields)) { @@ -2439,7 +2439,7 @@ class inetOrgPerson extends baseModule implements passwordService { $mailField = new htmlOutputText($mail); } $return['mail'] = new htmlTableRow(array( - new htmlOutputText(_('Email address')), $mailField + new htmlOutputText($this->getSelfServiceLabel('mail', _('Email address'))), $mailField )); } if (in_array('labeledURI', $fields)) { @@ -2450,7 +2450,7 @@ class inetOrgPerson extends baseModule implements passwordService { $labeledURIField = new htmlOutputText($labeledURI); } $return['labeledURI'] = new htmlTableRow(array( - new htmlOutputText(_('Web site')), $labeledURIField + new htmlOutputText($this->getSelfServiceLabel('labeledURI', _('Web site'))), $labeledURIField )); } if (in_array('telephoneNumber', $fields)) { @@ -2461,7 +2461,7 @@ class inetOrgPerson extends baseModule implements passwordService { $telephoneNumberField = new htmlOutputText($telephoneNumber); } $return['telephoneNumber'] = new htmlTableRow(array( - new htmlOutputText(_('Telephone number')), $telephoneNumberField + new htmlOutputText($this->getSelfServiceLabel('telephoneNumber', _('Telephone number'))), $telephoneNumberField )); } if (in_array('homePhone', $fields)) { @@ -2472,7 +2472,7 @@ class inetOrgPerson extends baseModule implements passwordService { $homePhoneField = new htmlOutputText($homePhone); } $return['homePhone'] = new htmlTableRow(array( - new htmlOutputText(_('Home telephone number')), $homePhoneField + new htmlOutputText($this->getSelfServiceLabel('homePhone', _('Home telephone number'))), $homePhoneField )); } if (in_array('mobile', $fields)) { @@ -2483,7 +2483,7 @@ class inetOrgPerson extends baseModule implements passwordService { $mobileField = new htmlOutputText($mobile); } $return['mobile'] = new htmlTableRow(array( - new htmlOutputText(_('Mobile telephone number')), $mobileField + new htmlOutputText($this->getSelfServiceLabel('mobile', _('Mobile telephone number'))), $mobileField )); } if (in_array('faxNumber', $fields)) { @@ -2494,7 +2494,7 @@ class inetOrgPerson extends baseModule implements passwordService { $faxNumberField = new htmlOutputText($faxNumber); } $return['faxNumber'] = new htmlTableRow(array( - new htmlOutputText(_('Fax number')), $faxNumberField + new htmlOutputText($this->getSelfServiceLabel('faxNumber', _('Fax number'))), $faxNumberField )); } if (in_array('street', $fields)) { @@ -2505,7 +2505,7 @@ class inetOrgPerson extends baseModule implements passwordService { $streetField = new htmlOutputText($street); } $return['street'] = new htmlTableRow(array( - new htmlOutputText(_('Street')), $streetField + new htmlOutputText($this->getSelfServiceLabel('street', _('Street'))), $streetField )); } if (in_array('postalAddress', $fields)) { @@ -2516,7 +2516,7 @@ class inetOrgPerson extends baseModule implements passwordService { $postalAddressField = new htmlOutputText($postalAddress); } $return['postalAddress'] = new htmlTableRow(array( - new htmlOutputText(_('Postal address')), $postalAddressField + new htmlOutputText($this->getSelfServiceLabel('postalAddress', _('Postal address'))), $postalAddressField )); } if (in_array('registeredAddress', $fields)) { @@ -2538,7 +2538,7 @@ class inetOrgPerson extends baseModule implements passwordService { $postalCodeField = new htmlOutputText($postalCode); } $return['postalCode'] = new htmlTableRow(array( - new htmlOutputText(_('Postal code')), $postalCodeField + new htmlOutputText($this->getSelfServiceLabel('postalCode', _('Postal code'))), $postalCodeField )); } if (in_array('postOfficeBox', $fields)) { @@ -2549,7 +2549,7 @@ class inetOrgPerson extends baseModule implements passwordService { $postOfficeBoxField = new htmlOutputText($postOfficeBox); } $return['postOfficeBox'] = new htmlTableRow(array( - new htmlOutputText(_('Post office box')), $postOfficeBoxField + new htmlOutputText($this->getSelfServiceLabel('postOfficeBox', _('Post office box'))), $postOfficeBoxField )); } if (in_array('roomNumber', $fields)) { @@ -2560,7 +2560,7 @@ class inetOrgPerson extends baseModule implements passwordService { $roomNumberField = new htmlOutputText($roomNumber); } $return['roomNumber'] = new htmlTableRow(array( - new htmlOutputText(_('Room number')), $roomNumberField + new htmlOutputText($this->getSelfServiceLabel('roomNumber', _('Room number'))), $roomNumberField )); } if (in_array('location', $fields)) { @@ -2571,7 +2571,7 @@ class inetOrgPerson extends baseModule implements passwordService { $lField = new htmlOutputText($l); } $return['location'] = new htmlTableRow(array( - new htmlOutputText(_('Location')), $lField + new htmlOutputText($this->getSelfServiceLabel('location', _('Location'))), $lField )); } if (in_array('state', $fields)) { @@ -2582,7 +2582,7 @@ class inetOrgPerson extends baseModule implements passwordService { $stField = new htmlOutputText($st); } $return['state'] = new htmlTableRow(array( - new htmlOutputText(_('State')), $stField + new htmlOutputText($this->getSelfServiceLabel('state', _('State'))), $stField )); } if (in_array('carLicense', $fields)) { @@ -2593,7 +2593,7 @@ class inetOrgPerson extends baseModule implements passwordService { $carLicenseField = new htmlOutputText($carLicense); } $return['carLicense'] = new htmlTableRow(array( - new htmlOutputText(_('Car license')), $carLicenseField + new htmlOutputText($this->getSelfServiceLabel('carLicense', _('Car license'))), $carLicenseField )); } if (in_array('officeName', $fields)) { @@ -2604,7 +2604,7 @@ class inetOrgPerson extends baseModule implements passwordService { $physicalDeliveryOfficeNameField = new htmlOutputText($physicalDeliveryOfficeName); } $return['officeName'] = new htmlTableRow(array( - new htmlOutputText(_('Office name')), $physicalDeliveryOfficeNameField + new htmlOutputText($this->getSelfServiceLabel('officeName', _('Office name'))), $physicalDeliveryOfficeNameField )); } if (in_array('businessCategory', $fields)) { @@ -2615,7 +2615,7 @@ class inetOrgPerson extends baseModule implements passwordService { $businessCategoryField = new htmlOutputText($businessCategory); } $return['businessCategory'] = new htmlTableRow(array( - new htmlOutputText(_('Business category')), $businessCategoryField + new htmlOutputText($this->getSelfServiceLabel('businessCategory', _('Business category'))), $businessCategoryField )); } if (in_array('jpegPhoto', $fields)) { @@ -2633,14 +2633,14 @@ class inetOrgPerson extends baseModule implements passwordService { $photoSubSub->addElement(new htmlInputFileUpload('replacePhotoFile')); $photoSub->addElement($photoSubSub); } - $photoRowCells = array(new htmlOutputText(_('Photo')), $photoSub); + $photoRowCells = array(new htmlOutputText($this->getSelfServiceLabel('jpegPhoto', _('Photo'))), $photoSub); $photoRow = new htmlTableRow($photoRowCells); $return['jpegPhoto'] = $photoRow; } elseif (!in_array('jpegPhoto', $readOnlyFields)) { $photoSub = new htmlTable(); $photoSub->addElement(new htmlTableExtendedInputFileUpload('photoFile', _('Add photo'))); - $photoRowCells = array(new htmlOutputText(_('Photo')), $photoSub); + $photoRowCells = array(new htmlOutputText($this->getSelfServiceLabel('jpegPhoto', _('Photo'))), $photoSub); $photoRow = new htmlTableRow($photoRowCells); $return['jpegPhoto'] = $photoRow; } @@ -2653,7 +2653,7 @@ class inetOrgPerson extends baseModule implements passwordService { $departmentNumberField = new htmlOutputText($departmentNumber); } $return['departmentNumber'] = new htmlTableRow(array( - new htmlOutputText(_('Department')), $departmentNumberField + new htmlOutputText($this->getSelfServiceLabel('departmentNumber', _('Department'))), $departmentNumberField )); } if (in_array('initials', $fields)) { @@ -2664,7 +2664,7 @@ class inetOrgPerson extends baseModule implements passwordService { $initialsField = new htmlOutputText($initials); } $return['initials'] = new htmlTableRow(array( - new htmlOutputText(_('Initials')), $initialsField + new htmlOutputText($this->getSelfServiceLabel('initials', _('Initials'))), $initialsField )); } if (in_array('title', $fields)) { @@ -2675,7 +2675,7 @@ class inetOrgPerson extends baseModule implements passwordService { $titleField = new htmlOutputText($title); } $return['title'] = new htmlTableRow(array( - new htmlOutputText(_('Job title')), $titleField + new htmlOutputText($this->getSelfServiceLabel('title', _('Job title'))), $titleField )); } if (in_array('userCertificate', $fields)) { @@ -2702,7 +2702,7 @@ class inetOrgPerson extends baseModule implements passwordService { $uploadStatus->setCSSClasses(array('qq-upload-list')); $uploadStatus->colspan = 7; $certTable->addElement($uploadStatus, true); - $certLabel = new htmlOutputText(_('User certificates')); + $certLabel = new htmlOutputText($this->getSelfServiceLabel('userCertificate', _('User certificates'))); $certLabel->alignment = htmlElement::ALIGN_TOP; $userCertificatesCells = array($certLabel, $certTable); $userCertificatesRow = new htmlTableRow($userCertificatesCells); diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index 3a91a1dc..5f06856e 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -764,7 +764,7 @@ class kolabUser extends baseModule { $delegateContainer->addElement(new htmlSelect('new_delegate_value', $delegates)); $delegateContainer->addElement(new htmlTableExtendedInputCheckbox('new_delegate', false, _("Add"), null, false), true); } - $delegateLabel = new htmlOutputText(_('Delegates')); + $delegateLabel = new htmlOutputText($this->getSelfServiceLabel('kolabDelegate', _('Delegates'))); $delegateLabel->alignment = htmlElement::ALIGN_TOP; $return['kolabDelegate'] = new htmlTableRow(array( $delegateLabel, $delegateContainer @@ -812,7 +812,7 @@ class kolabUser extends baseModule { $invitationContainer->addElement(new htmlSelect('invPol2', array_values($this->invitationPolicies))); $invitationContainer->addElement(new htmlTableExtendedInputCheckbox('addInvPol', false, _("Add"), null, false), true); } - $invitationLabel = new htmlOutputText(_('Invitation policy')); + $invitationLabel = new htmlOutputText($this->getSelfServiceLabel('kolabInvitationPolicy', _('Invitation policy'))); $invitationLabel->alignment = htmlElement::ALIGN_TOP; $return['kolabInvitationPolicy'] = new htmlTableRow(array( $invitationLabel, $invitationContainer diff --git a/lam/lib/modules/ldapPublicKey.inc b/lam/lib/modules/ldapPublicKey.inc index cd07a403..4b195c8e 100644 --- a/lam/lib/modules/ldapPublicKey.inc +++ b/lam/lib/modules/ldapPublicKey.inc @@ -227,7 +227,7 @@ class ldapPublicKey extends baseModule { $uploadStatus->setCSSClasses(array('qq-upload-list')); $uploadStatus->colspan = 7; $keyTable->addElement($uploadStatus, true); - $keyLabel = new htmlOutputText(_('SSH public keys')); + $keyLabel = new htmlOutputText($this->getSelfServiceLabel('sshPublicKey', _('SSH public keys'))); $keyLabel->alignment = htmlElement::ALIGN_TOP; $keyCells = array($keyLabel, $keyTable); $keyRow = new htmlTableRow($keyCells); diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index ccf96de1..f7735140 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -2432,7 +2432,7 @@ class posixAccount extends baseModule implements passwordService { if (in_array('password', $fields)) { $pwdTable = new htmlTable(); $pwdTable->colspan = 3; - $pwd1 = new htmlTableExtendedInputField(_('New password'), 'posixAccount_password'); + $pwd1 = new htmlTableExtendedInputField($this->getSelfServiceLabel('password', _('New password')), 'posixAccount_password'); $pwd1->setIsPassword(true); $pwdTable->addElement($pwd1, true); $pwd2 = new htmlTableExtendedInputField(_('Reenter password'), 'posixAccount_password2'); @@ -2453,7 +2453,7 @@ class posixAccount extends baseModule implements passwordService { $cnField = new htmlOutputText($cn); } $return['cn'] = new htmlTableRow(array( - new htmlOutputText(_('Common name')), $cnField + new htmlOutputText($this->getSelfServiceLabel('cn', _('Common name'))), $cnField )); } if (in_array('loginShell', $fields)) { @@ -2465,7 +2465,7 @@ class posixAccount extends baseModule implements passwordService { $loginShellField = new htmlOutputText($loginShell); } $return['loginShell'] = new htmlTableRow(array( - new htmlOutputText(_('Login shell')), $loginShellField + new htmlOutputText($this->getSelfServiceLabel('loginShell', _('Login shell'))), $loginShellField )); } return $return; diff --git a/lam/lib/modules/pykotaUser.inc b/lam/lib/modules/pykotaUser.inc index 99bd75bc..24bb8075 100644 --- a/lam/lib/modules/pykotaUser.inc +++ b/lam/lib/modules/pykotaUser.inc @@ -945,14 +945,14 @@ class pykotaUser extends baseModule { $pykotaBalance = ''; if (isset($attributes['pykotaBalance'][0])) $pykotaBalance = $attributes['pykotaBalance'][0]; $return['pykotaBalance'] = new htmlTableRow(array( - new htmlOutputText(_('Balance')), new htmlOutputText($pykotaBalance) + new htmlOutputText($this->getSelfServiceLabel('pykotaBalance', _('Balance'))), new htmlOutputText($pykotaBalance) )); } if (in_array('pykotaLifeTimePaid', $fields)) { $pykotaLifeTimePaid = ''; if (isset($attributes['pykotaLifeTimePaid'][0])) $pykotaLifeTimePaid = $attributes['pykotaLifeTimePaid'][0]; $return['pykotaLifeTimePaid'] = new htmlTableRow(array( - new htmlOutputText(_('Total paid')), new htmlOutputText($pykotaLifeTimePaid) + new htmlOutputText($this->getSelfServiceLabel('pykotaLifeTimePaid', _('Total paid'))), new htmlOutputText($pykotaLifeTimePaid) )); } // payment history @@ -981,7 +981,7 @@ class pykotaUser extends baseModule { $pykotaPayments->addNewLine(); } } - $pykotaPaymentsLabel = new htmlOutputText(_('Payment history')); + $pykotaPaymentsLabel = new htmlOutputText($this->getSelfServiceLabel('pykotaPayments', _('Payment history'))); $pykotaPaymentsLabel->alignment = htmlElement::ALIGN_TOP; $return['pykotaPayments'] = new htmlTableRow(array( $pykotaPaymentsLabel, $pykotaPayments @@ -1019,7 +1019,7 @@ class pykotaUser extends baseModule { $pykotaJobs->addElement($spacer); $pykotaJobs->addElement(new htmlOutputText($job['pykotatitle'][0]), true); } - $pykotaJobsLabel = new htmlOutputText(_('Job history')); + $pykotaJobsLabel = new htmlOutputText($this->getSelfServiceLabel('pykotaJobHistory', _('Job history'))); $pykotaJobsLabel->alignment = htmlElement::ALIGN_TOP; $return['pykotaJobHistory'] = new htmlTableRow(array( $pykotaJobsLabel, $pykotaJobs diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 4fba2926..ed0c59af 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -243,6 +243,8 @@ class sambaSamAccount extends baseModule implements passwordService { 'password' => _('Password'), 'sambaPwdLastSet' => _('Last password change (read-only)'), ); + // self service: fields that cannot be relabeled + $return['selfServiceNoRelabelFields'] = array('syncNTPassword', 'syncLMPassword', 'syncSambaPwdLastSet'); // help Entries $return['help'] = array ( "displayName" => array( @@ -2303,7 +2305,7 @@ class sambaSamAccount extends baseModule implements passwordService { if (in_array('password', $fields)) { $pwdTable = new htmlTable(); $pwdTable->colspan = 3; - $pwd1 = new htmlTableExtendedInputField(_('New password'), 'sambaSamAccount_password'); + $pwd1 = new htmlTableExtendedInputField($this->getSelfServiceLabel('password', _('New password')), 'sambaSamAccount_password'); $pwd1->setIsPassword(true); $pwdTable->addElement($pwd1, true); $pwd2 = new htmlTableExtendedInputField(_('Reenter password'), 'sambaSamAccount_password2'); @@ -2319,7 +2321,7 @@ class sambaSamAccount extends baseModule implements passwordService { $sambaPwdLastSet = date('d.m.Y H:i', $attributes['sambaPwdLastSet'][0]); } $return['sambaPwdLastSet'] = new htmlTableRow(array( - new htmlOutputText(_('Last password change')), new htmlOutputText($sambaPwdLastSet) + new htmlOutputText($this->getSelfServiceLabel('sambaPwdLastSet', _('Last password change'))), new htmlOutputText($sambaPwdLastSet) )); } return $return; diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index c1b4bea8..fe3996ec 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -690,7 +690,7 @@ class shadowAccount extends baseModule implements passwordService { $shadowLastChange = $date['mday'] . "." . $date['mon'] . "." . $date['year']; } $return['shadowLastChange'] = new htmlTableRow(array( - new htmlOutputText(_('Last password change')), new htmlOutputText($shadowLastChange) + new htmlOutputText($this->getSelfServiceLabel('shadowLastChange', _('Last password change'))), new htmlOutputText($shadowLastChange) )); } return $return; diff --git a/lam/lib/modules/windowsUser.inc b/lam/lib/modules/windowsUser.inc index 8fdcc8e9..241a7548 100644 --- a/lam/lib/modules/windowsUser.inc +++ b/lam/lib/modules/windowsUser.inc @@ -1559,7 +1559,7 @@ class windowsUser extends baseModule implements passwordService { if (in_array('unicodePwd', $fields)) { $pwdTable = new htmlTable(); $pwdTable->colspan = 3; - $pwd1 = new htmlTableExtendedInputField(_('New password'), 'windowsUser_unicodePwd'); + $pwd1 = new htmlTableExtendedInputField($this->getSelfServiceLabel('unicodePwd', _('New password')), 'windowsUser_unicodePwd'); $pwd1->setIsPassword(true); $pwdTable->addElement($pwd1, true); $pwd2 = new htmlTableExtendedInputField(_('Reenter password'), 'windowsUser_unicodePwd2'); diff --git a/lam/lib/selfService.inc b/lam/lib/selfService.inc index 99c01317..ae65f28c 100644 --- a/lam/lib/selfService.inc +++ b/lam/lib/selfService.inc @@ -352,6 +352,9 @@ class selfServiceProfile { */ public $readOnlyFields; + /** List of override values for field labels: array( => label) */ + public $relabelFields; + /** configuration settings of modules */ public $moduleSettings; @@ -386,6 +389,7 @@ class selfServiceProfile { 'fields' => array('posixAccount_password')) ); $this->readOnlyFields = array(); + $this->relabelFields = array(); } }