Lines 88-98
$(document).ready(function(){
Link Here
|
88 |
}); |
88 |
}); |
89 |
|
89 |
|
90 |
$("#template_id").on("change", function() { |
90 |
$("#template_id").on("change", function() { |
91 |
if ( $(this).find(":selected").data("editor") ) { |
91 |
let option = $(this).find(":selected"); |
|
|
92 |
|
93 |
if ( option.data("editor") ) { |
92 |
$("#delete_template_submit").removeAttr("disabled"); |
94 |
$("#delete_template_submit").removeAttr("disabled"); |
93 |
} else { |
95 |
} else { |
94 |
$("#delete_template_submit").attr("disabled", "disabled"); |
96 |
$("#delete_template_submit").attr("disabled", "disabled"); |
95 |
} |
97 |
} |
|
|
98 |
|
99 |
if ( option.val() != 0 ) { |
100 |
$("#load_template_submit").removeAttr("disabled"); |
101 |
} else { |
102 |
$("#load_template_submit").attr("disabled", "disabled"); |
103 |
} |
96 |
}); |
104 |
}); |
97 |
$("#template_id").change(); // Trigger to enable delete button if patron's template is in use |
105 |
$("#template_id").change(); // Trigger to enable delete button if patron's template is in use |
98 |
$("#replace_template_id").on("change", function() { |
106 |
$("#replace_template_id").on("change", function() { |
99 |
- |
|
|