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 <kelly@bywatersolutions.com>
Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi>
Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8e770d9c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 83b251e91d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Fridolin Somers 2023-09-25 22:11:39 -10:00 committed by Matt Blenkinsop
parent d91b4f6eac
commit 1cae3b267a
2 changed files with 8 additions and 0 deletions

View file

@ -52,6 +52,10 @@
[% INCLUDE 'members-toolbar.inc' %]
[% IF is_anonymous %]
<div class="dialog alert">This is the anonymous patron.</div>
[% END %]
[% IF ( error ) %]
<div class="dialog alert">
[% IF ( error == 'CANT_DELETE_STAFF' ) %]

View file

@ -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;
}