From 3f4190eae9960e38ff1edf024fd82c85acc7aed3 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Wed, 4 Sep 2024 14:45:44 +0200 Subject: [PATCH] Bug 14250: (follow-up) Refacto discharge messages display The script that determines if one should display messages to the user, informing him whether they are allowed or not to ask for a discharge is quite hard to understand. For sake of readability, transforming the unless to an if since the error behaviour was in the unless and the success in the else. Changing to success behaviour in the if and failure in the else. --- .../bootstrap/en/modules/opac-discharge.tt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt index f657a4e..641395b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt @@ -48,7 +48,13 @@

What is a discharge?

This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.

Warning: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.

- [% UNLESS can_be_discharged %] + [% IF can_be_discharged %] +
+ [% INCLUDE 'csrf-token.inc' %] + + +
+ [% ELSE %] [% IF failure %]

There was an error during the discharge process

[% END %] @@ -69,12 +75,6 @@ [% END %] - [% ELSE %] -
- [% INCLUDE 'csrf-token.inc' %] - - -
[% END %] [% END %] -- 2.43.0