From: Mike Rylander Date: Wed, 3 Jun 2020 18:27:05 +0000 (-0400) Subject: Provide a full "reset" subaction to support "select another date" X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ae7204e62c228b9109664551deb0d6302bc45510;p=working%2FEvergreen.git Provide a full "reset" subaction to support "select another date" Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 1ddf1df2e7..9f7868d70c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1297,6 +1297,7 @@ sub handle_hold_update { $time ||= $dt->strftime('%T'); } } + $ctx->{cs_org} = $org; $ctx->{cs_date} = $date; $ctx->{cs_time} = $time; @@ -1304,7 +1305,14 @@ sub handle_hold_update { $ctx->{cs_slot_id} = $slot->id if ($slot); $ctx->{cs_slot} = $slot; - if ($cs_action eq 'save' && $org && $date && $time) { + if ($cs_action eq 'reset') { + $ctx->{cs_org} = $org = undef; + $ctx->{cs_date} = $date = undef; + $ctx->{cs_time} = $time = undef; + $ctx->{cs_notes} = $notes = undef; + $ctx->{cs_slot_id} = $slot_id = undef; + $ctx->{cs_slot} = $slot = undef; + } elsif ($cs_action eq 'save' && $org && $date && $time) { my $mode = $slot ? 'update' : 'create'; $slot = $circ->request( "open-ils.curbside.${mode}_appointment",