From 94feb6a491c2bbf2da31493999a7dcf154180f9a 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 20ff8ecf..14ddafd0 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt
@@ -49,7 +49,13 @@
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 %]
+
+ [% ELSE %]
[% IF failure %]
There was an error during the discharge process
[% END %]
@@ -67,12 +73,6 @@
[% END %]
- [% ELSE %]
-
[% END %]
[% END %]
--
2.30.2