From: Galen Charlton Date: Mon, 13 Aug 2018 21:25:51 +0000 (-0400) Subject: if the basket page is used to clear all items from basket, return to original referrer X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bc81c1d97838180b09a2051ca391f0784ccc71b6;p=working%2FEvergreen.git if the basket page is used to clear all items from basket, return to original referrer Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm index 65f08e6544..6b076720ee 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm @@ -303,6 +303,11 @@ sub load_mylist_move { $cache_key, (ref $self)->CART_CACHE_MYLIST, \@keep ); + if ($action eq 'delete' && scalar(@keep) == 0) { + my $url = $self->cgi->param('orig_referrer') // $self->ctx->{referer}; + return $self->generic_redirect($url); + } + if ($self->ctx->{user} and $action =~ /^\d+$/) { # in this case, action becomes list_id $self->load_myopac_bookbag_update('add_rec', $self->cgi->param('action')); diff --git a/Open-ILS/src/templates/opac/parts/anon_list.tt2 b/Open-ILS/src/templates/opac/parts/anon_list.tt2 index d9bd3e9e2f..77aec1e43e 100644 --- a/Open-ILS/src/templates/opac/parts/anon_list.tt2 +++ b/Open-ILS/src/templates/opac/parts/anon_list.tt2 @@ -13,6 +13,7 @@
+