Lines 1-3
Link Here
|
|
|
1 |
[% USE Koha %] |
1 |
[% USE KohaDates %] |
2 |
[% USE KohaDates %] |
2 |
[% INCLUDE 'doc-head-open.inc' %] |
3 |
[% INCLUDE 'doc-head-open.inc' %] |
3 |
[% UNLESS ( multi_hold ) %] |
4 |
[% UNLESS ( multi_hold ) %] |
Lines 24-29
$(document).ready(function() {
Link Here
|
24 |
[% IF AutoResumeSuspendedHolds %] |
25 |
[% IF AutoResumeSuspendedHolds %] |
25 |
$(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1); |
26 |
$(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1); |
26 |
[% END %] |
27 |
[% END %] |
|
|
28 |
[% IF biblioloop && biblioloop.0.forceitemhold %] |
29 |
[%# we only check the first biblio (0) because we do not show the form for multiple biblios %] |
30 |
$("#forceitemhold_enabled").toggle(); |
31 |
[% ELSE %] |
32 |
$("#forceitemhold_disabled").toggle(); |
33 |
[% END %] |
27 |
}); |
34 |
}); |
28 |
|
35 |
|
29 |
function check() { |
36 |
function check() { |
Lines 98-103
function checkMultiHold() {
Link Here
|
98 |
return true; |
105 |
return true; |
99 |
} |
106 |
} |
100 |
|
107 |
|
|
|
108 |
function UpdateForceItemHold(biblio,mode) { |
109 |
$(".forceitemholdbtn").prop("disabled",true); |
110 |
var url = 'update_forceitemholds.pl?biblio=' + biblio+ "&mode=" + mode; |
111 |
var req = $.ajax({ |
112 |
url: url, |
113 |
type: "GET", |
114 |
dataType: "text" |
115 |
}); |
116 |
req.done( function( data, status, obj ) { |
117 |
if( obj.responseText == '1' ) { |
118 |
$("#forceitemhold_disabled").toggle(); |
119 |
$("#forceitemhold_enabled").toggle(); |
120 |
} |
121 |
$(".forceitemholdbtn").prop("disabled",false); |
122 |
}); |
123 |
req.fail( function( obj, status, err ) { |
124 |
alert('Something went wrong. Please try again later.'); |
125 |
$(".forceitemholdbtn").prop("disabled",false); |
126 |
}); |
127 |
} |
128 |
|
101 |
$(document).ready(function() { |
129 |
$(document).ready(function() { |
102 |
$("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic |
130 |
$("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic |
103 |
var itemnumber = this.value; |
131 |
var itemnumber = this.value; |
Lines 207-212
function checkMultiHold() {
Link Here
|
207 |
</div> |
235 |
</div> |
208 |
[% END %] |
236 |
[% END %] |
209 |
|
237 |
|
|
|
238 |
[% IF !multi_hold && Koha.Preference('OPACItemHolds')=='selectiveforce' %] |
239 |
<form> |
240 |
<fieldset class="brief"> |
241 |
<label>Force item holds</label> |
242 |
<span id="forceitemhold_disabled" style="display:none;"> |
243 |
<div class="hint">Currently, forced item holds for this biblio are disabled in OPAC.</div> |
244 |
<input type="button" class="forceitemholdbtn" value="Enable" onclick="javascript:return UpdateForceItemHold([% biblioloop.0.biblionumber %],1);" /> |
245 |
</span> |
246 |
<span id="forceitemhold_enabled" style="display:none;"> |
247 |
<div class="hint">Currently, forced item holds for this biblio are enabled in OPAC.</div> |
248 |
<input type="button" class="forceitemholdbtn" value="Disable" onclick="javascript:return UpdateForceItemHold([% biblioloop.0.biblionumber %],0);" /> |
249 |
</span> |
250 |
</fieldset> |
251 |
</form> |
252 |
[% END %] |
253 |
|
210 |
[% UNLESS ( multi_hold ) %] |
254 |
[% UNLESS ( multi_hold ) %] |
211 |
<h1>Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% title |html %]</a></h1> |
255 |
<h1>Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% title |html %]</a></h1> |
212 |
[% ELSE %] |
256 |
[% ELSE %] |