From beb7f8a23a51e93869ec07df8c77dbc0b2fbbedd Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Wed, 1 Oct 2025 17:28:15 +0300 Subject: [PATCH] Bug 32483: Add OPAC notification on pending patron modification request To test: 1. Apply patch 2. In OPAC, submit updates to your patron details under "Personal details" 3. Navigate back to "Personal details" 4. Observe text "Your have recently submitted updates to your personal details. A librarian will review your updates before applying them." 5. In staff client, approve modification changes 6. Navigate back to OPAC "Personal details" 7. Observe the notification has disappeared --- .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 6 ++++++ opac/opac-memberentry.pl | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 3037f2efbda..471686dcae9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -162,6 +162,12 @@
You typed in the wrong characters in the box before submitting. Please try again.
[% END %] + [% IF patron_pending_modification %] +
+

Your have recently submitted updates to your personal details. A librarian will review your updates before applying them.

+
+ [% END %] + [% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 9517e8f1c55..e59604b0acc 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -387,6 +387,12 @@ if ( $op eq 'cud-create' ) { } $template->param( patron_attribute_classes => GeneratePatronAttributesForm($borrowernumber) ); + + my $patron_pending_modification = + Koha::Patron::Modifications->search( { borrowernumber => $patron->borrowernumber } )->next; + if ($patron_pending_modification) { + $template->param( patron_pending_modification => $patron_pending_modification ); + } } else { # Render self-registration page -- 2.34.1