Bug 16082: Display a friendly "patron does not exist" message if that's the case - circulation.pl
The major part of pages you can access from a patron detail page (menu) does not take into consideration the 'patron does not exist' case. If the borrowernumber is linked to a deleted patron, a friendly message should be displayed instead of an empty patron detail page. Test plan: Go on circ/circulation.pl?borrowernumber=424242 and circ/circulation.pl?borrowernumber=424242&batch=1 Notice the difference before and after this patch Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
parent
4a3404594f
commit
7aedcf643e
|
|
@ -537,7 +537,7 @@ foreach my $flag ( sort keys %$flags ) {
|
|||
}
|
||||
}
|
||||
|
||||
my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0;
|
||||
my $amountold = $borrower->{flags} ? $borrower->{flags}->{'CHARGES'}->{'message'} || 0 : 0;
|
||||
$amountold =~ s/^.*\$//; # remove upto the $, if any
|
||||
|
||||
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
[% SET destination = "circ" %]
|
||||
<title>Koha › Circulation
|
||||
[% IF borrowernumber %]
|
||||
[% IF borrowernumber and borrower%]
|
||||
› Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
|
||||
[% END %]
|
||||
</title>
|
||||
|
|
@ -50,7 +50,7 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
|
|||
|
||||
columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
|
||||
|
||||
[% IF ( borrowernumber ) %]
|
||||
[% IF borrowernumber and borrower %]
|
||||
if($.cookie("holdfor") != [% borrowernumber %]){
|
||||
$.removeCookie("holdfor", { path: '/' });
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ $(document).ready(function() {
|
|||
[% INCLUDE 'circ-search.inc' %]
|
||||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›
|
||||
[% IF ( borrowernumber ) %]
|
||||
[% IF borrowernumber and borrower %]
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> › [% INCLUDE 'patron-title.inc' %]
|
||||
[% ELSE %]
|
||||
<strong>Checkouts</strong>
|
||||
|
|
@ -149,7 +149,7 @@ $(document).ready(function() {
|
|||
<div class="yui-b">
|
||||
[% END %]
|
||||
|
||||
[% IF ( borrowernumber ) %]
|
||||
[% IF borrowernumber and borrower %]
|
||||
[% INCLUDE 'members-toolbar.inc' %]
|
||||
[% END %]
|
||||
|
||||
|
|
@ -599,7 +599,7 @@ No patron matched <span class="ex">[% message %]</span>
|
|||
|
||||
<!-- BARCODE ENTRY -->
|
||||
|
||||
[% IF ( borrowernumber ) %]
|
||||
[% IF borrowernumber and borrower %]
|
||||
<div class="yui-g">
|
||||
|
||||
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
|
||||
|
|
@ -977,13 +977,15 @@ No patron matched <span class="ex">[% message %]</span>
|
|||
[% END %]
|
||||
</div> <!-- reservesloop -->
|
||||
|
||||
[% END %] <!-- borrowernumber -->
|
||||
[% ELSE %]
|
||||
<div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
|
||||
[% END %] <!-- borrowernumber and borrower-->
|
||||
</div></div>
|
||||
[% END %]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
[% UNLESS ( borrowers ) %][% IF ( borrowernumber ) %]<div class="yui-b">
|
||||
[% UNLESS ( borrowers ) %][% IF borrowernumber and borrower %]<div class="yui-b">
|
||||
[% INCLUDE 'circ-menu.inc' %]
|
||||
</div>[% END %][% END %]
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
[% SET destination = "circ" %]
|
||||
<title>Koha › Circulation
|
||||
[% IF borrowernumber %]
|
||||
[% IF borrowernumber and borrower %]
|
||||
› Batch check out › Issuing items to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
|
||||
[% END %]
|
||||
</title>
|
||||
|
|
@ -42,7 +42,11 @@ $(document).ready(function() {
|
|||
[% INCLUDE 'circ-search.inc' %]
|
||||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl">Batch check out</a> › [% INCLUDE 'patron-title.inc' %]
|
||||
[% IF borrower and borrowernumber %]
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl">Batch check out</a> › [% INCLUDE 'patron-title.inc' %]
|
||||
[% ELSE %]
|
||||
Batch check out
|
||||
[% END %]
|
||||
</div>
|
||||
<div id="doc3" class="yui-t2">
|
||||
|
||||
|
|
@ -52,20 +56,20 @@ $(document).ready(function() {
|
|||
|
||||
<div class="yui-g">
|
||||
|
||||
[% IF ( borrowernumber ) %]
|
||||
[% IF borrowernumber and borrower %]
|
||||
[% INCLUDE 'members-toolbar.inc' %]
|
||||
[% END %]
|
||||
|
||||
[% IF NOT batch_allowed %]
|
||||
[% IF borrower and not batch_allowed %]
|
||||
<div class="dialog alert">You are not allowed to use batch checkout for this patron</div>
|
||||
[% ELSIF noissues and not checkout_infos %]
|
||||
[% ELSIF borrower and noissues and not checkout_infos %]
|
||||
<div class="dialog alert">
|
||||
Cannot check out!
|
||||
[% IF charges_is_blocker %]
|
||||
Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
|
||||
[% END %]
|
||||
</div>
|
||||
[% ELSIF NOT checkout_infos %]
|
||||
[% ELSIF borrower and not checkout_infos %]
|
||||
<form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
|
||||
<fieldset id="circ_circulation_issue">
|
||||
<label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
|
||||
|
|
@ -94,7 +98,7 @@ $(document).ready(function() {
|
|||
</fieldset>
|
||||
</form>
|
||||
|
||||
[% ELSE %]
|
||||
[% ELSIF borrower %]
|
||||
[% IF confirmation_needed && CAN_user_circulate_force_checkout %]
|
||||
<h3>Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
|
||||
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
|
||||
|
|
@ -276,13 +280,17 @@ $(document).ready(function() {
|
|||
</form>
|
||||
[% END %]
|
||||
|
||||
[% ELSE %]
|
||||
<div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
|
||||
[% END %]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
[% INCLUDE 'circ-menu.inc' %]
|
||||
</div>
|
||||
[% IF borrower %]
|
||||
<div class="yui-b">
|
||||
[% INCLUDE 'circ-menu.inc' %]
|
||||
</div>
|
||||
[% END %]
|
||||
</div>
|
||||
[% INCLUDE 'intranet-bottom.inc' %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue