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>
This commit is contained in:
Fridolin Somers 2023-09-25 22:11:39 -10:00 committed by Tomas Cohen Arazi
parent aca49ca14b
commit a8e770d9c4
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 8 additions and 0 deletions

View file

@ -55,6 +55,10 @@
[% INCLUDE 'members-toolbar.inc' %] [% INCLUDE 'members-toolbar.inc' %]
[% IF is_anonymous %]
<div class="dialog alert">This is the anonymous patron.</div>
[% END %]
[% IF ( error ) %] [% IF ( error ) %]
<div class="dialog alert"> <div class="dialog alert">
[% IF ( error == 'CANT_DELETE_STAFF' ) %] [% 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; 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)) { for (qw(gonenoaddress lost borrowernotes is_debarred)) {
$patron->$_ and $template->param(flagged => 1) and last; $patron->$_ and $template->param(flagged => 1) and last;
} }