Lines 35-109
Link Here
|
35 |
[% END #/ WRAPPER breadcrumbs %] |
35 |
[% END #/ WRAPPER breadcrumbs %] |
36 |
[% END #/ WRAPPER sub-header.inc %] |
36 |
[% END #/ WRAPPER sub-header.inc %] |
37 |
|
37 |
|
38 |
<div class="main container-fluid"> |
38 |
<div class="main container-fluid"> |
39 |
<div class="row"> |
39 |
<div class="row"> |
40 |
<div class="col-sm-10 order-md-2 order-sm-1"> |
40 |
<div class="col-sm-10 order-md-2 order-sm-1"> |
41 |
<main> |
41 |
<main> |
|
|
42 |
<h1>Batch modify holds</h1> |
42 |
|
43 |
|
43 |
<h1>Batch modify holds</h1> |
44 |
[% IF view == 'form' %] |
44 |
|
45 |
<form method="get" action="/cgi-bin/koha/tools/batch_modify_holds.pl" id="modify_holds_form"> |
45 |
[% IF view == 'form' %] |
46 |
<fieldset class="rows"> |
46 |
<form method="get" action="/cgi-bin/koha/tools/batch_modify_holds.pl" id="modify_holds_form"> |
47 |
<legend>Hold search criteria:</legend> |
47 |
<fieldset class="rows"> |
48 |
<span class="hint">NOTE! Column patron_expiration_date is used as a main filter for expiration date field. Otherwise column expirationdate is used.</span> |
48 |
<legend>Hold search criteria:</legend> |
49 |
<ol> |
49 |
<span class="hint">NOTE! Column patron_expiration_date is used as a main filter for expiration date field. Otherwise column expirationdate is used.</span> |
50 |
<li> |
50 |
<ol> |
51 |
<label for="expirationdate_from">Expiration date from:</label> |
51 |
<li> |
52 |
<input type="text" size="10" id="expirationdate_from" name="expirationdate_from" class="flatpickr" data-date_to="to" /> |
52 |
<label for="expirationdate_from">Expiration date from:</label> |
53 |
</li> |
53 |
<input type="text" size="10" id="expirationdate_from" name="expirationdate_from" class="flatpickr" data-date_to="to" /> |
54 |
<li> |
54 |
</li> |
55 |
<label for="expirationdate_to">Expiration date to:</label> |
55 |
<li> |
56 |
<input type="text" size="10" id="expirationdate_to" name="expirationdate_to" class="flatpickr" /> |
56 |
<label for="expirationdate_to">Expiration date to:</label> |
57 |
</li> |
57 |
<input type="text" size="10" id="expirationdate_to" name="expirationdate_to" class="flatpickr"/> |
58 |
<li> |
58 |
</li> |
59 |
<label for="branchcodes">Libraries:</label> |
59 |
<li> |
60 |
<select name="branchcodes" id="branchcodes" multiple="multiple"> |
60 |
<label for="branchcodes">Libraries:</label> |
61 |
[% PROCESS options_for_libraries libraries => Branches.all(selected => "") %] |
61 |
<select name="branchcodes" id="branchcodes" multiple="multiple"> |
62 |
</select> |
62 |
[% PROCESS options_for_libraries libraries => Branches.all(selected => "") %] |
63 |
</li> |
63 |
</select> |
64 |
<li> |
64 |
</li> |
65 |
<label for="found_status">Found status:</label> |
65 |
<li> |
66 |
<select name="found_status" id="found_status" multiple="multiple"> |
66 |
<label for="found_status">Found status:</label> |
67 |
<option value="NULL">No status</option> |
67 |
<select name="found_status" id="found_status" multiple="multiple"> |
68 |
<option value="T">In transit</option> |
68 |
<option value="NULL">No status</option> |
69 |
<option value="P">In processing</option> |
69 |
<option value="T">In transit</option> |
70 |
<option value="W">Waiting</option> |
70 |
<option value="P">In processing</option> |
71 |
</select> |
71 |
<option value="W">Waiting</option> |
72 |
</li> |
72 |
</select> |
73 |
<li> |
73 |
</li> |
74 |
<label for="suspend_status">Suspended:</label> |
74 |
<li> |
75 |
<select name="suspend_status" id="suspend_status"> |
75 |
<label for="suspend_status">Suspended:</label> |
76 |
<option value="none" selected="selected"></option> |
76 |
<select name="suspend_status" id="suspend_status"> |
77 |
<option value="0">Not suspended</option> |
77 |
<option value="none" selected="selected"></option> |
78 |
<option value="1">Suspended</option> |
78 |
<option value="0">Not suspended</option> |
79 |
</select> |
79 |
<option value="1">Suspended</option> |
80 |
</li> |
80 |
</select> |
81 |
<li> |
81 |
</li> |
82 |
<label for="suspend_until_from">Suspended until from:</label> |
82 |
<li> |
83 |
<input type="text" size="10" id="suspend_until_from" name="suspend_until_from" class="flatpickr" data-date_to="to" /> |
83 |
<label for="suspend_until_from">Suspended until from:</label> |
84 |
</li> |
84 |
<input type="text" size="10" id="suspend_until_from" name="suspend_until_from" class="flatpickr" data-date_to="to" /> |
85 |
<li> |
85 |
</li> |
86 |
<label for="suspend_until_to">Suspended until to:</label> |
86 |
<li> |
87 |
<input type="text" size="10" id="suspend_until_to" name="suspend_until_to" class="flatpickr" /> |
87 |
<label for="suspend_until_to">Suspended until to:</label> |
88 |
</li> |
88 |
<input type="text" size="10" id="suspend_until_to" name="suspend_until_to" class="flatpickr"/> |
89 |
<li> |
89 |
</li> |
90 |
<label for="reservenotes">Hold note:</label> |
90 |
<li> |
91 |
<input type="text" id="reservenotes" name="reservenotes" /> |
91 |
<label for="reservenotes">Hold note:</label> |
92 |
</li> |
92 |
<input type="text" id="reservenotes" name="reservenotes"/> |
93 |
</ol> |
93 |
</li> |
94 |
</fieldset> |
94 |
</ol> |
95 |
<fieldset class="action"> |
95 |
</fieldset> |
96 |
<input type="hidden" name="op" value="list" /> |
96 |
<fieldset class="action"> |
97 |
<input type="submit" class="btn btn-primary" value="Continue" /> |
97 |
<input type="hidden" name="op" value="list"/> |
98 |
<a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a> |
98 |
<input type="submit" class="btn btn-primary" value="Continue"/> |
99 |
</fieldset> |
99 |
<a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a> |
100 |
</form> |
100 |
</fieldset> |
101 |
<!-- /#modify_holds_form --> |
101 |
</form> <!-- /#modify_holds_form --> |
102 |
[% ELSIF view == 'list' %] |
102 |
[% ELSIF view == 'list' %] |
103 |
[% IF holds.count %] |
103 |
<form action="/cgi-bin/koha/tools/batch_modify_holds.pl" method="post" id="process"> |
104 |
<form action="/cgi-bin/koha/tools/batch_modify_holds.pl" method="post" id="process"> |
104 |
[% INCLUDE 'csrf-token.inc' %] |
105 |
[% INCLUDE 'csrf-token.inc' %] |
105 |
[% IF holds.count %] |
106 |
<div><p>Found [% holds.count | html %][% IF holds.count > 1 %]holds[% ELSE %]hold[% END %]to modify.</p></div> |
106 |
<div><p>Found [% holds.count | html %][% IF holds.count > 1 %] holds [% ELSE %] hold [% END %]to modify.</p></div> |
|
|
107 |
<div class="page-section"> |
107 |
<div class="page-section"> |
108 |
<div class="btn-toolbar selections-toolbar"> |
108 |
<div class="btn-toolbar selections-toolbar"> |
109 |
<a id="selectall" href="#"><i class="fa fa-check"></i> Select all</a> |
109 |
<a id="selectall" href="#"><i class="fa fa-check"></i> Select all</a> |
Lines 112-120
Link Here
|
112 |
<table id="found_holds"> |
112 |
<table id="found_holds"> |
113 |
<thead> |
113 |
<thead> |
114 |
<tr> |
114 |
<tr> |
115 |
<th> </th> |
115 |
<th>Hold ID</th> |
116 |
<th>Expiration date</th> |
116 |
<th>Expiration date</th> |
117 |
<th>Patron expiration date</th> |
|
|
118 |
<th>Title</th> |
117 |
<th>Title</th> |
119 |
<th>Barcode</th> |
118 |
<th>Barcode</th> |
120 |
<th>Status</th> |
119 |
<th>Status</th> |
Lines 124-157
Link Here
|
124 |
<th>Note</th> |
123 |
<th>Note</th> |
125 |
</tr> |
124 |
</tr> |
126 |
</thead> |
125 |
</thead> |
127 |
<tbody> |
126 |
</table> |
128 |
[% FOREACH hold IN holds %] |
127 |
<!-- /#holds --> |
129 |
<tr> |
128 |
</div> |
130 |
<td><input type="checkbox" name="hold_id" value="[% hold.reserve_id | html %]"/></td> |
129 |
<!-- /.page-section --> |
131 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
|
|
132 |
<td>[% hold.patron_expiration_date | $KohaDates %]</td> |
133 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.biblionumber | uri %]">[% hold.biblio.title | html %]</a></td> |
134 |
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% hold.itemnumber | uri %]&biblionumber=[% hold.biblionumber | uri %]&bi=[% hold.biblionumber | uri %]#item[% hold.itemnumber | uri %]">[% hold.item.barcode | html %]</a></td> |
135 |
<td class="found_status" data-found="[% hold.found | html %]"> |
136 |
[% IF hold.found == "T" %] |
137 |
In transit |
138 |
[% ELSIF hold.found == "P" %] |
139 |
In processing |
140 |
[% ELSIF hold.found == "W" %] |
141 |
Waiting |
142 |
[% ELSE %] |
143 |
No status |
144 |
[% END %] |
145 |
</td> |
146 |
<td>[% Branches.GetName( hold.branchcode ) | html %]</td> |
147 |
<td>[% IF hold.suspend %]Yes[% ELSE %]No[% END %]</td> |
148 |
<td>[% hold.suspend_until | $KohaDates %]</td> |
149 |
<td>[% hold.reservenotes | html %]</td> |
150 |
</tr> |
151 |
[% END %] |
152 |
</tbody> |
153 |
</table> <!-- /#holds --> |
154 |
</div> <!-- /.page-section --> |
155 |
<h2>Modify holds</h2> |
130 |
<h2>Modify holds</h2> |
156 |
<div class="page-section"> |
131 |
<div class="page-section"> |
157 |
<table id="hold_modifies"> |
132 |
<table id="hold_modifies"> |
Lines 167-173
Link Here
|
167 |
<tbody> |
142 |
<tbody> |
168 |
<tr> |
143 |
<tr> |
169 |
<td> |
144 |
<td> |
170 |
<input type="text" id="new_expiration_date" name="new_expiration_date" class="flatpickr" data-flatpickr-futuredate="true"/> |
145 |
<input type="text" id="new_expiration_date" name="new_expiration_date" class="flatpickr" data-flatpickr-futuredate="true" /> |
171 |
</td> |
146 |
</td> |
172 |
<td> |
147 |
<td> |
173 |
<select id="new_pickup_loc" name="new_pickup_loc"> |
148 |
<select id="new_pickup_loc" name="new_pickup_loc"> |
Lines 183-288
Link Here
|
183 |
</select> |
158 |
</select> |
184 |
</td> |
159 |
</td> |
185 |
<td> |
160 |
<td> |
186 |
<input type="text" id="new_suspend_date" name="new_suspend_date" class="flatpickr" data-flatpickr-futuredate="true"/> |
161 |
<input type="text" id="new_suspend_date" name="new_suspend_date" class="flatpickr" data-flatpickr-futuredate="true" /> |
187 |
</td> |
162 |
</td> |
188 |
<td> |
163 |
<td> |
189 |
<input type="text" id="new_reserve_note" name="new_reserve_note"/> |
164 |
<input type="text" id="new_reserve_note" name="new_reserve_note" /> |
190 |
</td> |
165 |
</td> |
191 |
</tr> |
166 |
</tr> |
192 |
</tbody> |
167 |
</tbody> |
193 |
</table> <!-- /#hold_modifies --> |
168 |
</table> |
|
|
169 |
<!-- /#hold_modifies --> |
194 |
</div> |
170 |
</div> |
195 |
<fieldset class="action"> |
171 |
<fieldset class="action"> |
196 |
<input type="hidden" name="op" value="cud-modify"/> |
172 |
<input type="hidden" name="op" value="cud-modify" /> |
197 |
<input type="submit" class="btn btn-primary" value="Modify selected holds"/> |
173 |
<input type="submit" class="btn btn-primary" value="Modify holds" /> |
198 |
<a class="cancel" href="/cgi-bin/koha/tools/batch_modify_holds.pl">Cancel</a> |
174 |
<a class="cancel" href="/cgi-bin/koha/tools/batch_modify_holds.pl">Cancel</a> |
199 |
</fieldset> |
175 |
</fieldset> |
200 |
</form> <!-- /#process --> |
176 |
</form> |
201 |
[% ELSE %] |
177 |
<!-- /#process --> |
202 |
<div class="dialog message"> |
178 |
[% ELSE %] |
203 |
No holds were found for the selected filters. |
179 |
<div class="dialog message"> No holds were found for the selected filters. </div> |
204 |
</div> |
180 |
<a class="cancel" href="/cgi-bin/koha/tools/batch_modify_holds.pl">Return</a> |
205 |
<a class="cancel" href="/cgi-bin/koha/tools/batch_modify_holds.pl">Return</a> |
181 |
[% END %] |
206 |
[% END %] |
182 |
[% ELSIF view == 'report' %] |
207 |
[% ELSIF view == 'report' %] |
183 |
<div class="dialog message"> [% updated_holds.count | html %] holds have been modified! </div> |
208 |
<div class="dialog message"> |
184 |
<div class="page-section"> |
209 |
[% updated_holds.count | html %] holds have been modified! |
185 |
<table id="holds"> |
210 |
</div> |
186 |
<thead> |
211 |
<div class="page-section"> |
187 |
<tr> |
212 |
<table id="holds"> |
188 |
<th>Expiration date</th> |
213 |
<thead> |
189 |
<th>Title</th> |
|
|
190 |
<th>Barcode</th> |
191 |
<th>Hold pickup library</th> |
192 |
<th>Suspended</th> |
193 |
<th>Suspended until</th> |
194 |
<th>Note</th> |
195 |
</tr> |
196 |
</thead> |
197 |
<tbody> |
198 |
[% FOREACH hold IN updated_holds %] |
214 |
<tr> |
199 |
<tr> |
215 |
<th>Expiration date</th> |
200 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
216 |
<th>Title</th> |
201 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.biblionumber | uri %]">[% hold.biblio.title | html %]</a></td> |
217 |
<th>Barcode</th> |
202 |
<td |
218 |
<th>Hold pickup library</th> |
203 |
><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% hold.itemnumber | uri %]&biblionumber=[% hold.biblionumber | uri %]&bi=[% hold.biblionumber | uri %]#item[% hold.itemnumber | uri %]" |
219 |
<th>Suspended</th> |
204 |
>[% hold.item.barcode | html %]</a |
220 |
<th>Suspended until</th> |
205 |
></td |
221 |
<th>Note</th> |
206 |
> |
|
|
207 |
<td>[% Branches.GetName( hold.branchcode ) | html %]</td> |
208 |
<td>[% IF hold.suspend == 0 %]No[% ELSE %]Yes[% END %]</td> |
209 |
<td>[% hold.suspend_until | $KohaDates %]</td> |
210 |
<td>[% hold.reservenotes | html %]</td> |
222 |
</tr> |
211 |
</tr> |
223 |
</thead> |
212 |
[% END %] |
224 |
<tbody> |
213 |
</tbody> |
225 |
[% FOREACH hold IN updated_holds %] |
214 |
</table> |
226 |
<tr> |
215 |
<!-- /#holds --> |
227 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
216 |
</div> |
228 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.biblionumber | uri %]">[% hold.biblio.title | html %]</a></td> |
217 |
<!-- /.page-section --> |
229 |
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% hold.itemnumber | uri %]&biblionumber=[% hold.biblionumber | uri %]&bi=[% hold.biblionumber | uri %]#item[% hold.itemnumber | uri %]">[% hold.item.barcode | html %]</a></td> |
218 |
<a class="cancel" href="/cgi-bin/koha/tools/batch_modify_holds.pl">Return to batch hold modification</a> |
230 |
<td>[% Branches.GetName( hold.branchcode ) | html %]</td> |
219 |
[% END %] |
231 |
<td>[% IF hold.suspend == 0 %]No[% ELSE %]Yes[% END %]</td> |
220 |
</main> |
232 |
<td>[% hold.suspend_until | $KohaDates %]</td> |
221 |
</div> |
233 |
<td>[% hold.reservenotes | html %]</td> |
222 |
<!-- /.col-sm-10 col-sm-push-2 --> |
234 |
</tr> |
|
|
235 |
[% END %] |
236 |
</tbody> |
237 |
</table> <!-- /#holds --> |
238 |
</div> <!-- /.page-section --> |
239 |
<a class="cancel" href="/cgi-bin/koha/tools/batch_modify_holds.pl">Return to batch hold modification</a> |
240 |
[% END %] |
241 |
</main> |
242 |
</div> <!-- /.col-sm-10 col-sm-push-2 --> |
243 |
|
223 |
|
244 |
|
224 |
<div class="col-sm-2 col-sm-pull-10"> |
245 |
<div class="col-sm-2 col-sm-pull-10"> |
225 |
<aside> [% INCLUDE 'tools-menu.inc' %] </aside> |
246 |
<aside> |
226 |
</div> |
247 |
[% INCLUDE 'tools-menu.inc' %] |
227 |
<!-- /.col-sm-2 col-sm-pull-10 --> |
248 |
</aside> |
|
|
249 |
</div> <!-- /.col-sm-2 col-sm-pull-10 --> |
250 |
</div> <!-- /.row --> |
251 |
</div> |
228 |
</div> |
|
|
229 |
<!-- /.row --> |
230 |
</div> |
252 |
[% MACRO jsinclude BLOCK %] |
231 |
[% MACRO jsinclude BLOCK %] |
253 |
[% Asset.js("js/tools-menu.js") | $raw %] |
232 |
[% Asset.js("js/tools-menu.js") | $raw %] |
254 |
[% INCLUDE 'calendar.inc' %] |
233 |
[% INCLUDE 'calendar.inc' %] |
255 |
[% INCLUDE 'datatables.inc' %] |
234 |
[% INCLUDE 'datatables.inc' %] |
256 |
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] |
235 |
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] |
257 |
<script> |
236 |
<script> |
258 |
$(document).ready(function() { |
237 |
$(document).ready(function () { |
259 |
|
238 |
var holds_table_url = "/api/v1/holds"; |
260 |
$("#selectall").click(function(e){ |
239 |
var table = $("#found_holds").kohaTable({ |
261 |
e.preventDefault(); |
240 |
ajax: { |
262 |
$("#found_holds input[type='checkbox']").each(function(){ |
241 |
url: holds_table_url, |
263 |
$(this).prop("checked", true); |
242 |
}, |
264 |
}); |
243 |
autoWidth: false, |
265 |
}); |
244 |
embed: ["biblio", "pickup_library", "item"], |
266 |
|
245 |
columns: [ |
267 |
$("#clearall").click(function(e){ |
246 |
{ |
268 |
e.preventDefault(); |
247 |
data: "hold_id", |
269 |
$("#found_holds input[type='checkbox']").each(function(){ |
248 |
searchable: true, |
270 |
$(this).prop("checked", false); |
249 |
orderable: true, |
271 |
}); |
250 |
}, |
272 |
}); |
251 |
{ |
273 |
|
252 |
data: "expiration_date", |
274 |
$("#selectall").click(); |
253 |
title: "Expiration date", |
275 |
|
254 |
searchable: true, |
276 |
$("#found_holds").dataTable($.extend(true, {}, dataTablesDefaults, { |
255 |
orderable: true, |
277 |
"aoColumnDefs": [ |
256 |
render: function (data, type, row, meta) { |
278 |
{ "aTargets": [0], "bSortable": false, "bSearchable": false }, |
257 |
return $date(row.expiration_date); |
|
|
258 |
}, |
259 |
}, |
260 |
{ |
261 |
data: "", |
262 |
title: "Title", |
263 |
searchable: true, |
264 |
orderable: true, |
265 |
render: function (data, type, row, meta) { |
266 |
return row.biblio.title; |
267 |
}, |
268 |
}, |
269 |
{ |
270 |
data: "", |
271 |
title: "Barcode", |
272 |
searchable: true, |
273 |
orderable: true, |
274 |
render: function (data, type, row, meta) { |
275 |
if (row.item_level) { |
276 |
return row.item.external_id; |
277 |
} else { |
278 |
return "Bibliographic level hold"; |
279 |
} |
280 |
}, |
281 |
}, |
282 |
{ |
283 |
data: "status", |
284 |
title: "Status", |
285 |
searchable: true, |
286 |
orderable: true, |
287 |
}, |
288 |
{ |
289 |
data: "pickup_library_id", |
290 |
title: "Pickup library", |
291 |
searchable: true, |
292 |
orderable: true, |
293 |
render: function (data, type, row, meta) { |
294 |
return row.pickup_library.name; |
295 |
}, |
296 |
}, |
297 |
{ |
298 |
data: "suspended", |
299 |
title: "Suspended", |
300 |
searchable: true, |
301 |
orderable: true, |
302 |
render: function (data) { |
303 |
return data ? "Yes" : "No"; |
304 |
}, |
305 |
}, |
306 |
{ |
307 |
data: "suspended_until", |
308 |
title: "Suspended until", |
309 |
searchable: true, |
310 |
orderable: true, |
311 |
render: function (data, type, row, meta) { |
312 |
return $date(row.suspended_until); |
313 |
}, |
314 |
}, |
315 |
{ |
316 |
data: "notes", |
317 |
title: "Notes", |
318 |
searchable: true, |
319 |
orderable: true, |
320 |
}, |
279 |
], |
321 |
], |
280 |
"sDom": 't', |
322 |
}); |
281 |
"aaSorting": [], |
|
|
282 |
"bPaginate": false |
283 |
})); |
284 |
|
323 |
|
285 |
$("#process").on('submit', function(e) { |
324 |
$("#process").on("submit", function (e) { |
286 |
var errors = []; |
325 |
var errors = []; |
287 |
var reserve_ids = $("input[type=checkbox][name='hold_id']:checked"); |
326 |
var reserve_ids = $("input[type=checkbox][name='hold_id']:checked"); |
288 |
|
327 |
|
Lines 290-315
Link Here
|
290 |
var new_suspend_status = $("#new_suspend_status").val(); |
329 |
var new_suspend_status = $("#new_suspend_status").val(); |
291 |
var new_suspend_date = $("#new_suspend_date").val(); |
330 |
var new_suspend_date = $("#new_suspend_date").val(); |
292 |
|
331 |
|
293 |
if ( reserve_ids.length == 0 ) { |
332 |
if (new_pickup_loc || new_suspend_status) { |
294 |
e.preventDefault(); |
333 |
reserve_ids.each(function () { |
295 |
errors.push(_("Please select at least one hold to process.")); |
334 |
if ($(this).parents("tr").children(".found_status").data("found") != "") { |
296 |
return false; |
|
|
297 |
} |
298 |
if( new_pickup_loc || new_suspend_status ){ |
299 |
reserve_ids.each(function(){ |
300 |
if($(this).parents("tr").children(".found_status").data("found") != ""){ |
301 |
e.preventDefault(); |
335 |
e.preventDefault(); |
302 |
if( new_suspend_status ){ |
336 |
if (new_suspend_status) { |
303 |
errors.push(_("One or more holds have found status and can't be suspended.")); |
337 |
errors.push(_("One or more holds have found status and can't be suspended.")); |
304 |
} |
338 |
} |
305 |
if( new_pickup_loc ){ |
339 |
if (new_pickup_loc) { |
306 |
errors.push(_("One or more holds have found status and their pick up location can't be changed.")); |
340 |
errors.push(_("One or more holds have found status and their pick up location can't be changed.")); |
307 |
} |
341 |
} |
308 |
return false; |
342 |
return false; |
309 |
} |
343 |
} |
310 |
}) |
344 |
}); |
311 |
} |
345 |
} |
312 |
if( ( !new_suspend_status || new_suspend_status == "not_suspended") && new_suspend_date ){ |
346 |
if ((!new_suspend_status || new_suspend_status == "not_suspended") && new_suspend_date) { |
313 |
e.preventDefault(); |
347 |
e.preventDefault(); |
314 |
errors.push(_("You have to suspend holds if new suspend until date is set.")); |
348 |
errors.push(_("You have to suspend holds if new suspend until date is set.")); |
315 |
return false; |
349 |
return false; |
Lines 318-324
Link Here
|
318 |
if (errors.length > 0) { |
352 |
if (errors.length > 0) { |
319 |
e.preventDefault(); |
353 |
e.preventDefault(); |
320 |
$("#errorList").html(errors.map(error => `<li>${error}</li>`).join("")); |
354 |
$("#errorList").html(errors.map(error => `<li>${error}</li>`).join("")); |
321 |
$("#errorModal").modal('show'); |
355 |
$("#errorModal").modal("show"); |
322 |
return false; |
356 |
return false; |
323 |
} |
357 |
} |
324 |
|
358 |
|
Lines 328-331
Link Here
|
328 |
</script> |
362 |
</script> |
329 |
[% END %] |
363 |
[% END %] |
330 |
|
364 |
|
331 |
[% INCLUDE 'intranet-bottom.inc' %] |
365 |
[% INCLUDE 'intranet-bottom.inc' %] |
332 |
- |
|
|