Skip to content

Commit

Permalink
fix(ldapselectfield): do not translate items
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Apr 20, 2022
1 parent 4084908 commit 0ede18d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions inc/field/ldapselectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use Session;
use RuleRightParameter;
use Glpi\Application\View\TemplateRenderer;
use PluginFormcreatorAbstractField;
use Toolbox;

class LdapselectField extends SelectField
Expand Down Expand Up @@ -250,6 +251,20 @@ public function parseAnswerValues($input, $nonDestructive = false): bool {
return true;
}

public function getTranslatableStrings(array $options = []) : array {
$strings = PluginFormcreatorAbstractField::getTranslatableStrings($options);

$params = [
'searchText' => '',
'id' => '',
'is_translated' => null,
'language' => '', // Mandatory if one of is_translated and is_untranslated is false
];
$options = array_merge($params, $options);

return $strings;
}

public function equals($value): bool {
return $this->value == $value;
}
Expand Down

0 comments on commit 0ede18d

Please sign in to comment.