From b6ad642ba49a51c0df09a000ecec2420ed2f3192 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 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 --- 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; } -- 2.30.2