Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(resources): add default value to form checkboxes (#6421)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-radev authored and loiclau committed Jul 4, 2018
1 parent 1976abd commit ae03e57
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,11 @@
$tpl = new Smarty();
$tpl = initSmartyTpl($path, $tpl);

$formDefaults = $acl;
$formDefaults['all_hosts[all_hosts]'] = $formDefaults['all_hosts'];
$formDefaults['all_hostgroups[all_hostgroups]'] = $formDefaults['all_hostgroups'];
$formDefaults['all_servicegroups[all_servicegroups]'] = $formDefaults['all_servicegroups'];

if ($o == "w") {
/*
* Just watch a LCA information
Expand All @@ -491,15 +496,15 @@
"onClick" => "javascript:window.location.href='?p=" . $p . "&o=c&acl_id=" . $acl_id . "'",
"class" => "btc bt_success"
));
$form->setDefaults($acl);
$form->setDefaults($formDefaults);
$form->freeze();
} elseif ($o == "c") {
/*
* Modify a LCA information
*/
$subC = $form->addElement('submit', 'submitC', _("Save"), array("class" => "btc bt_success"));
$res = $form->addElement('reset', 'reset', _("Delete"), array("class" => "btc bt_danger"));
$form->setDefaults($acl);
$form->setDefaults($formDefaults);
} elseif ($o == "a") {
/*
* Add a LCA information
Expand Down

0 comments on commit ae03e57

Please sign in to comment.