From f1c8559e88b2eba755606e852f888169a349a22b Mon Sep 17 00:00:00 2001
From: nina martinez
Date: Wed, 11 Jun 2025 17:19:48 +0200
Subject: [PATCH] Bug 40283: Your summary page.
This patch add role="status" and role="alert" to the Summary page. (opac-user)
Test plan:
1- Enable the system preference OpacReportProblem. If you have a checkout record, add a note. A message should appear: "Your note about ...". Inspect the html code and notice that there is a role="status" in the message tag.
2- Create a new patron account with a card expiration date set to tomorrow. Go to the OPAC, log in to this patron account? You should notice on your summary page a message: "Your library card will expire on ...". Inspect the html code and notice that there is a role="alert" in the message tag.
3- Go to the staff interface, patron details, and change the card expiration date to yesterday. Go back to the OPAC and you should now have the message: "Your account has expired as of...".
4-Go to the staff interface, choose your patron, click on more, and choose discharge.
5-Go back to the OPAC, log in to this patron account, and a message should appear: "Your account is frozen because it has been discharged." Inspect the HTML code and notice that there is a role='alert' in the message tag.
---
.../opac-tmpl/bootstrap/en/modules/opac-user.tt | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
index 1c63a78d03..8f0ab237de 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
@@ -60,10 +60,12 @@
Click here if you're not [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
- [% IF ( patronupdate ) %]Thank you!
Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.
[% END %]
+ [% IF ( patronupdate ) %]
+ Thank you!
Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.
+ [% END %]
[% IF failed_holds %]
-
+
Notice:
One or more holds were not placed due to following errors:
@@ -120,14 +122,14 @@
[% END %]
[% IF ( borrower.warndeparture ) %]
-
+
Please note: Your library card will expire on [% borrower.warndeparture | $KohaDates %]. Please contact the library for more information.
[% IF ( borrower.returnbeforeexpiry ) %] Also note that you must return all checked out items before your library card expires.[% END %]
[% END %]
[% IF ( borrower.warnexpired ) %]
-
+
Please note: Your account has expired as of [% borrower.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.
[% END %]
@@ -161,7 +163,7 @@
[% END %]
[% IF ( patron_flagged ) %]
-
+
[% IF ( userdebarred ) %]
[% IF ( discharge_available ) %]
@@ -196,7 +198,7 @@
Congratulations, you have saved a total of [% savings | $Price with_symbol => 1 %] by using the library.
[% END %]
-
+
[% IF ( OpacMySummaryNote ) %]
[% PROCESS koha_news_block news => OpacMySummaryNote %]
[% END %]
--
2.43.0