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

(-)a/ill/ill-requests.pl (-2 / +2 lines)
Lines 144-155 if ($backends_available) { Link Here
144
            $op = 'historycheck';
144
            $op = 'historycheck';
145
            $template->param( $history_check->history_check_template_params($params) )
145
            $template->param( $history_check->history_check_template_params($params) )
146
146
147
            # ILLCheckAvailability operation
147
                # ILLCheckAvailability operation
148
        } elsif ( $availability->show_availability($request) ) {
148
        } elsif ( $availability->show_availability($request) ) {
149
            $op = 'availability';
149
            $op = 'availability';
150
            $template->param( $availability->availability_template_params($params) )
150
            $template->param( $availability->availability_template_params($params) )
151
151
152
            # ILLModuleDisclaimerByType operation
152
                # ILLModuleDisclaimerByType operation
153
        } elsif ( $type_disclaimer->show_type_disclaimer($request) ) {
153
        } elsif ( $type_disclaimer->show_type_disclaimer($request) ) {
154
            $op = 'typedisclaimer';
154
            $op = 'typedisclaimer';
155
            $template->param( $type_disclaimer->type_disclaimer_template_params($params) );
155
            $template->param( $type_disclaimer->type_disclaimer_template_params($params) );
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/select_manager.inc (-14 / +5 lines)
Lines 1-21 Link Here
1
[% PROCESS 'patron-search.inc' %]
1
[% PROCESS 'patron-search.inc' %]
2
2
[% IF add_modal %]
3
[% IF add_modal %]
3
    [% SET columns = ['cardnumber','name','category','branch','action'] %]
4
    [% SET columns = ['cardnumber','name','category','branch','action'] %]
4
    [% SET filter = filter %]
5
    [% SET filter = filter %]
5
    [% PROCESS patron_search_modal
6
    [%# prettier-ignore-start %]
6
        columns => columns,
7
    [% PROCESS patron_search_modal columns => columns, modal_title => t("Select manager"), table_id => 'patron_search_modal_manager_table' %]
7
        modal_title => t("Select manager"),
8
    [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1, table_id => 'patron_search_modal_manager_table', callback => 'select_manager' empty_table_settings => 1 %]
8
        patron_search_modal_id => 'patron_search_modal_manager',
9
    [%# prettier-ignore-end %]
9
        table_id => 'patron_search_modal_manager_table'
10
    %]
11
    [% PROCESS patron_search_js
12
        columns => columns,
13
        actions => ["select"],
14
        preview_on_name_click => 1,
15
        table_id => 'patron_search_modal_manager_table',
16
        callback => 'select_manager'
17
        empty_table_settings => 1
18
    %]
19
[% END %]
10
[% END %]
20
<script>
11
<script>
21
    function select_manager(borrowernumber, borrower) {
12
    function select_manager(borrowernumber, borrower) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-587 / +586 lines)
Lines 80-660 Link Here
80
        [% END %]
80
        [% END %]
81
    [% END #/ WRAPPER breadcrumbs %]
81
    [% END #/ WRAPPER breadcrumbs %]
82
[% END #/ WRAPPER sub-header.inc %]
82
[% END #/ WRAPPER sub-header.inc %]
83
84
[% WRAPPER 'main-container.inc' wide_centered => ( op == 'illlist' ? 0 : 1 ) aside = ( op == 'illlist' ? 'ill-filter' : '' ) %]
83
[% WRAPPER 'main-container.inc' wide_centered => ( op == 'illlist' ? 0 : 1 ) aside = ( op == 'illlist' ? 'ill-filter' : '' ) %]
85
84
86
    [% IF op == 'illlist' %]
85
[% IF op == 'illlist' %]
87
        <script>
86
    <script>
88
            var ill_table_actions = [% table_actions | $raw %];
87
        var ill_table_actions = [% table_actions | $raw %];
89
        </script>
88
    </script>
90
    [% END %]
89
[% END %]
91
90
92
    <div id="interlibraryloans">
91
<div id="interlibraryloans">
93
        [% IF !backends_available || !has_branch || ill_deprecated_backend_freeform_is_installed %]
92
    [% IF !backends_available || !has_branch || ill_deprecated_backend_freeform_is_installed %]
94
            <div class="alert alert-info">ILL module configuration problem. Take a look at the <a href="/cgi-bin/koha/about.pl?tab=sysinfo">about page</a></div>
93
        <div class="alert alert-info">ILL module configuration problem. Take a look at the <a href="/cgi-bin/koha/about.pl?tab=sysinfo">about page</a></div>
95
        [% ELSE %]
94
    [% ELSE %]
96
            [% INCLUDE 'ill-toolbar.inc' %]
95
        [% INCLUDE 'ill-toolbar.inc' %]
97
            [% INCLUDE 'ill-batch-modal.inc' %]
96
        [% INCLUDE 'ill-batch-modal.inc' %]
98
97
99
            [% IF whole.error %]
98
        [% IF whole.error %]
100
                <h1>Error performing operation</h1>
99
            <h1>Error performing operation</h1>
101
                <!-- Dispatch on Status -->
100
            <!-- Dispatch on Status -->
102
                <p>We encountered an error:</p>
101
            <p>We encountered an error:</p>
103
                <p>
102
            <p>
104
                    [% SWITCH whole.status %]
103
                [% SWITCH whole.status %]
105
                    [% CASE 'invalid_patron' %]
104
                [% CASE 'invalid_patron' %]
106
                        <pre>The patron ID you entered is invalid.</pre>
105
                    <pre>The patron ID you entered is invalid.</pre>
107
                    [% CASE 'invalid_biblio' %]
106
                [% CASE 'invalid_biblio' %]
108
                        <pre>The bibliographic record ID you entered is invalid.</pre>
107
                    <pre>The bibliographic record ID you entered is invalid.</pre>
109
                    [% CASE %]
108
                [% CASE %]
110
                        <pre>[% whole.message | html %] ([% whole.status | html %])</pre>
109
                    <pre>[% whole.message | html %] ([% whole.status | html %])</pre>
111
                    [% END %]
110
                [% END %]
112
                </p>
111
            </p>
113
            [% END %]
112
        [% END %]
114
113
115
            [% IF whole.success %]
114
        [% IF whole.success %]
116
                <p>[% whole.success | html %]</p>
115
            <p>[% whole.success | html %]</p>
117
            [% END %]
116
        [% END %]
118
117
119
            [% IF op == 'cud-create' %]
118
        [% IF op == 'cud-create' %]
120
                <h1>New ILL request</h1>
119
            <h1>New ILL request</h1>
121
                [% PROCESS $whole.template %]
120
            [% PROCESS $whole.template %]
122
            [% ELSIF op == 'confirm' %]
121
        [% ELSIF op == 'confirm' %]
123
                <h1>Confirm ILL request</h1>
122
            <h1>Confirm ILL request</h1>
124
                [% PROCESS $whole.template %]
123
            [% PROCESS $whole.template %]
125
            [% ELSIF op == 'mark_completed' %]
124
        [% ELSIF op == 'mark_completed' %]
126
                <h1>Complete ILL request</h1>
125
            <h1>Complete ILL request</h1>
127
                <p>Proceeding with this action will set this request to 'Completed'.</p>
126
            <p>Proceeding with this action will set this request to 'Completed'.</p>
128
                <p>You can select a status alias from the available options:</p>
127
            <p>You can select a status alias from the available options:</p>
129
                [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %]
128
            [% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %]
130
                [% proceed_url = base_url _ "?method=mark_completed&stage=complete" _ "&illrequest_id=" _ request.illrequest_id %]
129
            [% proceed_url = base_url _ "?method=mark_completed&stage=complete" _ "&illrequest_id=" _ request.illrequest_id %]
131
                <form action="[% proceed_url | url %]" method="get">
130
            <form action="[% proceed_url | url %]" method="get">
132
                    <select name="status_alias">
131
                <select name="status_alias">
133
                        <option value="" selected></option>
132
                    <option value="" selected></option>
134
                        [% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
133
                    [% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
135
                            <option value="[% alias.authorised_value | html %]"> [% alias.lib | html %] </option>
134
                        <option value="[% alias.authorised_value | html %]"> [% alias.lib | html %] </option>
136
                        [% END %]
137
                    </select>
138
                    <input type="hidden" name="method" value="mark_completed" />
139
                    <input type="hidden" name="stage" value="complete" />
140
                    <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
141
                    <fieldset class="action">
142
                        <button type="submit" class="btn btn-sm btn-primary">Complete request</button>
143
                        <a class="btn btn-sm btn-default cancel" href="[% base_url | url %]">Cancel</a>
144
                    </fieldset>
145
                </form>
146
            [% ELSIF op == 'cud-cancel' and !whole.error %]
147
                <h1>Cancel a confirmed request</h1>
148
                [% PROCESS $whole.template %]
149
            [% ELSIF op == 'check_out' and !whole.error %]
150
                [% IF !whole.stage || whole.stage == 'form' %]
151
                    <h1 id="ill-issue-title">Issue requested item to [% INCLUDE 'patron-title.inc' patron = request.patron %]</h1>
152
                    [% IF !request.biblio_id || request.biblio_id.length == 0 %]
153
                        <div class="alert alert-warning">This item cannot be checked out as it has no bibliographic record associated with it</div>
154
                    [% END %]
155
                    [% IF whole.value.errors.itemcount %]
156
                        <div class="alert alert-warning">The bibliographic record for this request has multiple items, it should only have one. Please fix this then try again.</div>
157
                    [% END %]
158
                    [% IF whole.value.errors.item_creation %]
159
                        <div class="alert alert-warning">An unknown error occurred while trying to add an item</div>
160
                    [% END %]
161
                    [% IF whole.value.errors.item_check_out %]
162
                        <div class="alert alert-warning">An unknown error occurred while trying to check out the item</div>
163
                    [% END %]
164
                    [% IF whole.value.check_out_errors %]
165
                        [% IF whole.value.check_out_errors.error.STATS %]
166
                            <div class="alert alert-warning"> Local use recorded </div>
167
                        [% ELSIF whole.value.check_out_errors.error.UNKNOWN_BARCODE %]
168
                            <div class="alert alert-warning"> The bibliographic record's item contains an unknown (or empty) barcode. </div>
169
                        [% ELSE %]
170
                            <div class="alert alert-warning">
171
                                There was a problem checking this item out, please check for problems with the <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% whole.value.patron.borrowernumber | uri %]">patron's account</a>
172
                            </div>
173
                        [% END %]
174
                    [% END %]
175
                    [% IF request.biblio_id && request.biblio_id.length > 0  && !whole.value.check_out_errors.error.STATS %]
176
                        <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
177
                            [% INCLUDE 'csrf-token.inc' %]
178
                            <fieldset class="rows">
179
                                <legend>Check out details</legend>
180
                                [% items = whole.value.biblio.items.unblessed %]
181
                                [% IF items.size == 1 %]
182
                                    <p
183
                                        ><a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% whole.value.biblio.biblionumber | uri %]">The bibliographic record</a> for this request already has an item attached to it,
184
                                        you are about to check it out</p
185
                                    >
186
                                [% ELSE %]
187
                                    <p>A bibliographic record for this request exists, but no item. You are about to create an item and check it out</p>
188
                                [% END %]
189
                                <ol>
190
                                    <li class="ill_checkout_inhouse">
191
                                        <label for="inhouse" class="ill_checkout_inhouse_label">Statistical patron:</label>
192
                                        <select id="ill_checkout_inhouse_select" name="inhouse" class="ill_checkout_inhouse_select">
193
                                            <option value=""></option>
194
                                            [% FOREACH stat IN whole.value.statistical %]
195
                                                [% IF stat.borrowernumber == params.inhouse %]
196
                                                    <option value="[% stat.cardnumber | html %]" selected>[% INCLUDE 'patron-title.inc' patron = stat %]</option>
197
                                                [% ELSE %]
198
                                                    <option value="[% stat.cardnumber | html %]">[% INCLUDE 'patron-title.inc' patron = stat %]</option>
199
                                                [% END %]
200
                                            [% END %]
201
                                        </select>
202
                                        [% IF whole.value.errors.inhouse %]
203
                                            <span class="required">You must choose a valid patron</span>
204
                                        [% END %]
205
                                        <div class="hint"
206
                                            >If you do not wish to check out the item to [% INCLUDE 'patron-title.inc' patron = request.patron %] and would rather issue it to an in-house statistical patron, choose the patron here</div
207
                                        >
208
                                    </li>
209
                                    <li class="ill_checkout_item_type">
210
                                        <label for="item_type" class="ill_checkout_item_type_label required">Item type:</label>
211
                                        [% IF items.size != 1 %]
212
                                            <select id="ill_checkout_item_type_select" name="item_type" required>
213
                                                [% FOREACH type IN whole.value.itemtypes %]
214
                                                    <option value="[% type.itemtype | html %]" [% IF type.itemtype == params.item_type %]selected[% END %]> [% type.description | html %] </option>
215
                                                [% END %]
216
                                            </select>
217
                                        [% ELSE %]
218
                                            [% FOREACH type IN whole.value.itemtypes %]
219
                                                [% IF type.itemtype == items.0.itype %]
220
                                                    [% type.description | html %]
221
                                                [% END %]
222
                                            [% END %]
223
                                        [% END %]
224
                                        [% IF whole.value.errors.item_type %]
225
                                            <span class="required">You must choose an item type</span>
226
                                        [% END %]
227
                                    </li>
228
                                    [% IF items.size == 1 %]
229
                                        <li>
230
                                            <label for="barcode" class="ill_checkout_barcode_label">Item barcode:</label>
231
                                            [% items.0.barcode | html %]
232
                                        </li>
233
                                    [% END %]
234
                                    <li class="ill_checkout_branchcode">
235
                                        <label for="branchcode" class="ill_checkout_branchcode_label required">Library:</label>
236
                                        [% branchcode = items.size == 1 ? items.0.homebranch : params.branchcode ? params.branchcode : request.branchcode %]
237
                                        [% IF items.size != 1 %]
238
                                            <select name="branchcode" id="ill_checkout_branchcode_select" required>
239
                                                [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
240
                                            </select>
241
                                        [% ELSE %]
242
                                            [% FOREACH branch IN whole.value.libraries.unblessed %]
243
                                                [% IF branch.branchcode == branchcode %]
244
                                                    [% branch.branchname | html %]
245
                                                [% END %]
246
                                            [% END %]
247
                                        [% END %]
248
                                        [% IF whole.value.errors.branchcode %]
249
                                            <span class="required">You must choose a library</span>
250
                                        [% END %]
251
                                    </li>
252
                                    <li class="ill_checkout_due_date">
253
                                        <label for="duedate" class="ill_checkout_duedate_label">Due date:</label>
254
                                        <input name="duedate" id="ill_checkout_duedate_input" type="text" value="[% params.duedate | html %]" class="flatpickr" data-flatpickr-enable-time="true" /> [% INCLUDE 'date-format.inc' %]
255
                                        <div class="hint">If you do not specify a due date, it will be set according to circulation rules</div>
256
                                    </li>
257
                                </ol>
258
                            </fieldset>
259
                            <fieldset class="action">
260
                                <input type="hidden" value="cud-check_out" name="op" />
261
                                <input type="hidden" value="form" name="stage" />
262
                                [% IF items.size == 1 %]
263
                                    <input name="branchcode" type="hidden" value="[% branchcode | html %]" />
264
                                    <input name="item_type" type="hidden" value="[% items.0.itype | html %]" />
265
                                [% END %]
266
                                <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
267
                                <input type="submit" class="btn btn-primary" value="Submit" />
268
                                <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Cancel</a>
269
                            </fieldset>
270
                        </form>
271
                    [% END %]
135
                    [% END %]
272
                    [% IF whole.value.check_out_errors.error.STATS %]
136
                </select>
273
                        <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Return to request</a>
137
                <input type="hidden" name="method" value="mark_completed" />
274
                    [% END %]
138
                <input type="hidden" name="stage" value="complete" />
275
                [% ELSIF whole.stage == 'done_check_out' %]
139
                <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
276
                    <h1>Item checked out</h1>
140
                <fieldset class="action">
277
                    <fieldset class="rows">
141
                    <button type="submit" class="btn btn-sm btn-primary">Complete request</button>
278
                        <legend>Check out details</legend>
142
                    <a class="btn btn-sm btn-default cancel" href="[% base_url | url %]">Cancel</a>
279
                        <ol>
143
                </fieldset>
280
                            <li>
144
            </form>
281
                                <label>Checked out to:</label>
145
        [% ELSIF op == 'cud-cancel' and !whole.error %]
282
                                [% INCLUDE 'patron-title.inc' patron = whole.value.patron %]
146
            <h1>Cancel a confirmed request</h1>
283
                            </li>
147
            [% PROCESS $whole.template %]
284
                            <li>
148
        [% ELSIF op == 'check_out' and !whole.error %]
285
                                <label>Due date:</label>
149
            [% IF !whole.stage || whole.stage == 'form' %]
286
                                [% whole.value.check_out.date_due | $KohaDates as_due_date => 1 %]
150
                <h1 id="ill-issue-title">Issue requested item to [% INCLUDE 'patron-title.inc' patron = request.patron %]</h1>
287
                            </li>
151
                [% IF !request.biblio_id || request.biblio_id.length == 0 %]
288
                        </ol>
152
                    <div class="alert alert-warning">This item cannot be checked out as it has no bibliographic record associated with it</div>
289
                    </fieldset>
290
                    <fieldset class="action">
291
                        <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Return to request</a>
292
                    </fieldset>
293
                [% END %]
153
                [% END %]
294
            [% ELSIF op == 'generic_confirm' %]
154
                [% IF whole.value.errors.itemcount %]
295
                <h1>Place request with partner libraries</h1>
155
                    <div class="alert alert-warning">The bibliographic record for this request has multiple items, it should only have one. Please fix this then try again.</div>
296
                [% IF error %]
156
                [% END %]
297
                    [% IF error == 'no_target_email' %]
157
                [% IF whole.value.errors.item_creation %]
298
                        <div class="alert alert-warning"> No target email addresses found. Either select at least one partner or check your ILL partner library records. </div>
158
                    <div class="alert alert-warning">An unknown error occurred while trying to add an item</div>
299
                    [% ELSIF error == 'no_library_email' %]
159
                [% END %]
300
                        <div class="alert alert-warning"> Your library has no usable email address. Please set it. </div>
160
                [% IF whole.value.errors.item_check_out %]
301
                    [% ELSIF error == 'unkown_error' %]
161
                    <div class="alert alert-warning">An unknown error occurred while trying to check out the item</div>
302
                        <div class="alert alert-warning"> Unknown error processing your request. Contact your administrator. </div>
162
                [% END %]
163
                [% IF whole.value.check_out_errors %]
164
                    [% IF whole.value.check_out_errors.error.STATS %]
165
                        <div class="alert alert-warning"> Local use recorded </div>
166
                    [% ELSIF whole.value.check_out_errors.error.UNKNOWN_BARCODE %]
167
                        <div class="alert alert-warning"> The bibliographic record's item contains an unknown (or empty) barcode. </div>
168
                    [% ELSE %]
169
                        <div class="alert alert-warning">
170
                            There was a problem checking this item out, please check for problems with the <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% whole.value.patron.borrowernumber | uri %]">patron's account</a>
171
                        </div>
303
                    [% END %]
172
                    [% END %]
304
                [% END %]
173
                [% END %]
305
                <!-- Start of GENERIC_EMAIL case -->
174
                [% IF request.biblio_id && request.biblio_id.length > 0  && !whole.value.check_out_errors.error.STATS %]
306
                [% IF whole.value.partners %]
307
                    [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=" _ request.illrequest_id %]
308
                    <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
175
                    <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
309
                        [% INCLUDE 'csrf-token.inc' %]
176
                        [% INCLUDE 'csrf-token.inc' %]
310
                        <fieldset class="rows">
177
                        <fieldset class="rows">
311
                            <legend>Interlibrary loan request details</legend>
178
                            <legend>Check out details</legend>
179
                            [% items = whole.value.biblio.items.unblessed %]
180
                            [% IF items.size == 1 %]
181
                                <p
182
                                    ><a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% whole.value.biblio.biblionumber | uri %]">The bibliographic record</a> for this request already has an item attached to it, you
183
                                    are about to check it out</p
184
                                >
185
                            [% ELSE %]
186
                                <p>A bibliographic record for this request exists, but no item. You are about to create an item and check it out</p>
187
                            [% END %]
312
                            <ol>
188
                            <ol>
313
                                <li>
189
                                <li class="ill_checkout_inhouse">
314
                                    <label for="partner_filter">Filter partner libraries:</label>
190
                                    <label for="inhouse" class="ill_checkout_inhouse_label">Statistical patron:</label>
315
                                    <input type="text" id="partner_filter" />
191
                                    <select id="ill_checkout_inhouse_select" name="inhouse" class="ill_checkout_inhouse_select">
316
                                </li>
192
                                        <option value=""></option>
317
                                <li>
193
                                        [% FOREACH stat IN whole.value.statistical %]
318
                                    <label for="partners" class="required">Select partner libraries:</label>
194
                                            [% IF stat.borrowernumber == params.inhouse %]
319
                                    <select size="5" multiple="true" id="partners" name="partners" required="required">
195
                                                <option value="[% stat.cardnumber | html %]" selected>[% INCLUDE 'patron-title.inc' patron = stat %]</option>
320
                                        [% FOREACH partner IN whole.value.partners %]
196
                                            [% ELSE %]
321
                                            [% IF partner.email && partner.email.length > 0 %]
197
                                                <option value="[% stat.cardnumber | html %]">[% INCLUDE 'patron-title.inc' patron = stat %]</option>
322
                                                <option data-partner-id="[% partner.id | html %]" value="[% partner.borrowernumber | html %]"> [% partner.branchcode _ " - " _ partner.surname %] </option>
323
                                            [% END %]
198
                                            [% END %]
324
                                        [% END %]
199
                                        [% END %]
325
                                    </select>
200
                                    </select>
326
                                    [% IF Koha.Preference('ILLCheckAvailability') %]
201
                                    [% IF whole.value.errors.inhouse %]
327
                                        <div id="generic_confirm_search_count">Partners available for searching: <span id="generic_confirm_enabled">none</span></div>
202
                                        <span class="required">You must choose a valid patron</span>
328
                                        <div id="generic_confirm_search">
329
                                            <button type="button">Search selected partners</button>
330
                                        </div>
331
                                    [% END %]
203
                                    [% END %]
204
                                    <div class="hint"
205
                                        >If you do not wish to check out the item to [% INCLUDE 'patron-title.inc' patron = request.patron %] and would rather issue it to an in-house statistical patron, choose the patron here</div
206
                                    >
332
                                </li>
207
                                </li>
333
                                <li>
208
                                <li class="ill_checkout_item_type">
334
                                    <label for="subject" class="required">Subject line:</label>
209
                                    <label for="item_type" class="ill_checkout_item_type_label required">Item type:</label>
335
                                    <input type="text" name="subject" id="subject" type="text" value="[% whole.value.draft.subject | html %]" required="required" />
210
                                    [% IF items.size != 1 %]
211
                                        <select id="ill_checkout_item_type_select" name="item_type" required>
212
                                            [% FOREACH type IN whole.value.itemtypes %]
213
                                                <option value="[% type.itemtype | html %]" [% IF type.itemtype == params.item_type %]selected[% END %]> [% type.description | html %] </option>
214
                                            [% END %]
215
                                        </select>
216
                                    [% ELSE %]
217
                                        [% FOREACH type IN whole.value.itemtypes %]
218
                                            [% IF type.itemtype == items.0.itype %]
219
                                                [% type.description | html %]
220
                                            [% END %]
221
                                        [% END %]
222
                                    [% END %]
223
                                    [% IF whole.value.errors.item_type %]
224
                                        <span class="required">You must choose an item type</span>
225
                                    [% END %]
226
                                </li>
227
                                [% IF items.size == 1 %]
228
                                    <li>
229
                                        <label for="barcode" class="ill_checkout_barcode_label">Item barcode:</label>
230
                                        [% items.0.barcode | html %]
231
                                    </li>
232
                                [% END %]
233
                                <li class="ill_checkout_branchcode">
234
                                    <label for="branchcode" class="ill_checkout_branchcode_label required">Library:</label>
235
                                    [% branchcode = items.size == 1 ? items.0.homebranch : params.branchcode ? params.branchcode : request.branchcode %]
236
                                    [% IF items.size != 1 %]
237
                                        <select name="branchcode" id="ill_checkout_branchcode_select" required>
238
                                            [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
239
                                        </select>
240
                                    [% ELSE %]
241
                                        [% FOREACH branch IN whole.value.libraries.unblessed %]
242
                                            [% IF branch.branchcode == branchcode %]
243
                                                [% branch.branchname | html %]
244
                                            [% END %]
245
                                        [% END %]
246
                                    [% END %]
247
                                    [% IF whole.value.errors.branchcode %]
248
                                        <span class="required">You must choose a library</span>
249
                                    [% END %]
336
                                </li>
250
                                </li>
337
                                <li>
251
                                <li class="ill_checkout_due_date">
338
                                    <label for="body" class="required">Email text:</label>
252
                                    <label for="duedate" class="ill_checkout_duedate_label">Due date:</label>
339
                                    <textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea>
253
                                    <input name="duedate" id="ill_checkout_duedate_input" type="text" value="[% params.duedate | html %]" class="flatpickr" data-flatpickr-enable-time="true" /> [% INCLUDE 'date-format.inc' %]
254
                                    <div class="hint">If you do not specify a due date, it will be set according to circulation rules</div>
340
                                </li>
255
                                </li>
341
                            </ol>
256
                            </ol>
342
                            <input type="hidden" value="cud-generic_confirm" name="op" />
343
                            <input type="hidden" value="draft" name="stage" />
344
                            <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
345
                        </fieldset>
257
                        </fieldset>
346
                        <fieldset class="action">
258
                        <fieldset class="action">
347
                            <input type="submit" class="btn btn-primary" value="Send email" />
259
                            <input type="hidden" value="cud-check_out" name="op" />
348
                            <span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span>
260
                            <input type="hidden" value="form" name="stage" />
261
                            [% IF items.size == 1 %]
262
                                <input name="branchcode" type="hidden" value="[% branchcode | html %]" />
263
                                <input name="item_type" type="hidden" value="[% items.0.itype | html %]" />
264
                            [% END %]
265
                            <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
266
                            <input type="submit" class="btn btn-primary" value="Submit" />
267
                            <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Cancel</a>
349
                        </fieldset>
268
                        </fieldset>
350
                    </form>
269
                    </form>
351
                    [% IF Koha.Preference('ILLCheckAvailability') %]
352
                        <div id="partnerSearch" class="modal" tabindex="-1" role="dialog" aria-labelledby="partnerSearchLabel" aria-hidden="true">
353
                            <div class="modal-dialog">
354
                                <div class="modal-content">
355
                                    <div class="modal-header">
356
                                        <h1 class="modal-title" id="partnerSearchLabel"> Search partners</h1>
357
                                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
358
                                    </div>
359
                                    <div class="modal-body">
360
                                        [% FOR service IN services %]
361
                                            <h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
362
                                            [% INCLUDE 'ill-availability-table.inc' service=service %]
363
                                        [% END %]
364
                                        <span id="service_id_restrict" data-service_id_restrict_plugin="ILL availability - z39.50" data-service_id_restrict_ids=""></span>
365
                                    </div>
366
                                    <div class="modal-footer">
367
                                        <button class="btn btn-default" data-bs-dismiss="modal">Close</button>
368
                                    </div>
369
                                </div>
370
                            </div>
371
                        </div>
372
                    [% END %]
373
                [% ELSE %]
374
                    <fieldset class="rows">
375
                        <legend>Interlibrary loan request details</legend>
376
                        <p>No partners have been defined yet. Please create appropriate patron records (by default IL category).</p>
377
                        <p>Be sure to provide email addresses for these patrons.</p>
378
                        <p
379
                            ><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p
380
                        >
381
                    </fieldset>
382
                [% END %]
270
                [% END %]
383
                <!-- generic_confirm ends here -->
271
                [% IF whole.value.check_out_errors.error.STATS %]
384
            [% ELSIF op == 'edit_action' %]
272
                    <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Return to request</a>
385
                <form method="POST" id="ill_edit_action_form" action="/cgi-bin/koha/ill/ill-requests.pl">
273
                [% END %]
274
            [% ELSIF whole.stage == 'done_check_out' %]
275
                <h1>Item checked out</h1>
276
                <fieldset class="rows">
277
                    <legend>Check out details</legend>
278
                    <ol>
279
                        <li>
280
                            <label>Checked out to:</label>
281
                            [% INCLUDE 'patron-title.inc' patron = whole.value.patron %]
282
                        </li>
283
                        <li>
284
                            <label>Due date:</label>
285
                            [% whole.value.check_out.date_due | $KohaDates as_due_date => 1 %]
286
                        </li>
287
                    </ol>
288
                </fieldset>
289
                <fieldset class="action">
290
                    <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Return to request</a>
291
                </fieldset>
292
            [% END %]
293
        [% ELSIF op == 'generic_confirm' %]
294
            <h1>Place request with partner libraries</h1>
295
            [% IF error %]
296
                [% IF error == 'no_target_email' %]
297
                    <div class="alert alert-warning"> No target email addresses found. Either select at least one partner or check your ILL partner library records. </div>
298
                [% ELSIF error == 'no_library_email' %]
299
                    <div class="alert alert-warning"> Your library has no usable email address. Please set it. </div>
300
                [% ELSIF error == 'unkown_error' %]
301
                    <div class="alert alert-warning"> Unknown error processing your request. Contact your administrator. </div>
302
                [% END %]
303
            [% END %]
304
            <!-- Start of GENERIC_EMAIL case -->
305
            [% IF whole.value.partners %]
306
                [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=" _ request.illrequest_id %]
307
                <form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
386
                    [% INCLUDE 'csrf-token.inc' %]
308
                    [% INCLUDE 'csrf-token.inc' %]
387
                    <fieldset class="rows">
309
                    <fieldset class="rows">
388
                        <legend>Request details</legend>
310
                        <legend>Interlibrary loan request details</legend>
389
                        <ol>
311
                        <ol>
390
                            [% type = request.get_type %]
312
                            <li>
391
                            <li class="borrowernumber">
313
                                <label for="partner_filter">Filter partner libraries:</label>
392
                                <label for="borrowernumber">Patron ID:</label>
314
                                <input type="text" id="partner_filter" />
393
                                <input name="borrowernumber" id="borrowernumber" type="text" value="[% request.borrowernumber | html %]" />
394
                            </li>
395
                            [% PROCESS select_manager_form
396
                                manager => request.manager
397
                                required_permission => CAN_user_ill
398
                            %]
399
                            <li class="biblio_id">
400
                                <label for="biblio_id" class="biblio_id">Bibliographic record ID:</label>
401
                                <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id | html %]" />
402
                            </li>
403
                            <li class="branchcode">
404
                                <label for="library" class="branchcode">Library:</label>
405
                                <select name="branchcode" id="library">
406
                                    [% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
407
                                </select>
408
                            </li>
315
                            </li>
409
                            <li class="status">
316
                            <li>
410
                                <label class="status">Status:</label>
317
                                <label for="partners" class="required">Select partner libraries:</label>
411
                                [% stat = request.status %]
318
                                <select size="5" multiple="true" id="partners" name="partners" required="required">
412
                                [% current_alias = request.status_alias %]
319
                                    [% FOREACH partner IN whole.value.partners %]
413
                                <select id="status_alias" name="status_alias">
320
                                        [% IF partner.email && partner.email.length > 0 %]
414
                                    <option value="" [% UNLESS current_alias %]selected[% END %]> [% request.capabilities.$stat.name | html %] </option>
321
                                            <option data-partner-id="[% partner.id | html %]" value="[% partner.borrowernumber | html %]"> [% partner.branchcode _ " - " _ partner.surname %] </option>
415
                                    [% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
322
                                        [% END %]
416
                                        <option value="[% alias.authorised_value | html %]" [% IF alias.authorised_value == current_alias %]selected[% END %]> [% alias.lib | html %] </option>
417
                                    [% END %]
323
                                    [% END %]
418
                                </select>
324
                                </select>
325
                                [% IF Koha.Preference('ILLCheckAvailability') %]
326
                                    <div id="generic_confirm_search_count">Partners available for searching: <span id="generic_confirm_enabled">none</span></div>
327
                                    <div id="generic_confirm_search">
328
                                        <button type="button">Search selected partners</button>
329
                                    </div>
330
                                [% END %]
419
                            </li>
331
                            </li>
420
                            [% IF batches.count > 0 %]
332
                            <li>
421
                                <li class="batch">
333
                                <label for="subject" class="required">Subject line:</label>
422
                                    <label class="batch_label">Batch:</label>
334
                                <input type="text" name="subject" id="subject" type="text" value="[% whole.value.draft.subject | html %]" required="required" />
423
                                    <select id="batch_id" name="batch_id">
424
                                        <option value="">
425
                                            [% FOREACH batch IN batches %]
426
                                                <option value="[% batch.id | html %]" [% IF batch.id == request.batch_id %]selected[% END %]> [% batch.name | html %] </option>
427
                                            [% END %]
428
                                        </option></select
429
                                    >
430
                                </li>
431
                            [% END %]
432
                            <li class="updated">
433
                                <label class="updated">Last updated:</label>
434
                                [% request.updated | $KohaDates  with_hours => 1 %]
435
                            </li>
436
                            <li class="medium">
437
                                <label class="medium">Request type:</label>
438
                                [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
439
                            </li>
440
                            <li class="cost">
441
                                <label class="cost">Cost:</label>
442
                                [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
443
                            </li>
444
                            <li class="price_paid">
445
                                <label class="price_paid">Price paid:</label>
446
                                <input name="price_paid" id="price_paid" type="text" value="[% request.price_paid | html %]" />
447
                            </li>
448
                            <li class="req_id">
449
                                <label class="req_id">Request ID:</label>
450
                                [% request.id_prefix _ request.illrequest_id | html %]
451
                            </li>
452
                            <li class="notesstaff">
453
                                <label for="notesstaff" class="notesstaff">Staff notes:</label>
454
                                <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff | html %]</textarea>
455
                            </li>
335
                            </li>
456
                            <li class="notesopac">
336
                            <li>
457
                                <label for="notesopac" class="notesopac">OPAC notes:</label>
337
                                <label for="body" class="required">Email text:</label>
458
                                <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac | html %]</textarea>
338
                                <textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea>
459
                            </li>
339
                            </li>
460
                            [% IF stat == 'UNAUTH' %]
461
                                <h4>Unauthenticated request details</h4>
462
                                [% INCLUDE unauthenticated_details %]
463
                            [% END %]
464
                        </ol>
340
                        </ol>
341
                        <input type="hidden" value="cud-generic_confirm" name="op" />
342
                        <input type="hidden" value="draft" name="stage" />
343
                        <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
465
                    </fieldset>
344
                    </fieldset>
466
                    <fieldset class="action">
345
                    <fieldset class="action">
467
                        <input type="hidden" value="cud-edit_action" name="op" />
346
                        <input type="submit" class="btn btn-primary" value="Send email" />
468
                        <input type="hidden" value="form" name="stage" />
347
                        <span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span>
469
                        <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
470
                        <input type="submit" class="btn btn-primary" value="Submit" />
471
                        <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Cancel</a>
472
                    </fieldset>
348
                    </fieldset>
473
                </form>
349
                </form>
474
            [% ELSIF op == 'delete_confirm' %]
350
                [% IF Koha.Preference('ILLCheckAvailability') %]
475
                <div class="alert alert-warning">
351
                    <div id="partnerSearch" class="modal" tabindex="-1" role="dialog" aria-labelledby="partnerSearchLabel" aria-hidden="true">
476
                    <h3>Are you sure you wish to delete this request?</h3>
352
                        <div class="modal-dialog">
477
                    <form action="/cgi-bin/koha/ill/ill-requests.pl" method="post">
353
                            <div class="modal-content">
478
                        [% INCLUDE 'csrf-token.inc' %]
354
                                <div class="modal-header">
479
                        <input type="hidden" name="op" value="cud-delete" />
355
                                    <h1 class="modal-title" id="partnerSearchLabel"> Search partners</h1>
480
                        <input type="hidden" name="confirmed" value="1" />
356
                                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
481
                        <input type="hidden" name="illrequest_id" value="[% request.id | html %]" />
357
                                </div>
482
                        <button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
358
                                <div class="modal-body">
483
                    </form>
359
                                    [% FOR service IN services %]
484
                    <a class="btn btn-default deny" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]"><i class="fa fa-fw fa-times"></i>No, do not delete</a>
360
                                        <h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
485
                </div>
361
                                        [% INCLUDE 'ill-availability-table.inc' service=service %]
486
            [% ELSIF op == 'illview' %]
362
                                    [% END %]
487
                [% IF whole.template.length > 0 %]
363
                                    <span id="service_id_restrict" data-service_id_restrict_plugin="ILL availability - z39.50" data-service_id_restrict_ids=""></span>
488
                    [% PROCESS $whole.template %]
364
                                </div>
365
                                <div class="modal-footer">
366
                                    <button class="btn btn-default" data-bs-dismiss="modal">Close</button>
367
                                </div>
368
                            </div>
369
                        </div>
370
                    </div>
489
                [% END %]
371
                [% END %]
490
                [% req_status = request.status %]
372
            [% ELSE %]
373
                <fieldset class="rows">
374
                    <legend>Interlibrary loan request details</legend>
375
                    <p>No partners have been defined yet. Please create appropriate patron records (by default IL category).</p>
376
                    <p>Be sure to provide email addresses for these patrons.</p>
377
                    <p
378
                        ><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p
379
                    >
380
                </fieldset>
381
            [% END %]
382
            <!-- generic_confirm ends here -->
383
        [% ELSIF op == 'edit_action' %]
384
            <form method="POST" id="ill_edit_action_form" action="/cgi-bin/koha/ill/ill-requests.pl">
385
                [% INCLUDE 'csrf-token.inc' %]
386
                <fieldset class="rows">
387
                    <legend>Request details</legend>
388
                    <ol>
389
                        [% type = request.get_type %]
390
                        <li class="borrowernumber">
391
                            <label for="borrowernumber">Patron ID:</label>
392
                            <input name="borrowernumber" id="borrowernumber" type="text" value="[% request.borrowernumber | html %]" />
393
                        </li>
394
                        [%# prettier-ignore-start %]
395
                            [% PROCESS select_manager_form manager => request.manager required_permission => CAN_user_ill %]
396
                            [%# prettier-ignore-end %]
397
                        <li class="biblio_id">
398
                            <label for="biblio_id" class="biblio_id">Bibliographic record ID:</label>
399
                            <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id | html %]" />
400
                        </li>
401
                        <li class="branchcode">
402
                            <label for="library" class="branchcode">Library:</label>
403
                            <select name="branchcode" id="library">
404
                                [% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
405
                            </select>
406
                        </li>
407
                        <li class="status">
408
                            <label class="status">Status:</label>
409
                            [% stat = request.status %]
410
                            [% current_alias = request.status_alias %]
411
                            <select id="status_alias" name="status_alias">
412
                                <option value="" [% UNLESS current_alias %]selected[% END %]> [% request.capabilities.$stat.name | html %] </option>
413
                                [% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
414
                                    <option value="[% alias.authorised_value | html %]" [% IF alias.authorised_value == current_alias %]selected[% END %]> [% alias.lib | html %] </option>
415
                                [% END %]
416
                            </select>
417
                        </li>
418
                        [% IF batches.count > 0 %]
419
                            <li class="batch">
420
                                <label class="batch_label">Batch:</label>
421
                                <select id="batch_id" name="batch_id">
422
                                    <option value="">
423
                                        [% FOREACH batch IN batches %]
424
                                            <option value="[% batch.id | html %]" [% IF batch.id == request.batch_id %]selected[% END %]> [% batch.name | html %] </option>
425
                                        [% END %]
426
                                    </option></select
427
                                >
428
                            </li>
429
                        [% END %]
430
                        <li class="updated">
431
                            <label class="updated">Last updated:</label>
432
                            [% request.updated | $KohaDates  with_hours => 1 %]
433
                        </li>
434
                        <li class="medium">
435
                            <label class="medium">Request type:</label>
436
                            [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
437
                        </li>
438
                        <li class="cost">
439
                            <label class="cost">Cost:</label>
440
                            [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
441
                        </li>
442
                        <li class="price_paid">
443
                            <label class="price_paid">Price paid:</label>
444
                            <input name="price_paid" id="price_paid" type="text" value="[% request.price_paid | html %]" />
445
                        </li>
446
                        <li class="req_id">
447
                            <label class="req_id">Request ID:</label>
448
                            [% request.id_prefix _ request.illrequest_id | html %]
449
                        </li>
450
                        <li class="notesstaff">
451
                            <label for="notesstaff" class="notesstaff">Staff notes:</label>
452
                            <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff | html %]</textarea>
453
                        </li>
454
                        <li class="notesopac">
455
                            <label for="notesopac" class="notesopac">OPAC notes:</label>
456
                            <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac | html %]</textarea>
457
                        </li>
458
                        [% IF stat == 'UNAUTH' %]
459
                            <h4>Unauthenticated request details</h4>
460
                            [% INCLUDE unauthenticated_details %]
461
                        [% END %]
462
                    </ol>
463
                </fieldset>
464
                <fieldset class="action">
465
                    <input type="hidden" value="cud-edit_action" name="op" />
466
                    <input type="hidden" value="form" name="stage" />
467
                    <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
468
                    <input type="submit" class="btn btn-primary" value="Submit" />
469
                    <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]">Cancel</a>
470
                </fieldset>
471
            </form>
472
        [% ELSIF op == 'delete_confirm' %]
473
            <div class="alert alert-warning">
474
                <h3>Are you sure you wish to delete this request?</h3>
475
                <form action="/cgi-bin/koha/ill/ill-requests.pl" method="post">
476
                    [% INCLUDE 'csrf-token.inc' %]
477
                    <input type="hidden" name="op" value="cud-delete" />
478
                    <input type="hidden" name="confirmed" value="1" />
479
                    <input type="hidden" name="illrequest_id" value="[% request.id | html %]" />
480
                    <button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
481
                </form>
482
                <a class="btn btn-default deny" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]"><i class="fa fa-fw fa-times"></i>No, do not delete</a>
483
            </div>
484
        [% ELSIF op == 'illview' %]
485
            [% IF whole.template.length > 0 %]
486
                [% PROCESS $whole.template %]
487
            [% END %]
488
            [% req_status = request.status %]
491
489
492
                [% IF error %]
490
            [% IF error %]
493
                    [% IF error == 'migrate_target' %]
491
                [% IF error == 'migrate_target' %]
494
                        <div class="alert alert-warning"> The backend you tried to migrate to does not yet support migrations, please try again with an alternative target. </div>
492
                    <div class="alert alert-warning"> The backend you tried to migrate to does not yet support migrations, please try again with an alternative target. </div>
495
                    [% END %]
496
                [% END %]
493
                [% END %]
494
            [% END %]
497
495
498
                [% IF tran_success %]
496
            [% IF tran_success %]
499
                    [% succ_methods = [] %]
497
                [% succ_methods = [] %]
500
                    [% IF tran_success.match('email') %]
498
                [% IF tran_success.match('email') %]
501
                        [% succ_methods.push('email') %]
499
                    [% succ_methods.push('email') %]
502
                    [% END %]
503
                    [% IF tran_success.match('sms') %]
504
                        [% succ_methods.push('SMS') %]
505
                    [% END %]
506
                    <div class="alert alert-warning"> The requested notice was queued for delivery by [% succ_methods.join(', ') | html %] </div>
507
                [% END %]
500
                [% END %]
508
                [% IF tran_fail %]
501
                [% IF tran_success.match('sms') %]
509
                    [% fail_methods = [] %]
502
                    [% succ_methods.push('SMS') %]
510
                    [% IF tran_fail.match('email') %]
511
                        [% fail_methods.push('email') %]
512
                    [% END %]
513
                    [% IF tran_fail.match('sms') %]
514
                        [% fail_methods.push('SMS') %]
515
                    [% END %]
516
                    <div class="alert alert-warning"> The requested notice was NOT queued for delivery by [% fail_methods.join(', ') | html %] </div>
517
                [% END %]
503
                [% END %]
504
                <div class="alert alert-warning"> The requested notice was queued for delivery by [% succ_methods.join(', ') | html %] </div>
505
            [% END %]
506
            [% IF tran_fail %]
507
                [% fail_methods = [] %]
508
                [% IF tran_fail.match('email') %]
509
                    [% fail_methods.push('email') %]
510
                [% END %]
511
                [% IF tran_fail.match('sms') %]
512
                    [% fail_methods.push('SMS') %]
513
                [% END %]
514
                <div class="alert alert-warning"> The requested notice was NOT queued for delivery by [% fail_methods.join(', ') | html %] </div>
515
            [% END %]
518
516
519
                <h1>Manage ILL request [% request.id_prefix _ request.illrequest_id | html %]</h1>
517
            <h1>Manage ILL request [% request.id_prefix _ request.illrequest_id | html %]</h1>
520
                <div id="request-toolbar" class="btn-toolbar">
518
            <div id="request-toolbar" class="btn-toolbar">
521
                    [% FOREACH action IN request.available_actions %]
519
                [% FOREACH action IN request.available_actions %]
522
                        [% needs_prefs = action.needs_prefs.size ? action.needs_prefs : [] %]
520
                    [% needs_prefs = action.needs_prefs.size ? action.needs_prefs : [] %]
523
                        [% needs_perms = action.needs_perms.size ? action.needs_perms : [] %]
521
                    [% needs_perms = action.needs_perms.size ? action.needs_perms : [] %]
524
                        [% needs_all = action.needs_all.size ? action.needs_all : [] %]
522
                    [% needs_all = action.needs_all.size ? action.needs_all : [] %]
525
                        [% has_prefs_count = 0 %]
523
                    [% has_prefs_count = 0 %]
526
                        [% has_perms_count = 0 %]
524
                    [% has_perms_count = 0 %]
527
                        [% has_all_count = 0 %]
525
                    [% has_all_count = 0 %]
528
                        [% FOREACH pref IN needs_prefs %]
526
                    [% FOREACH pref IN needs_prefs %]
529
                            [% IF Koha.Preference(pref) %]
527
                        [% IF Koha.Preference(pref) %]
530
                                [% has_prefs_count = has_prefs_count + 1 %]
528
                            [% has_prefs_count = has_prefs_count + 1 %]
531
                            [% END %]
532
                        [% END %]
529
                        [% END %]
533
                        [% FOREACH perm IN needs_perms %]
530
                    [% END %]
534
                            [% perm_name = 'CAN_' _ perm %]
531
                    [% FOREACH perm IN needs_perms %]
535
                            [% IF ($perm_name) %]
532
                        [% perm_name = 'CAN_' _ perm %]
536
                                [% has_perms_count = has_perms_count + 1 %]
533
                        [% IF ($perm_name) %]
537
                            [% END %]
534
                            [% has_perms_count = has_perms_count + 1 %]
538
                        [% END %]
535
                        [% END %]
539
                        [% FOREACH func IN needs_all %]
536
                    [% END %]
540
                            [% IF func(request) %]
537
                    [% FOREACH func IN needs_all %]
541
                                [% has_all_count = has_all_count + 1 %]
538
                        [% IF func(request) %]
542
                            [% END %]
539
                            [% has_all_count = has_all_count + 1 %]
543
                        [% END %]
540
                        [% END %]
544
                        [% NEXT IF has_prefs_count < needs_prefs.size || has_perms_count < needs_perms.size || has_all_count < needs_all.size %]
541
                    [% END %]
545
                        [% IF action.method == 'migrate' %]
542
                    [% NEXT IF has_prefs_count < needs_prefs.size || has_perms_count < needs_perms.size || has_all_count < needs_all.size %]
546
                            [% IF Koha.Preference('AutoILLBackendPriority') && backends.size > 1 %]
543
                    [% IF action.method == 'migrate' %]
547
                                <a
544
                        [% IF Koha.Preference('AutoILLBackendPriority') && backends.size > 1 %]
548
                                    title="[% action.ui_method_name | html %]"
549
                                    id="ill-toolbar-btn-[% action.id | lower | html %]"
550
                                    class="btn btn-default"
551
                                    href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;auto_migrate=1"
552
                                >
553
                                    <span class="fa [% action.ui_method_icon | html %]"></span>
554
                                    [% action.ui_method_name | html %]
555
                                </a>
556
                            [% ELSIF backends.size > 2 %]
557
                                <div class="dropdown btn-group">
558
                                    <button class="btn btn-default dropdown-toggle" type="button" id="ill-migrate-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
559
                                        <i class="fa [% action.ui_method_icon | html %]"></i> [% action.ui_method_name | html %]
560
                                    </button>
561
                                    <ul class="dropdown-menu" aria-labelledby="ill-migrate-dropdown">
562
                                        [% FOREACH backend IN backends %]
563
                                            [% IF backend != request.backend %]
564
                                                <li
565
                                                    ><a class="dropdown-item" href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;backend=[% backend | uri %]"
566
                                                        >[% backend | html %]</a
567
                                                    ></li
568
                                                >
569
                                            [% END %]
570
                                        [% END %]
571
                                    </ul>
572
                                </div>
573
                            [% ELSIF backends.size == 2 %]
574
                                [% FOREACH backend IN backends %]
575
                                    [% IF backend != request.backend %]
576
                                        <a
577
                                            title="[% action.ui_method_name | html %]"
578
                                            id="ill-toolbar-btn-[% action.id | lower | html %]"
579
                                            class="btn btn-default"
580
                                            href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;backend=[% backend | uri %]"
581
                                        >
582
                                            <span class="fa [% action.ui_method_icon | html %]"></span>
583
                                            [% action.ui_method_name | html %]
584
                                        </a>
585
                                    [% END %]
586
                                [% END %]
587
                            [% END %]
588
                        [% ELSIF action.method != 0 %]
589
                            <a
545
                            <a
590
                                title="[% action.ui_method_name | html %]"
546
                                title="[% action.ui_method_name | html %]"
591
                                id="ill-toolbar-btn-[% action.id | lower | html %]"
547
                                id="ill-toolbar-btn-[% action.id | lower | html %]"
592
                                [% IF action.id == 'REQ' %]
548
                                class="btn btn-default"
593
                                    class="btn btn-primary"
549
                                href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;auto_migrate=1"
594
                                [% ELSE %]
595
                                    class="btn btn-default"
596
                                [% END %]
597
                                href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]"
598
                            >
550
                            >
599
                                <span class="fa [% action.ui_method_icon | html %]"></span>
551
                                <span class="fa [% action.ui_method_icon | html %]"></span>
600
                                [% action.ui_method_name | html %]
552
                                [% action.ui_method_name | html %]
601
                            </a>
553
                            </a>
602
                        [% END %]
554
                        [% ELSIF backends.size > 2 %]
603
                    [% END %]
555
                            <div class="dropdown btn-group">
604
                    <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?op=edit_action&amp;illrequest_id=[% request.illrequest_id | html %]">
556
                                <button class="btn btn-default dropdown-toggle" type="button" id="ill-migrate-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
605
                        <i class="fa-solid fa-pencil" aria-hidden="true"></i>
557
                                    <i class="fa [% action.ui_method_icon | html %]"></i> [% action.ui_method_name | html %]
606
                        Edit request
558
                                </button>
607
                    </a>
559
                                <ul class="dropdown-menu" aria-labelledby="ill-migrate-dropdown">
608
                    [% IF request.borrowernumber %]
560
                                    [% FOREACH backend IN backends %]
609
                        <div class="dropdown btn-group">
561
                                        [% IF backend != request.backend %]
610
                            <button class="btn btn-default dropdown-toggle" type="button" id="ill-notice-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
562
                                            <li
611
                                <i class="fa-solid fa-envelope"></i> Send notice to patron
563
                                                ><a class="dropdown-item" href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;backend=[% backend | uri %]"
612
                            </button>
564
                                                    >[% backend | html %]</a
613
                            <ul class="dropdown-menu" aria-labelledby="ill-notice-dropdown">
565
                                                ></li
614
                                [% FOREACH notice IN notices %]
566
                                            >
615
                                    <li
567
                                        [% END %]
616
                                        ><a class="dropdown-item" href="/cgi-bin/koha/ill/ill-requests.pl?op=send_notice&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;notice_code=[% notice.code | uri %]"
568
                                    [% END %]
617
                                            >[% notice.name | html %]</a
569
                                </ul>
618
                                        ></li
570
                            </div>
571
                        [% ELSIF backends.size == 2 %]
572
                            [% FOREACH backend IN backends %]
573
                                [% IF backend != request.backend %]
574
                                    <a
575
                                        title="[% action.ui_method_name | html %]"
576
                                        id="ill-toolbar-btn-[% action.id | lower | html %]"
577
                                        class="btn btn-default"
578
                                        href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;backend=[% backend | uri %]"
619
                                    >
579
                                    >
580
                                        <span class="fa [% action.ui_method_icon | html %]"></span>
581
                                        [% action.ui_method_name | html %]
582
                                    </a>
620
                                [% END %]
583
                                [% END %]
621
                            </ul>
622
                        </div>
623
                    [% END %]
624
                    <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default" href="#">
625
                        <span class="fa-solid fa-eye"></span>
626
                        Display supplier metadata
627
                    </a>
628
                    <a title="ILL request log" id="ill-request-display-log" class="btn btn-default" href="#">
629
                        <span class="fa-solid fa-calendar-days"></span>
630
                        ILL request log
631
                    </a>
632
                </div>
633
                <div class="page-section">
634
                    <h3>Request details</h3>
635
                    <h4>Details from library</h4>
636
                    [% IF request.get_copyright_clearance_confirmed %]
637
                        <h5> <i class="fa fa-fw fa-check text-success" aria-hidden="true"></i> <span class="tab-title">Patron has confirmed copyright clearance for this request</span> </h5>
638
                    [% END %]
639
                    <div class="rows">
640
                        <ol>
641
                            [% IF request.orderid %]
642
                                <li class="orderid">
643
                                    <span class="label orderid">Order ID:</span>
644
                                    [% request.orderid | html %]
645
                                </li>
646
                            [% END %]
584
                            [% END %]
647
                            [% IF request.borrowernumber %]
585
                        [% END %]
648
                                <li class="borrowernumber">
586
                    [% ELSIF action.method != 0 %]
649
                                    <span class="label borrowernumber">Patron:</span>
587
                        <a
650
                                    [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
588
                            title="[% action.ui_method_name | html %]"
651
                                    <a href="[% borrowerlink | url %]" title="View borrower details"> [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %] </a>
589
                            id="ill-toolbar-btn-[% action.id | lower | html %]"
652
                                </li>
590
                            [% IF action.id == 'REQ' %]
591
                                class="btn btn-primary"
592
                            [% ELSE %]
593
                                class="btn btn-default"
594
                            [% END %]
595
                            href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&amp;illrequest_id=[% request.illrequest_id | uri %]"
596
                        >
597
                            <span class="fa [% action.ui_method_icon | html %]"></span>
598
                            [% action.ui_method_name | html %]
599
                        </a>
600
                    [% END %]
601
                [% END %]
602
                <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?op=edit_action&amp;illrequest_id=[% request.illrequest_id | html %]">
603
                    <i class="fa-solid fa-pencil" aria-hidden="true"></i>
604
                    Edit request
605
                </a>
606
                [% IF request.borrowernumber %]
607
                    <div class="dropdown btn-group">
608
                        <button class="btn btn-default dropdown-toggle" type="button" id="ill-notice-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
609
                            <i class="fa-solid fa-envelope"></i> Send notice to patron
610
                        </button>
611
                        <ul class="dropdown-menu" aria-labelledby="ill-notice-dropdown">
612
                            [% FOREACH notice IN notices %]
613
                                <li
614
                                    ><a class="dropdown-item" href="/cgi-bin/koha/ill/ill-requests.pl?op=send_notice&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;notice_code=[% notice.code | uri %]"
615
                                        >[% notice.name | html %]</a
616
                                    ></li
617
                                >
653
                            [% END %]
618
                            [% END %]
654
                            [% PROCESS select_manager_show
619
                        </ul>
655
                                manager => request.manager
620
                    </div>
656
                                display => "fieldset"
621
                [% END %]
657
                            %]
622
                <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default" href="#">
623
                    <span class="fa-solid fa-eye"></span>
624
                    Display supplier metadata
625
                </a>
626
                <a title="ILL request log" id="ill-request-display-log" class="btn btn-default" href="#">
627
                    <span class="fa-solid fa-calendar-days"></span>
628
                    ILL request log
629
                </a>
630
            </div>
631
            <div class="page-section">
632
                <h3>Request details</h3>
633
                <h4>Details from library</h4>
634
                [% IF request.get_copyright_clearance_confirmed %]
635
                    <h5> <i class="fa fa-fw fa-check text-success" aria-hidden="true"></i> <span class="tab-title">Patron has confirmed copyright clearance for this request</span> </h5>
636
                [% END %]
637
                <div class="rows">
638
                    <ol>
639
                        [% IF request.orderid %]
640
                            <li class="orderid">
641
                                <span class="label orderid">Order ID:</span>
642
                                [% request.orderid | html %]
643
                            </li>
644
                        [% END %]
645
                        [% IF request.borrowernumber %]
646
                            <li class="borrowernumber">
647
                                <span class="label borrowernumber">Patron:</span>
648
                                [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
649
                                <a href="[% borrowerlink | url %]" title="View borrower details"> [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %] </a>
650
                            </li>
651
                        [% END %]
652
                        [%# prettier-ignore-start %]
653
                            [% PROCESS select_manager_show manager => request.manager display => "fieldset" %]
654
                            [%# prettier-ignore-start %]
658
                            [% IF request.biblio_id %]
655
                            [% IF request.biblio_id %]
659
                                <li class="biblio_id">
656
                                <li class="biblio_id">
660
                                    <span class="label biblio_id">Bibliographic record ID:</span>
657
                                    <span class="label biblio_id">Bibliographic record ID:</span>
Lines 1130-1221 Link Here
1130
    [% INCLUDE 'calendar.inc' %]
1127
    [% INCLUDE 'calendar.inc' %]
1131
    [% INCLUDE 'select2.inc' %]
1128
    [% INCLUDE 'select2.inc' %]
1132
    [% IF op == 'edit_action' %]
1129
    [% IF op == 'edit_action' %]
1133
        [% INCLUDE 'select_manager.inc'
1130
        [%# prettier-ignore-start %]
1134
            add_modal => 1
1131
        [% INCLUDE 'select_manager.inc' add_modal => 1 manager => request.manager filter => 'ill_users' %]
1135
            manager => request.manager
1132
        [%# prettier-ignore-end %]
1136
            filter => 'ill_users'
1133
                    </ol></div
1137
        %]
1134
                ></div
1138
    [% END %]
1135
            >
1139
    [% IF metadata_enrichment_services %]
1136
        [% END %]
1140
        <script>
1137
        [% IF metadata_enrichment_services %]
1141
            var ill_check_availability_syspref = '[% Koha.Preference('ILLCheckAvailability') | html %]';
1138
            <script>
1142
            var metadata_enrichment_services = [% metadata_enrichment_services | $raw %];
1139
                var ill_check_availability_syspref = '[% Koha.Preference('ILLCheckAvailability') | html %]';
1143
        </script>
1140
                var metadata_enrichment_services = [% metadata_enrichment_services | $raw %];
1141
            </script>
1142
            <script>
1143
                [% IF batch_availability_services %]
1144
                var batch_availability_services = [% batch_availability_services | $raw %];
1145
                [% ELSE %]
1146
                var batch_availability_services = [];
1147
                [% END %]
1148
            </script>
1149
        [% END %]
1144
        <script>
1150
        <script>
1145
            [% IF batch_availability_services %]
1151
            var prefilters = '[% prefilters | $raw %]';
1146
            var batch_availability_services = [% batch_availability_services | $raw %];
1152
            // Set column settings
1153
            var table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) | $raw %];
1154
1155
            [% IF services_json.length > 0 %]
1156
            var services = [% services_json | $raw %];
1157
            [% ELSE %]
1158
            var services = [];
1159
            [% END %]
1160
            [% IF auto_backends_json.length > 0 %]
1161
            var auto_backends = [% auto_backends_json | $raw %];
1147
            [% ELSE %]
1162
            [% ELSE %]
1148
            var batch_availability_services = [];
1163
            var auto_backends = [];
1164
            [% END %]
1165
            [% IF metadata.length > 0 %]
1166
            var metadata = "[% metadata | $raw %]";
1149
            [% END %]
1167
            [% END %]
1150
        </script>
1168
        </script>
1151
    [% END %]
1169
        <script>
1152
    <script>
1170
            $("#ill_checkout_inhouse_select").on("change", function () {
1153
        var prefilters = '[% prefilters | $raw %]';
1171
                if ($(this).val().length > 0) {
1154
        // Set column settings
1172
                    $(".ill_checkout_due_date").hide();
1155
        var table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) | $raw %];
1173
                } else {
1174
                    $(".ill_checkout_due_date").show();
1175
                }
1176
            });
1156
1177
1157
        [% IF services_json.length > 0 %]
1178
            if ($("#ill_edit_action_form #borrowernumber").length) {
1158
        var services = [% services_json | $raw %];
1179
                patron_autocomplete($("#ill_edit_action_form #borrowernumber"), {
1159
        [% ELSE %]
1180
                    "on-select-callback": function (event, ui) {
1160
        var services = [];
1181
                        $("#ill_edit_action_form #borrowernumber").val(ui.item.patron_id);
1182
                        return false;
1183
                    },
1184
                });
1185
            }
1186
        </script>
1187
        [% INCLUDE 'ill-list-table-strings.inc' %]
1188
        [% INCLUDE 'ill-batch-table-strings.inc' %]
1189
        [% INCLUDE 'ill-batch-modal-strings.inc' %]
1190
        [% Asset.js("js/ill-list-table.js") | $raw %]
1191
        [% Asset.js("js/ill-batch.js") | $raw %]
1192
        [% Asset.js("js/ill-batch-table.js") | $raw %]
1193
        [% Asset.js("js/ill-batch-modal.js") | $raw %]
1194
        [% IF (op == 'availability' || op == 'generic_confirm') && Koha.Preference('ILLCheckAvailability') %]
1195
            [% Asset.js("js/ill-availability.js") | $raw %]
1161
        [% END %]
1196
        [% END %]
1162
        [% IF auto_backends_json.length > 0 %]
1197
        [% IF (op == 'confirmautoill' && Koha.Preference('AutoILLBackendPriority')) %]
1163
        var auto_backends = [% auto_backends_json | $raw %];
1198
            [% Asset.js("js/ill-autobackend.js") | $raw %]
1164
        [% ELSE %]
1165
        var auto_backends = [];
1166
        [% END %]
1199
        [% END %]
1167
        [% IF metadata.length > 0 %]
1200
        [% IF op == 'availability' && Koha.Preference('ILLCheckAvailability') %]
1168
        var metadata = "[% metadata | $raw %]";
1201
            <script>
1202
                $(document).ready(function () {
1203
                    window.doSearch();
1204
                });
1205
            </script>
1169
        [% END %]
1206
        [% END %]
1170
    </script>
1207
        [% IF op == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
1171
    <script>
1208
            [% Asset.js("js/ill-availability-partner.js") | $raw %]
1172
        $("#ill_checkout_inhouse_select").on("change", function () {
1209
        [% END %]
1173
            if ($(this).val().length > 0) {
1210
        [% Asset.js("lib/jquery/plugins/multiple-select/multiple-select.min.js") | $raw %]
1174
                $(".ill_checkout_due_date").hide();
1175
            } else {
1176
                $(".ill_checkout_due_date").show();
1177
            }
1178
        });
1179
1180
        if ($("#ill_edit_action_form #borrowernumber").length) {
1181
            patron_autocomplete($("#ill_edit_action_form #borrowernumber"), {
1182
                "on-select-callback": function (event, ui) {
1183
                    $("#ill_edit_action_form #borrowernumber").val(ui.item.patron_id);
1184
                    return false;
1185
                },
1186
            });
1187
        }
1188
    </script>
1189
    [% INCLUDE 'ill-list-table-strings.inc' %]
1190
    [% INCLUDE 'ill-batch-table-strings.inc' %]
1191
    [% INCLUDE 'ill-batch-modal-strings.inc' %]
1192
    [% Asset.js("js/ill-list-table.js") | $raw %]
1193
    [% Asset.js("js/ill-batch.js") | $raw %]
1194
    [% Asset.js("js/ill-batch-table.js") | $raw %]
1195
    [% Asset.js("js/ill-batch-modal.js") | $raw %]
1196
    [% IF (op == 'availability' || op == 'generic_confirm') && Koha.Preference('ILLCheckAvailability') %]
1197
        [% Asset.js("js/ill-availability.js") | $raw %]
1198
    [% END %]
1199
    [% IF (op == 'confirmautoill' && Koha.Preference('AutoILLBackendPriority')) %]
1200
        [% Asset.js("js/ill-autobackend.js") | $raw %]
1201
    [% END %]
1202
    [% IF op == 'availability' && Koha.Preference('ILLCheckAvailability') %]
1203
        <script>
1204
            $(document).ready(function () {
1205
                window.doSearch();
1206
            });
1207
        </script>
1208
    [% END %]
1209
    [% IF op == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
1210
        [% Asset.js("js/ill-availability-partner.js") | $raw %]
1211
    [% END %]
1211
    [% END %]
1212
    [% Asset.js("lib/jquery/plugins/multiple-select/multiple-select.min.js") | $raw %]
1212
    <!-- prettier-ignore-start -->
1213
[% END %]
1214
<!-- prettier-ignore-start -->
1215
[% TRY %]
1213
[% TRY %]
1216
[% PROCESS backend_jsinclude %]
1214
[% PROCESS backend_jsinclude %]
1217
[% CATCH %]
1215
[% CATCH %]
1218
[% END %]
1216
[% END %]
1219
<!-- prettier-ignore-end -->
1217
<!-- prettier-ignore-end -->
1220
1218
1221
[% INCLUDE 'intranet-bottom.inc' %]
1219
    [% INCLUDE 'intranet-bottom.inc' %]
1220
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-23 / +10 lines)
Lines 258-268 Link Here
258
                                    [% END %]
258
                                    [% END %]
259
                                </td>
259
                                </td>
260
                            </tr>
260
                            </tr>
261
                            [%
261
                            [%# prettier-ignore-start %]
262
                                PROCESS select_manager_show
262
                            [% PROCESS select_manager_show manager => suggestion.manager display => "table" %]
263
                                manager => suggestion.manager
263
                            [%# prettier-ignore-end %]
264
                                display => "table"
265
                            %]
266
                            <tr>
264
                            <tr>
267
                                <th>Accepted on:</th>
265
                                <th>Accepted on:</th>
268
                                <td>[% suggestion.accepteddate | $KohaDates %]</td>
266
                                <td>[% suggestion.accepteddate | $KohaDates %]</td>
Lines 596-607 Link Here
596
                                    <label for="managedon">Managed on:</label>
594
                                    <label for="managedon">Managed on:</label>
597
                                    <input type="text" id="managedon" name="manageddate" class="flatpickr" size="10" maxlength="10" value="[% default_manageddate | html %]" />[% INCLUDE 'date-format.inc' %]
595
                                    <input type="text" id="managedon" name="manageddate" class="flatpickr" size="10" maxlength="10" value="[% default_manageddate | html %]" />[% INCLUDE 'date-format.inc' %]
598
                                </li>
596
                                </li>
599
                                [%
597
                                [% PROCESS select_manager_form manager => suggestion.manager notify_option => 1 required_permission => CAN_user_suggestions_suggestions_manage %]
600
                                    PROCESS select_manager_form
601
                                    manager => suggestion.manager
602
                                    notify_option => 1
603
                                    required_permission => CAN_user_suggestions_suggestions_manage
604
                                %]
605
                            </ol>
598
                            </ol>
606
                        </fieldset>
599
                        </fieldset>
607
600
Lines 881-893 Link Here
881
                                                            [% hash_href_val = "patron_search_modal_manager_" _ suggestion.suggestiontype %]
874
                                                            [% hash_href_val = "patron_search_modal_manager_" _ suggestion.suggestiontype %]
882
                                                            [% id_val = "set_manager_" _ suggestion.suggestiontype %]
875
                                                            [% id_val = "set_manager_" _ suggestion.suggestiontype %]
883
                                                            [% data_tab_val = suggestion.suggestiontype %]
876
                                                            [% data_tab_val = suggestion.suggestiontype %]
884
877
                                                            [%# prettier-ignore-start %]
885
                                                            [%
878
                                                            [% PROCESS select_manager_button href = hash_href_val id = id_val data_tab = data_tab_val %]
886
                                                                PROCESS select_manager_button
879
                                                            [%# prettier-ignore-end %]
887
                                                                href = hash_href_val
888
                                                                id = id_val
889
                                                                data_tab = data_tab_val
890
                                                            %]
891
                                                            <span id="managedby_name-[% suggestion.suggestiontype | html %]"></span>
880
                                                            <span id="managedby_name-[% suggestion.suggestiontype | html %]"></span>
892
                                                        </fieldset>
881
                                                        </fieldset>
893
                                                        <fieldset class="action">
882
                                                        <fieldset class="action">
Lines 1217-1226 Link Here
1217
1206
1218
[% MACRO jsinclude BLOCK %]
1207
[% MACRO jsinclude BLOCK %]
1219
    [% INCLUDE 'calendar.inc' %]
1208
    [% INCLUDE 'calendar.inc' %]
1220
    [%
1209
    [%# prettier-ignore-start %]
1221
        INCLUDE 'select_manager.inc'
1210
    [% INCLUDE 'select_manager.inc' manager => suggestion.manager %]
1222
        manager => suggestion.manager
1211
    [%# prettier-ignore-end %]
1223
    %]
1224
    <script>
1212
    <script>
1225
        function select_suggester(borrowernumber, borrower) {
1213
        function select_suggester(borrowernumber, borrower) {
1226
            $.ajax({
1214
            $.ajax({
1227
- 

Return to bug 40504