Bug 33581: Disable sample holiday if libraries are not selected
If libraries are not selected we should not try to insert holidays, or the installer will fail with a missing FK. This patch simply disable and uncheck the checkbox when libraries are not going to be inserted. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
c4cb183ae1
commit
1137511e63
1 changed files with 9 additions and 0 deletions
|
@ -463,6 +463,15 @@
|
|||
$( container ).find("input").prop("checked", state);
|
||||
$( container ).find(".selectall,.deselectall").toggle();
|
||||
});
|
||||
function update_sample_libraries_holidays(){
|
||||
let checked = $("#sample_libraries").prop("checked");
|
||||
$("#sample_libraries_holidays").prop("disabled", !checked);
|
||||
if (!checked) {
|
||||
$("#sample_libraries_holidays").prop("checked", false);
|
||||
}
|
||||
};
|
||||
$("#sample_libraries").on("change", update_sample_libraries_holidays);
|
||||
$("#sample_libraries").change();
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in a new issue