Skip to content

Commit

Permalink
fix(glpiselectfield,dropdownfield): entity restriction show / hide is…
Browse files Browse the repository at this point in the history
…sues

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Aug 4, 2021
1 parent 9fcc9c1 commit 72972f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/field/dropdownfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ public function getDesignSpecializationField(): array {
$additions .= '<td>';
$additions .= '</td>';
$additions .= '</tr>';

$additions .= '<tr class="plugin_formcreator_question_specific plugin_formcreator_dropdown">';
// This row will be generated by an AJAX request
$additions .= '</tr>';
$additions .= Html::scriptBlock("plugin_formcreator_changeDropdownItemtype($rand);");

$additions .= $this->getEntityRestrictSettiing();

// Service level specific
Expand Down Expand Up @@ -868,7 +870,7 @@ protected function getEntityRestrictSettiing() {

$html = '';

$html .= '<tr class="plugin_formcreator_entity_assignable">';
$html .= '<tr class="plugin_formcreator_question_specific plugin_formcreator_entity_assignable">';
$html .= '<td>';
$html .= '<label for="entity_restrict">' . __('Entity restriction', 'formcreator') . '</label>';
$html .= '</td>';
Expand Down
2 changes: 2 additions & 0 deletions inc/field/glpiselectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ public function getDesignSpecializationField(): array {
// This row will be generated by an AJAX request
$additions .= '</tr>';

$additions .= $this->getEntityRestrictSettiing();

return [
'label' => $label,
'field' => $field,
Expand Down

0 comments on commit 72972f9

Please sign in to comment.