Bug 26377: Simplify JS code
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d19d7bcc5
)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
10afd92e52
commit
3e2fb1ce24
1 changed files with 3 additions and 14 deletions
|
@ -739,20 +739,9 @@ $(document).ready(function() {
|
|||
});
|
||||
});
|
||||
|
||||
$("#serialsadditems-yes").on("change", function(){
|
||||
if( $(this).prop("checked") ){
|
||||
$(".use_items").show();
|
||||
} else {
|
||||
$(".use_items").hide().find("select").val("");
|
||||
}
|
||||
});
|
||||
|
||||
$("#serialsadditems-no").on("change", function(){
|
||||
if( $(this).prop("checked") ){
|
||||
$(".use_items").hide().find("select").val("");
|
||||
} else {
|
||||
$(".use_items").show();
|
||||
}
|
||||
$("input[name='serialsadditems']").on("change", function(){
|
||||
const display = $(this).val() == "1" ? "block" : "none";
|
||||
$(".use_items").css('display', display).find("select").val("")
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue