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 384-389 Link Here
384
                                    </fieldset>
384
                                    </fieldset>
385
                                </form>
385
                                </form>
386
                            </div>
386
                            </div>
387
                        [% ELSIF op == 'historycheck' %]
388
                            <h1>Request history check</h1>
389
                            <div id="results" class="page-section">
390
                                [% INCLUDE messages %]
391
                                <form method="post" id="historycheck-form">
392
                                    [%# This will get its name="op" value="cud-" from the loop over whole.keys below %]
393
                                    [% INCLUDE 'csrf-token.inc' %]
394
                                    <p>You have requested this interlibrary loan before:</p>
395
                                    [% IF matching_requests_for_patron.size %]
396
                                        <ul class="list-unstyled">
397
                                            [% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
398
                                                <li>
399
                                                    <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>
400
                                                </li>
401
                                            [% END %]
402
                                        </ul>
403
                                    [% END %]
404
                                    <fieldset class="action">
405
                                        [% FOREACH key IN whole.keys %]
406
                                            [% value = whole.$key %]
407
                                            [% IF key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
408
                                                <input type="hidden" name="[% key | html %]" value="[% value | html %]" />
409
                                            [% END %]
410
                                        [% END %]
411
                                        [% custom_keys = whole.custom_key.split('\0') %]
412
                                        [% custom_values = whole.custom_value.split('\0') %]
413
                                        [% i = 0 %]
414
                                        [% FOREACH custom_key IN custom_keys %]
415
                                            <input type="hidden" name="custom_key" value="[% custom_key | html %]" />
416
                                            <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
417
                                            [% i = i + 1 %]
418
                                        [% END %]
419
                                        <input type="hidden" name="history_check_submitted" value="1" />
420
                                        <input type="submit" class="btn btn-primary" value="Submit anyway" />
421
                                        <a class="action" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a>
422
                                    </fieldset>
423
                                </form>
424
                            </div>
387
                        [% ELSIF op == 'confirmautoill' %]
425
                        [% ELSIF op == 'confirmautoill' %]
388
                            <h1>Confirming automatic request</h1>
426
                            <h1>Confirming automatic request</h1>
389
                            <div id="results" class="page-section">
427
                            <div id="results" class="page-section">
(-)a/opac/opac-illrequests.pl (-3 / +16 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 124-135 if ( $op eq 'list' ) { Link Here
124
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
125
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
125
126
126
        # Before request creation operations - Preparation
127
        # Before request creation operations - Preparation
128
        my $history_check   = Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'opac' );
127
        my $availability    = Koha::ILL::Request::Workflow::Availability->new( $params, 'opac' );
129
        my $availability    = Koha::ILL::Request::Workflow::Availability->new( $params, 'opac' );
128
        my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'opac' );
130
        my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'opac' );
129
        my $confirm_auto    = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'opac' );
131
        my $confirm_auto    = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'opac' );
130
132
131
        # ILLCheckAvailability operation
133
        # ILLHistoryCheck operation
132
        if ( $availability->show_availability($request) ) {
134
        if ( $history_check->show_history_check($request) ) {
135
            $op = 'historycheck';
136
            $template->param( $history_check->history_check_template_params($params) );
137
            output_html_with_http_headers $query, $cookie,
138
                $template->output, undef,
139
                { force_no_caching => 1 };
140
            exit;
141
142
            # ILLCheckAvailability operation
143
        } elsif ( $availability->show_availability($request) ) {
133
            $op = 'availability';
144
            $op = 'availability';
134
            $template->param( $availability->availability_template_params($params) );
145
            $template->param( $availability->availability_template_params($params) );
135
            output_html_with_http_headers $query, $cookie,
146
            output_html_with_http_headers $query, $cookie,
Lines 180-185 if ( $op eq 'list' ) { Link Here
180
                if ( $params->{type_disclaimer_submitted} ) {
191
                if ( $params->{type_disclaimer_submitted} ) {
181
                    $type_disclaimer->after_request_created( $params, $request );
192
                    $type_disclaimer->after_request_created( $params, $request );
182
                }
193
                }
194
                if ( C4::Context->preference('ILLHistoryCheck') ) {
195
                    $history_check->after_request_created( $params, $request );
196
                }
183
                if ( C4::Context->preference('ILLOpacUnauthenticatedRequest') && !$patron ) {
197
                if ( C4::Context->preference('ILLOpacUnauthenticatedRequest') && !$patron ) {
184
                    $op = 'unauth_view';
198
                    $op = 'unauth_view';
185
                } else {
199
                } else {
186
- 

Return to bug 38441