Fix employee form grants regression (#1870)

This commit is contained in:
jekkos committed 2018-03-09 18:26:42 +01:00
1 parent bf30652a3d
commit 8547c3b071
1 file changed
+5 -5
+5 -5
View File
@@ -171,21 +171,21 @@ $(document).ready(function()
return result;
}, '<?php echo $this->lang->line('employees_subpermission_required'); ?>');
$("ul#permission_list > li > input[name='grants[]']").each(function()
$("ul#permission_list > li > input.module").each(function()
{
var $this = $(this);
$("ul > li > input", $this.parent()).each(function()
$("ul > li > input,select", $this.parent()).each(function()
{
var $that = $(this);
var updateCheckboxes = function (checked)
var updateInputs = function (checked)
{
$that.prop("disabled", !checked);
!checked && $that.prop("checked", false);
}
$this.change(function() {
updateCheckboxes($this.is(":checked"));
updateInputs($this.is(":checked"));
});
updateCheckboxes($this.is(":checked"));
updateInputs($this.is(":checked"));
});
});