Nick Clemens
7b23e92d5f
If we are coming from the "Modification logs" of the patron module we should not disable the checkboxes (that are not visible). Otherwise the logs are not longer filtered and all are visible. Test plan: 0. Don't apply this patch 1. Modify a patron, add them a fine, and do a checkout 2. Click the "Modification logs" => You see the Patrons and Circulation logs 3. Click submit => You see all the logs (KO) 4. Apply this patch 5. Click the "Modification logs" => You see the Patrons and Circulation logs 6. Click submit => You see the Patrons only (KO) 7. Apply the patch from bug 25249 8. Click the "Modification logs" => You see the Patrons and Circulation logs 9. Click submit => You see the Patrons and Circulation logs (OK!) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
64 lines
2 KiB
JavaScript
64 lines
2 KiB
JavaScript
function tickAll(section){
|
|
$("input[type='checkbox'][name='" + section + "']").prop("checked", true);
|
|
$("#" + section.slice(0,-1) + "ALL").prop("checked", true);
|
|
$("input[type='checkbox'][name='" + section + "']").prop("disabled", true);
|
|
$("#" + section.slice(0,-1) + "ALL").prop("disabled", false);
|
|
}
|
|
|
|
function untickAll(section){
|
|
$("input[type='checkbox'][name='" + section + "']").prop("checked", false);
|
|
$("input[type='checkbox'][name='" + section + "']").prop("disabled", false);
|
|
}
|
|
|
|
$(document).ready(function(){
|
|
|
|
if ( $('input[type="checkbox"][name="modules"]:checked').length == 0 ) {
|
|
tickAll('modules');
|
|
}
|
|
$("#moduleALL").change(function(){
|
|
if ( this.checked == true ){
|
|
tickAll('modules');
|
|
} else {
|
|
untickAll('modules');
|
|
}
|
|
});
|
|
$("input[type='checkbox'][name='modules']").change(function(){
|
|
if ( $("input[name='modules']:checked").length == $("input[name='modules']").length - 1 ){
|
|
tickAll('modules');
|
|
}
|
|
});
|
|
|
|
if ( $('input[name="actions"]:checked').length == 0 ) {
|
|
tickAll('actions');
|
|
}
|
|
$("#actionALL").change(function(){
|
|
if ( this.checked == true ){
|
|
tickAll('actions');
|
|
} else {
|
|
untickAll('actions');
|
|
}
|
|
|
|
});
|
|
$("input[name='actions']").change(function(){
|
|
if ( $("input[name='actions']:checked").length == $("input[name='actions']").length - 1 ){
|
|
tickAll('actions');
|
|
}
|
|
});
|
|
|
|
if ( $('input[name="interfaces"]:checked').length == 0 ) {
|
|
tickAll('interfaces');
|
|
}
|
|
$("#interfaceALL").change(function(){
|
|
if ( this.checked == true ){
|
|
tickAll('interfaces');
|
|
} else {
|
|
untickAll('interfaces');
|
|
}
|
|
|
|
});
|
|
$("input[name='interfaces']").change(function(){
|
|
if ( $("input[name='interfaces']:checked").length == $("input[name='interfaces']").length - 1 ){
|
|
tickAll('interfaces');
|
|
}
|
|
});
|
|
});
|