$("#renewall").submit();
});
$("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
- $( "#suspend_until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
+ $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
});
//]]>
</script>
<div id="opac-user-holds">
<table id="holdst">
<caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
- <!-- RESERVES TABLE ROWS -->
- <thead><tr>
+
+ <!-- RESERVES TABLE ROWS -->
+ <thead>
+ <tr>
<th>Title</th>
<th class="psort">Placed on</th>
- [% IF OpacHoldNotes %]<th>Notes</th>[% END %]
- <th>Expires on</th>
+ [% IF OpacHoldNotes %]
+ <th>Notes</th>
+ [% END %]
+ <th>Expires on</th>
<th>Pick up location</th>
- [% IF ( showpriority ) %]
- <th>Priority</th>
- [% END %]
+ [% IF ( showpriority ) %]
+ <th>Priority</th>
+ [% END %]
<th>Status</th>
- <th class="nosort">Modify</th>
- </tr></thead>
- <tbody>
+ <th class="nosort">Modify</th>
+ [% IF SuspendHoldsOpac %]
+ <th class="nosort" >Suspend individual holds</th>
+ [% END %]
+ </tr>
+ </thead>
+ <tbody>
[% FOREACH RESERVE IN RESERVES %]
[% IF ( RESERVE.wait ) %]
[% IF ( RESERVE.atdestination ) %]
[% END %]
</td>
+ [% IF SuspendHoldsOpac %]
+ <td>
+ [% IF ( RESERVE.cancelable ) %]
+ <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
+ <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
+
+ [% IF RESERVE.suspend %]
+ <input type="submit" name="submit" value="Resume suspended hold" />
+ [% ELSE %]
+ <input type="submit" name="submit" class="icon delete cancel" value="Suspend hold" />
+
+ [% IF AutoResumeSuspendedHolds %]
+ <label for="suspend_until_[% RESERVE.reserve_id %]"> until </label>
+ <input name="suspend_until" id="suspend_until_[% RESERVE.reserve_id %]" class="suspend-until" readonly="readonly" size="10" />
+ <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until_[% RESERVE.reserve_id %]').value='';return false;">Clear date</a>
+ [% END %]
+ [% END %]
+ </form>
+ [% END %]
+ </td>
+ [% END %]
</tr>
[% END %]
[% IF AutoResumeSuspendedHolds %]
<label for="suspend_until"> until </label>
- <input name="suspend_until" id="suspend_until" readonly="readonly" size="10" />
+ <input name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" />
<a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date</a></p>
[% END %]
</form>
my $suspend = $query->param('suspend');
my $suspend_until = $query->param('suspend_until') || undef;
+my $reserve_id = $query->param('reserve_id');
-SuspendAll(
- borrowernumber => $borrowernumber,
- suspend => $suspend,
- suspend_until => $suspend_until,
-);
+if ($reserve_id) {
+ ToggleSuspend( $reserve_id, $suspend_until );
+}
+else {
+ SuspendAll(
+ borrowernumber => $borrowernumber,
+ suspend => $suspend,
+ suspend_until => $suspend_until,
+ );
+}
print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-holds");