Bug 24606: (QA follow-up) Disable 'Apply template' button if no template is selected
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
02dd772290
commit
1e0fe4af21
1 changed files with 9 additions and 1 deletions
|
@ -88,11 +88,19 @@ $(document).ready(function(){
|
|||
});
|
||||
|
||||
$("#template_id").on("change", function() {
|
||||
if ( $(this).find(":selected").data("editor") ) {
|
||||
let option = $(this).find(":selected");
|
||||
|
||||
if ( option.data("editor") ) {
|
||||
$("#delete_template_submit").removeAttr("disabled");
|
||||
} else {
|
||||
$("#delete_template_submit").attr("disabled", "disabled");
|
||||
}
|
||||
|
||||
if ( option.val() != 0 ) {
|
||||
$("#load_template_submit").removeAttr("disabled");
|
||||
} else {
|
||||
$("#load_template_submit").attr("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
$("#template_id").change(); // Trigger to enable delete button if patron's template is in use
|
||||
$("#replace_template_id").on("change", function() {
|
||||
|
|
Loading…
Reference in a new issue