Bug 34634: Show expirationdate of expired holds on reserve/request.pl
To test: 1. Place some holds and go to /reserve/request.pl for that bib. 2. If the reserves.expirationdate is set to today or some date in the past the date does not display in the Flatpickr instance. 3. Change the reserves.expirationdate to sometime in the future, the date displays. 4. Aply patch, restart_all 5. Try steps 2-3 again. 6. This time if the expiration date is in the past you should see it displayed. However it will be uneditable. 7. Make sure holds with a expiration date in the future can still be properly edited. Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Christine <chlee@pascolibraries.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
7c3a0b9131
commit
0710ccb606
2 changed files with 7 additions and 2 deletions
|
@ -129,7 +129,11 @@
|
|||
[% END %]
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" />
|
||||
[% UNLESS hold.expired %]
|
||||
<input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" />
|
||||
[% ELSE %]
|
||||
<span class="expiredon"><label>Expired:</label> [% hold.expirationdate | $KohaDates %]</span>
|
||||
[% END %]
|
||||
</td>
|
||||
<td>
|
||||
[%- IF ( hold.found ) -%]
|
||||
|
|
|
@ -610,8 +610,9 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold )
|
|||
$reserve{'item_level_hold'} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$reserve{'expirationdate'} = $res->expirationdate;
|
||||
$reserve{'expired'} = 1
|
||||
if ( DateTime->compare( dt_from_string( $res->expirationdate ), dt_from_string() ) == -1 );
|
||||
$reserve{'date'} = $res->reservedate;
|
||||
$reserve{'borrowernumber'} = $res->borrowernumber();
|
||||
$reserve{'biblionumber'} = $res->biblionumber();
|
||||
|
|
Loading…
Reference in a new issue