LP#1189989 Reworked conflicts from LP patch user/ldw/LP1189989_Suspend_Hold_At_Pacement
authorLiam Whalen <liam.whalen@bc.libraries.coop>
Wed, 13 May 2015 17:03:48 +0000 (10:03 -0700)
committerLiam Whalen <liam.whalen@bc.libraries.coop>
Wed, 13 May 2015 17:12:20 +0000 (10:12 -0700)
A patch is available for this bug on LP, but it has conflicts.  This
commit fixes those conflicts.

Signed-off-by: Liam Whalen <liam.whalen@bc.libraries.coop>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates/opac/parts/place_hold.tt2

index 97364ed..70cb76f 100644 (file)
@@ -1219,6 +1219,11 @@ sub attempt_hold_placement {
 
     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.
@@ -1237,7 +1242,9 @@ sub attempt_hold_placement {
                 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
         );
index 467e02b..00ece10 100644 (file)
                 </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') %]"