Lines 463-476
Link Here
|
463 |
$( container ).find("input").prop("checked", state); |
463 |
$( container ).find("input").prop("checked", state); |
464 |
$( container ).find(".selectall,.deselectall").toggle(); |
464 |
$( container ).find(".selectall,.deselectall").toggle(); |
465 |
}); |
465 |
}); |
466 |
function update_sample_libraries_holidays(){ |
466 |
let required_text = _("(requires sample libraries)"); |
|
|
467 |
$("#sample_libraries_holidays, #sample_patrons").parent().after(" <span class='hint'>"+required_text+"</span>"); |
468 |
function update_sample_libraries_dependencies(){ |
467 |
let checked = $("#sample_libraries").prop("checked"); |
469 |
let checked = $("#sample_libraries").prop("checked"); |
468 |
$("#sample_libraries_holidays").prop("disabled", !checked); |
470 |
$("#sample_libraries_holidays, #sample_patrons").prop("disabled", !checked); |
469 |
if (!checked) { |
471 |
if (!checked) { |
470 |
$("#sample_libraries_holidays").prop("checked", false); |
472 |
$("#sample_libraries_holidays, #sample_patrons").prop("checked", false); |
471 |
} |
473 |
} |
472 |
}; |
474 |
}; |
473 |
$("#sample_libraries").on("change", update_sample_libraries_holidays); |
475 |
$("#sample_libraries").on("change", update_sample_libraries_dependencies); |
474 |
$("#sample_libraries").change(); |
476 |
$("#sample_libraries").change(); |
475 |
}); |
477 |
}); |
476 |
</script> |
478 |
</script> |
477 |
- |
|
|