Skip to content

Commit

Permalink
Bug 16988 - Suspending a hold with AutoResumeSuspendedHolds disabled …
Browse files Browse the repository at this point in the history
…results in error

iUnless AutoResumeSuspendedHolds is enabled, attempting to suspend a
hold from reserve/request.pl results in the following error:

The given date (undefined) does not match the date format (us) at
/home/vagrant/kohaclone/Koha/DateUtils.pm line 152.

Test Plan:
1) Enable SuspendHoldsIntranet
2) Disable AutoResumeSuspendedHolds
3) Attempt to suspend or unsuspend a hold
4) Note the error
5) Apply this patch
6) Repeat step 3
7) The hold should suspend or resume correctly

Signed-off-by: Kyle M Hall <[email protected]>
Signed-off-by: Megan Wianecki <[email protected]>

Signed-off-by: Jonathan Druart <[email protected]>

Signed-off-by: Brendan Gallagher <[email protected]>
  • Loading branch information
kylemhall authored and brendan1226 committed Aug 4, 2016
1 parent c63d0b3 commit 91bc945
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,11 @@ function checkMultiHold() {
<input type="button" value="[% IF ( reserveloo.suspend ) %]Unsuspend[% ELSE %]Suspend[% END %]" onclick="window.location.href='request.pl?action=toggleSuspend&amp;reserve_id=[% reserveloo.reserve_id %]&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;date=[% reserveloo.date %]&amp;suspend_until=' + $('#suspend_until_[% reserveloo.reserve_id %]').val()" />

[% IF AutoResumeSuspendedHolds %]
<label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
<input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" readonly="readonly" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
<a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
<label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
<input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" readonly="readonly" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
<a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
[% ELSE %]
<input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" value=""/>
[% END %]
[% ELSE %]
<input type="hidden" name="suspend_until" value="" />
Expand Down

0 comments on commit 91bc945

Please sign in to comment.