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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt (+38 lines)
Lines 398-403 Link Here
398
                                    </fieldset>
398
                                    </fieldset>
399
                                </form>
399
                                </form>
400
                            </div>
400
                            </div>
401
                        [% ELSIF op == 'historycheck' %]
402
                            <h1>Request history check</h1>
403
                            <div id="results" class="page-section">
404
                                [% INCLUDE messages %]
405
                                <form method="post" id="historycheck-form">
406
                                    [%# This will get its name="op" value="cud-" from the loop over whole.keys below %]
407
                                    [% INCLUDE 'csrf-token.inc' %]
408
                                    <p>You have requested this interlibrary loan before:</p>
409
                                    [% IF matching_requests_for_patron.size %]
410
                                        <ul class="list-unstyled">
411
                                            [% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
412
                                                <li>
413
                                                    <a href="/cgi-bin/koha/opac-illrequests.pl?op=view&amp;illrequest_id=[% matching_request_for_patron.illrequest_id %]">ILL Request #[% matching_request_for_patron.illrequest_id %]</a>
414
                                                </li>
415
                                            [% END %]
416
                                        </ul>
417
                                    [% END %]
418
                                    <fieldset class="action">
419
                                        [% FOREACH key IN whole.keys %]
420
                                            [% value = whole.$key %]
421
                                            [% IF key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
422
                                            <input type="hidden" name="[% key | html %]" value="[% value | html %]">
423
                                            [% END %]
424
                                        [% END %]
425
                                        [% custom_keys = whole.custom_key.split('\0') %]
426
                                        [% custom_values = whole.custom_value.split('\0') %]
427
                                        [% i = 0 %]
428
                                        [% FOREACH custom_key IN custom_keys %]
429
                                            <input type="hidden" name="custom_key" value="[% custom_key | html %]">
430
                                            <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]">
431
                                        [% i = i + 1 %]
432
                                        [% END %]
433
                                        <input type="hidden" name="history_check_submitted" value="1">
434
                                        <input type="submit" class="btn btn-primary" value="Submit anyway" />
435
                                        <a class="action" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a>
436
                                    </fieldset>
437
                                </form>
438
                            </div>
401
                        [% ELSIF op == 'confirmautoill' %]
439
                        [% ELSIF op == 'confirmautoill' %]
402
                            <h1>Confirming automatic request</h1>
440
                            <h1>Confirming automatic request</h1>
403
                            <div id="results" class="page-section">
441
                            <div id="results" class="page-section">
(-)a/opac/opac-illrequests.pl (-2 / +17 lines)
Lines 35-40 use Koha::Libraries; Link Here
35
use Koha::Patrons;
35
use Koha::Patrons;
36
use Koha::ILL::Request::Workflow::Availability;
36
use Koha::ILL::Request::Workflow::Availability;
37
use Koha::ILL::Request::Workflow::ConfirmAuto;
37
use Koha::ILL::Request::Workflow::ConfirmAuto;
38
use Koha::ILL::Request::Workflow::HistoryCheck;
38
use Koha::ILL::Request::Workflow::TypeDisclaimer;
39
use Koha::ILL::Request::Workflow::TypeDisclaimer;
39
40
40
my $query = CGI->new;
41
my $query = CGI->new;
Lines 128-133 if ( $op eq 'list' ) { Link Here
128
            ->load_backend($params->{backend});
129
            ->load_backend($params->{backend});
129
130
130
        # Before request creation operations - Preparation
131
        # Before request creation operations - Preparation
132
        my $history_check =
133
          Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'opac' );
131
        my $availability =
134
        my $availability =
132
          Koha::ILL::Request::Workflow::Availability->new( $params, 'opac' );
135
          Koha::ILL::Request::Workflow::Availability->new( $params, 'opac' );
133
        my $type_disclaimer =
136
        my $type_disclaimer =
Lines 135-142 if ( $op eq 'list' ) { Link Here
135
        my $confirm_auto =
138
        my $confirm_auto =
136
          Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'opac' );
139
          Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'opac' );
137
140
141
        # ILLHistoryCheck operation
142
        if ($history_check->show_history_check($request)) {
143
            $op = 'historycheck';
144
            $template->param(
145
                $history_check->history_check_template_params($params)
146
            );
147
            output_html_with_http_headers $query, $cookie,
148
                $template->output, undef,
149
                { force_no_caching => 1 };
150
            exit;
138
        # ILLCheckAvailability operation
151
        # ILLCheckAvailability operation
139
        if ($availability->show_availability($request)) {
152
        } elsif ($availability->show_availability($request)) {
140
            $op = 'availability';
153
            $op = 'availability';
141
            $template->param(
154
            $template->param(
142
                $availability->availability_template_params($params)
155
                $availability->availability_template_params($params)
Lines 190-195 if ( $op eq 'list' ) { Link Here
190
                if ( $params->{type_disclaimer_submitted} ) {
203
                if ( $params->{type_disclaimer_submitted} ) {
191
                    $type_disclaimer->after_request_created( $params, $request );
204
                    $type_disclaimer->after_request_created( $params, $request );
192
                }
205
                }
206
                if ( C4::Context->preference('ILLHistoryCheck') ) {
207
                    $history_check->after_request_created( $params, $request );
208
                }
193
                if ( C4::Context->preference('ILLOpacUnauthenticatedRequest')  && !$patron ) {
209
                if ( C4::Context->preference('ILLOpacUnauthenticatedRequest')  && !$patron ) {
194
                    $op = 'unauth_view';
210
                    $op = 'unauth_view';
195
                } else {
211
                } else {
196
- 

Return to bug 38441