From a8e770d9c49a88fbfd46c27b31d3eb2a413a1618 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 25 Sep 2023 22:11:39 -1000 Subject: [PATCH] Bug 34910: (follow-up) alert in patron details MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The anonymous patron details page should show an alert message. 1) Configure an existing borrowernumber in system preference 'AnonymousPatron' 2) Go to details page of this borrower : /cgi-bin/koha/members/moremember.pl?borrowernumber=x 3) Check you see alert 'This is the anonymous patron.' Signed-off-by: Kelly McElligott Signed-off-by: Johanna Miettunen Signed-off-by: Päivi Knuutinen Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 4 ++++ members/moremember.pl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 639d2a6547..911d2ecece 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -55,6 +55,10 @@ [% INCLUDE 'members-toolbar.inc' %] + [% IF is_anonymous %] +
This is the anonymous patron.
+ [% END %] + [% IF ( error ) %]
[% IF ( error == 'CANT_DELETE_STAFF' ) %] diff --git a/members/moremember.pl b/members/moremember.pl index 5813c8d87f..9770364804 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -75,6 +75,10 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log my $category_type = $patron->category->category_type; +if ( $patron->borrowernumber eq C4::Context->preference("AnonymousPatron") ) { + $template->param( is_anonymous => 1 ); +} + for (qw(gonenoaddress lost borrowernotes is_debarred)) { $patron->$_ and $template->param(flagged => 1) and last; }