PropertyModifierExtractFromDN: fix labels

This commit is contained in:
Thomas Gelf 2016-03-10 15:08:32 +01:00
parent 32124bbba9
commit 251155e89a

View File

@ -12,7 +12,7 @@ class PropertyModifierExtractFromDN extends PropertyModifierHook
public static function addSettingsFormFields(QuickForm $form) public static function addSettingsFormFields(QuickForm $form)
{ {
$form->addElement('select', 'dn_component', array( $form->addElement('select', 'dn_component', array(
'label' => 'On failure', 'label' => $form->translate('DN component'),
'description' => $form->translate('What should we extract from the DN?'), 'description' => $form->translate('What should we extract from the DN?'),
'multiOptions' => $form->optionalEnum(array( 'multiOptions' => $form->optionalEnum(array(
'cn' => $form->translate('The first (leftmost) CN'), 'cn' => $form->translate('The first (leftmost) CN'),
@ -24,7 +24,7 @@ class PropertyModifierExtractFromDN extends PropertyModifierHook
)); ));
$form->addElement('select', 'on_failure', array( $form->addElement('select', 'on_failure', array(
'label' => 'On failure', 'label' => $form->translate('On failure'),
'description' => $form->translate('What should we do if the desired part does not exist?'), 'description' => $form->translate('What should we do if the desired part does not exist?'),
'multiOptions' => $form->optionalEnum(array( 'multiOptions' => $form->optionalEnum(array(
'null' => $form->translate('Set no value (null)'), 'null' => $form->translate('Set no value (null)'),
@ -49,7 +49,7 @@ class PropertyModifierExtractFromDN extends PropertyModifierHook
$parts = LdapUtils::explodeDN($value); $parts = LdapUtils::explodeDN($value);
$result = null; $result = null;
switch($this->getSetting('dn_component')) { switch ($this->getSetting('dn_component')) {
case 'cn': case 'cn':
$result = $this->extractFirst($parts, 'cn'); $result = $this->extractFirst($parts, 'cn');
break; break;