From dd2a8b0debdf5be70193a339a6857c668e1047e2 Mon Sep 17 00:00:00 2001 From: Kevin Duret <duret.kevin@gmail.com> Date: Mon, 9 Apr 2018 14:00:17 +0200 Subject: [PATCH] fix(acl): fix select all checkbox in acl actions form (#6193) * fix(acl): fix select all checkbox in acl actions form --- .../actionsACL/formActionsAccess.ihtml | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/www/include/options/accessLists/actionsACL/formActionsAccess.ihtml b/www/include/options/accessLists/actionsACL/formActionsAccess.ihtml index e9263ae429..586c1c5e50 100644 --- a/www/include/options/accessLists/actionsACL/formActionsAccess.ihtml +++ b/www/include/options/accessLists/actionsACL/formActionsAccess.ihtml @@ -140,29 +140,29 @@ {literal} <script> - jQuery('input[name=all_service]').change(function(){ - if(jQuery(this).attr('checked')){ - jQuery('.serviceCheckbox input').attr('checked',true); - }else{ - jQuery('.serviceCheckbox input').attr('checked',false); - } - }); + jQuery('input[name=all_service]').change(function(){ + if (jQuery(this).prop('checked')) { + jQuery('.serviceCheckbox input').attr('checked',true); + } else { + jQuery('.serviceCheckbox input').attr('checked',false); + } + }); - jQuery('input[name=all_host]').change(function(){ - if(jQuery(this).attr('checked')){ - jQuery('.hostCheckbox input').attr('checked',true); - }else{ - jQuery('.hostCheckbox input').attr('checked',false); - } - }); + jQuery('input[name=all_host]').change(function(){ + if (jQuery(this).prop('checked')) { + jQuery('.hostCheckbox input').attr('checked',true); + } else { + jQuery('.hostCheckbox input').attr('checked',false); + } + }); - jQuery('input[name=all_engine]').change(function(){ - if(jQuery(this).attr('checked')){ - jQuery('.engineCheckbox input').attr('checked',true); - }else{ - jQuery('.engineCheckbox input').attr('checked',false); - } - }); + jQuery('input[name=all_engine]').change(function(){ + if (jQuery(this).prop('checked')) { + jQuery('.engineCheckbox input').attr('checked',true); + } else { + jQuery('.engineCheckbox input').attr('checked',false); + } + }); </script> {/literal} -- GitLab