View | Details | Raw Unified | Return to bug 643
Collapse All | Expand All

(-)a/circ/circulation.pl (-3 / +12 lines)
Lines 51-57 use Date::Calc qw( Link Here
51
  Date_to_Days
51
  Date_to_Days
52
);
52
);
53
use List::MoreUtils qw/uniq/;
53
use List::MoreUtils qw/uniq/;
54
54
use Digest::MD5 qw(md5_hex);
55
55
56
#
56
#
57
# PARAMETERS READING
57
# PARAMETERS READING
Lines 97-104 my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( Link Here
97
97
98
my $branches = GetBranches();
98
my $branches = GetBranches();
99
99
100
my $force_allow_issue = $query->param('forceallow') || 0;
101
102
my @failedrenews = $query->param('failedrenew');    # expected to be itemnumbers 
100
my @failedrenews = $query->param('failedrenew');    # expected to be itemnumbers 
103
our %renew_failed = ();
101
our %renew_failed = ();
104
for (@failedrenews) { $renew_failed{$_} = 1; }
102
for (@failedrenews) { $renew_failed{$_} = 1; }
Lines 217-224 if ($findborrower) { Link Here
217
}
215
}
218
216
219
# get the borrower information.....
217
# get the borrower information.....
218
219
my $force_allow_issue = '';
220
my $force_allow_code = '';
221
220
my $borrower;
222
my $borrower;
221
if ($borrowernumber) {
223
if ($borrowernumber) {
224
225
    #Create an individual param for force allow
226
    $force_allow_code = substr( md5_hex( $sessionID,  $loggedinuser, $borrowernumber ), 5, 4);
227
    $force_allow_issue = ($query->param('forceallow') eq $force_allow_code) || 0;
228
 
222
    $borrower = GetMemberDetails( $borrowernumber, 0 );
229
    $borrower = GetMemberDetails( $borrowernumber, 0 );
223
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
230
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
224
231
Lines 243-248 if ($borrowernumber) { Link Here
243
            flagged  => "1",
250
            flagged  => "1",
244
            noissues => ($force_allow_issue) ? 0 : "1",
251
            noissues => ($force_allow_issue) ? 0 : "1",
245
            forceallow => $force_allow_issue,
252
            forceallow => $force_allow_issue,
253
            forceallowcode => $force_allow_code,
246
            expired => "1",
254
            expired => "1",
247
            renewaldate => format_date("$renew_year-$renew_month-$renew_day")
255
            renewaldate => format_date("$renew_year-$renew_month-$renew_day")
248
        );
256
        );
Lines 408-413 foreach my $flag ( sort keys %$flags ) { Link Here
408
        $template->param(
416
        $template->param(
409
            noissues => ($force_allow_issue) ? 0 : 'true',
417
            noissues => ($force_allow_issue) ? 0 : 'true',
410
            forceallow => $force_allow_issue,
418
            forceallow => $force_allow_issue,
419
            forceallowcode => $force_allow_code,
411
        );
420
        );
412
        if ( $flag eq 'GNA' ) {
421
        if ( $flag eq 'GNA' ) {
413
            $template->param( gna => 'true' );
422
            $template->param( gna => 'true' );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-7 / +6 lines)
Lines 250-256 $(document).ready(function() { Link Here
250
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
250
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
251
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
251
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
252
252
253
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
253
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="[% forceallowcode %]">[% END %]
254
254
255
[% IF ( RESERVED ) %]
255
[% IF ( RESERVED ) %]
256
    <p>
256
    <p>
Lines 291-297 $(document).ready(function() { Link Here
291
[% END %]
291
[% END %]
292
292
293
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
293
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
294
    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
294
    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="[% forceallowcode %]">[% END %]
295
    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
295
    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
296
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
296
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
297
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
297
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
Lines 341-347 $(document).ready(function() { Link Here
341
                [% FOREACH book IN options %]
341
                [% FOREACH book IN options %]
342
                    <br />
342
                    <br />
343
                    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
343
                    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
344
                    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
344
                    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="[% forceallowcode %]">[% END %]
345
                        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
345
                        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
346
                        <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
346
                        <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
347
                        <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
347
                        <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
Lines 453-459 No patron matched <span class="ex">[% message %]</span> Link Here
453
<fieldset id="circ_circulation_selectborrower" class="brief">
453
<fieldset id="circ_circulation_selectborrower" class="brief">
454
    <legend>Patron selection</legend>
454
    <legend>Patron selection</legend>
455
455
456
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
456
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="[% forceallowcode %]">[% END %]
457
    <input type="hidden" name="branch" value="[% branch %]" />
457
    <input type="hidden" name="branch" value="[% branch %]" />
458
    <input type="hidden" name="printer" value="[% printer %]" />
458
    <input type="hidden" name="printer" value="[% printer %]" />
459
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
459
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
Lines 492-498 No patron matched <span class="ex">[% message %]</span> Link Here
492
        <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
492
        <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
493
    [% END %]
493
    [% END %]
494
494
495
    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
495
    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="[% forceallowcode %]">[% END %]
496
496
497
    <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
497
    <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
498
498
Lines 615-621 No patron matched <span class="ex">[% message %]</span> Link Here
615
615
616
[% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
616
[% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
617
<div class="override_debarment">
617
<div class="override_debarment">
618
<a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override debarment temporarily</a>
618
<a href="/cgi-bin/koha/circ/circulation.pl?forceallow=[% forceallowcode %]&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override debarment temporarily</a>
619
</div>
619
</div>
620
[% END %]
620
[% END %]
621
621
622
- 

Return to bug 643