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 322-327 Link Here
322
                                    </fieldset>
322
                                    </fieldset>
323
                                </form>
323
                                </form>
324
                            </div>
324
                            </div>
325
                        [% ELSIF op == 'historycheck' %]
326
                            <h1>Request history check</h1>
327
                            <div id="results" class="page-section">
328
                                [% INCLUDE messages %]
329
                                <form method="post" id="historycheck-form">
330
                                    [%# This will get its name="op" value="cud-" from the loop over whole.keys below %]
331
                                    [% INCLUDE 'csrf-token.inc' %]
332
                                    <p>You have requested this interlibrary loan before:</p>
333
                                    [% IF matching_requests_for_patron.size %]
334
                                        <ul class="list-unstyled">
335
                                            [% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
336
                                                <li>
337
                                                    <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>
338
                                                </li>
339
                                            [% END %]
340
                                        </ul>
341
                                    [% END %]
342
                                    <fieldset class="action">
343
                                        [% FOREACH key IN whole.keys %]
344
                                            [% value = whole.$key %]
345
                                            [% IF key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
346
                                                <input type="hidden" name="[% key | html %]" value="[% value | html %]" />
347
                                            [% END %]
348
                                        [% END %]
349
                                        [% custom_keys = whole.custom_key.split('\0') %]
350
                                        [% custom_values = whole.custom_value.split('\0') %]
351
                                        [% i = 0 %]
352
                                        [% FOREACH custom_key IN custom_keys %]
353
                                            <input type="hidden" name="custom_key" value="[% custom_key | html %]" />
354
                                            <input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
355
                                            [% i = i + 1 %]
356
                                        [% END %]
357
                                        <input type="hidden" name="history_check_submitted" value="1" />
358
                                        <input type="submit" class="btn btn-primary" value="Submit anyway" />
359
                                        <a class="action" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a>
360
                                    </fieldset>
361
                                </form>
362
                            </div>
325
                        [% ELSIF op == 'confirmautoill' %]
363
                        [% ELSIF op == 'confirmautoill' %]
326
                            <h1>Confirming request</h1>
364
                            <h1>Confirming request</h1>
327
                            <div id="results" class="page-section">
365
                            <div id="results" class="page-section">
(-)a/opac/opac-illrequests.pl (-3 / +16 lines)
Lines 37-42 use Koha::Libraries; Link Here
37
use Koha::Patrons;
37
use Koha::Patrons;
38
use Koha::ILL::Request::Workflow::Availability;
38
use Koha::ILL::Request::Workflow::Availability;
39
use Koha::ILL::Request::Workflow::ConfirmAuto;
39
use Koha::ILL::Request::Workflow::ConfirmAuto;
40
use Koha::ILL::Request::Workflow::HistoryCheck;
40
use Koha::ILL::Request::Workflow::TypeDisclaimer;
41
use Koha::ILL::Request::Workflow::TypeDisclaimer;
41
42
42
my $query = CGI->new;
43
my $query = CGI->new;
Lines 135-146 if ( $op eq 'list' ) { Link Here
135
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
136
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
136
137
137
        # Before request creation operations - Preparation
138
        # Before request creation operations - Preparation
139
        my $history_check   = Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'opac' );
138
        my $availability    = Koha::ILL::Request::Workflow::Availability->new( $params, 'opac' );
140
        my $availability    = Koha::ILL::Request::Workflow::Availability->new( $params, 'opac' );
139
        my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'opac' );
141
        my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'opac' );
140
        my $confirm_auto    = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'opac' );
142
        my $confirm_auto    = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'opac' );
141
143
142
        # ILLCheckAvailability operation
144
        # ILLHistoryCheck operation
143
        if ( $availability->show_availability($request) ) {
145
        if ( $history_check->show_history_check($request) ) {
146
            $op = 'historycheck';
147
            $template->param( $history_check->history_check_template_params($params) );
148
            output_html_with_http_headers $query, $cookie,
149
                $template->output, undef,
150
                { force_no_caching => 1 };
151
            exit;
152
153
            # ILLCheckAvailability operation
154
        } elsif ( $availability->show_availability($request) ) {
144
            $op = 'availability';
155
            $op = 'availability';
145
            $template->param( $availability->availability_template_params($params) );
156
            $template->param( $availability->availability_template_params($params) );
146
            output_html_with_http_headers $query, $cookie,
157
            output_html_with_http_headers $query, $cookie,
Lines 197-202 if ( $op eq 'list' ) { Link Here
197
                if ( $params->{type_disclaimer_submitted} ) {
208
                if ( $params->{type_disclaimer_submitted} ) {
198
                    $type_disclaimer->after_request_created( $params, $request );
209
                    $type_disclaimer->after_request_created( $params, $request );
199
                }
210
                }
211
                if ( C4::Context->preference('ILLHistoryCheck') ) {
212
                    $history_check->after_request_created( $params, $request );
213
                }
200
                if ( C4::Context->preference('ILLOpacUnauthenticatedRequest') && !$patron ) {
214
                if ( C4::Context->preference('ILLOpacUnauthenticatedRequest') && !$patron ) {
201
                    my $sessionID = $query->cookie('CGISESSID');
215
                    my $sessionID = $query->cookie('CGISESSID');
202
                    my $session   = C4::Auth::get_session($sessionID);
216
                    my $session   = C4::Auth::get_session($sessionID);
203
- 

Return to bug 38441