Unister patch for business category in account profile

This commit is contained in:
Roland Gruber 2013-03-04 19:21:16 +00:00
parent 9a6eba0a49
commit dfe4cf0182
1 changed files with 10 additions and 0 deletions

View File

@ -195,6 +195,9 @@ class inetOrgPerson extends baseModule implements passwordService {
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideEmployeeType')) {
$profileElements[] = new htmlTableExtendedInputField(_('Employee type'), 'inetOrgPerson_employeeType', null, 'employeeType');
}
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideBusinessCategory')) {
$profileElements[] = new htmlTableExtendedInputField(_('Business category'), 'inetOrgPerson_businessCategory', null, 'businessCategory');
}
if (sizeof($profileElements) > 0) {
$profileContainer = new htmlTable();
for ($i = 0; $i < sizeof($profileElements); $i++) {
@ -224,6 +227,13 @@ class inetOrgPerson extends baseModule implements passwordService {
'error_message' => $this->messages['employeeType'][0]);
$return['profile_mappings']['inetOrgPerson_employeeType'] = 'employeeType';
}
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideBusinessCategory')) {
$return['profile_checks']['inetOrgPerson_businessCategory'] = array(
'type' => 'ext_preg',
'regex' => 'businessCategory',
'error_message' => $this->messages['businessCategory'][0]);
$return['profile_mappings']['inetOrgPerson_businessCategory'] = 'businessCategory';
}
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideStreet')) {
$return['profile_checks']['inetOrgPerson_street'] = array(
'type' => 'ext_preg',