From 1c0382238ae8a536b86871757cb20d73b63ab17e 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. Signed-off-by: Sukhmandeep Benipal --- .../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 f657a4e6dc..641395b641 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.34.1