From 8547c3b071de8a1666564eefbd5db4d1b38b215d Mon Sep 17 00:00:00 2001 From: jekkos Date: Fri, 9 Mar 2018 18:26:42 +0100 Subject: [PATCH] Fix employee form grants regression (#1870) --- application/views/employees/form.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/views/employees/form.php b/application/views/employees/form.php index 7f1950ae5..d7872f747 100644 --- a/application/views/employees/form.php +++ b/application/views/employees/form.php @@ -171,21 +171,21 @@ $(document).ready(function() return result; }, '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")); }); });