mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-08 11:34:04 -04:00
Fix employee form grants regression (#1870)
This commit is contained in:
1 parent
bf30652a3d
commit
8547c3b071
1 file changed
+5
-5
@@ -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"));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user