Return of an option from JSPAC, the ability to immediately suspend a
hold when it's placed.
TODO: As noted in the code for editing a hold, a calendar selection
would be preferred to requiring users to enter a valid date manually.
This commit was a patch submitted by Bill Ott to Launchpad in August
2013. Jason Stephenson applied the patch on April 22, 2017 and
resolved conflicts caused by the addition of a metarecords hold
feature in the TPAC. The revised patch was committed with the
original author and commit timestamp.
Signed-off-by: Bill Ott <bott@grpl.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
my @create_targets = map {$_->{target_id}} (grep { !$_->{hold_failed} } @hold_data);
+ my $thaw_date;
+ if ($cgi->param('hold_suspend') && $cgi->param('thaw_date') =~ m:^(\d{2})/(\d{2})/(\d{4})$:){
+ $thaw_date = "$3-$1-$2";
+ }
+
if(@create_targets) {
# holdable formats may be different for each MR hold.
patronid => $usr,
pickup_lib => $pickup_lib,
hold_type => $hold_type,
- holdable_formats_map => $holdable_formats
+ holdable_formats_map => $holdable_formats,
+ frozen => $cgi->param('hold_suspend'),
+ thaw_date => $thaw_date
}),
\@create_targets
);
</blockquote>
[% END %]
</blockquote>
+ <blockquote>
+ <input type="checkbox" name="hold_suspend" value="t"/>[% l('Suspend This Hold?') %]
+ </blockquote>
+ <blockquote>
+ [% l('If suspended, activate on') %]
+ <input type="text" name="thaw_date" value="[% thaw_date | html %]" />
+ <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
+ </blockquote>
</p>
<input id="place_hold_submit" type="submit" name="submit"
value="[% l('Submit') %]" title="[% l('Submit') %]"