Bug 42280: (QA follow-up) Split JS in restrictions to TT and non TT block. Auto tidy

This splits remaining JS into a block with and without TT interpolation. Auto tidy

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Jan Kissig 2026-06-09 12:20:10 +00:00 committed by Pedro Amorim
parent 1987d0a930
commit 5ce434644c
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 6 additions and 5 deletions

View File

@ -245,13 +245,14 @@
[% ex.code | $raw %]: '[% ex.display_text | $raw %]',
[% END %]
};
</script>
<script nonce="[% Koha.CSPNonce | $raw %]">
//Require fee limit if "Lift after payment" is set true
$("#lift_after_payment").on("change", function(){
if($(this).val() == 1){
$("#fee_limit").prop("required",true).after('<span class="required">Required</span>');
$("#lift_after_payment").on("change", function () {
if ($(this).val() == 1) {
$("#fee_limit").prop("required", true).after('<span class="required">Required</span>');
} else {
$("#fee_limit").prop("required",false).nextAll().remove();
$("#fee_limit").prop("required", false).nextAll().remove();
}
});
</script>