From 19ad7e4d64f906f529fd916e77d5d3b3d038389c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 22 Jul 2020 11:21:39 -0400 Subject: [PATCH] Bug 19889: Add feedback when exclusion is updated on moredetail.pl --- catalogue/moredetail.pl | 4 ++++ catalogue/updateitem.pl | 5 ++++- .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index a736c30c8c..a63125f299 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -50,6 +50,10 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( } ); +$template->param( + updated_exclude_from_local_holds_priority => $query->param('updated_exclude_from_local_holds_priority') +); + if($query->cookie("holdfor")){ my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); $template->param( diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 9d112166d4..f8df6a2623 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -56,6 +56,8 @@ for ($damaged,$itemlost,$withdrawn) { } } +my $alerts = q{}; + # modify MARC item if input differs from items table. if ( $op eq "set_non_public_note" ) { checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); @@ -74,6 +76,7 @@ elsif ( $op eq "set_public_note" ) { # i.e., itemnotes parameter passed from for $item->withdrawn($withdrawn); } elsif ( $op eq "set_exclude_priority" && $exclude_from_local_holds_priority ne $item_data_hashref->{'exclude_from_local_holds_priority'}) { $item->exclude_from_local_holds_priority($exclude_from_local_holds_priority); + $alerts = "updated_exclude_from_local_holds_priority=$exclude_from_local_holds_priority&"; } elsif ( $op eq "set_damaged" && $damaged ne $item_data_hashref->{'damaged'}) { $item->damaged($damaged); } else { @@ -86,4 +89,4 @@ $item->store; LostItem($itemnumber, 'moredetail') if $op eq "set_lost"; -print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); +print $cgi->redirect("moredetail.pl?" . $alerts . "biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index b7cfba2d84..92ac4e4d7e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -53,6 +53,13 @@
You are only viewing one item. View All
[% END %] + [% IF updated_exclude_from_local_holds_priority.defined %] +
+ Exclude from local holds priority updated to + [% IF updated_exclude_from_local_holds_priority %]Yes[% ELSE %]No[% END %] +
+ [% END %] + [% FOREACH ITEM_DAT IN ITEM_DATA %]

Barcode [% ITEM_DAT.barcode | html %] [% IF ( ITEM_DAT.notforloantext ) %][% ITEM_DAT.notforloantext | html %] [% END %]

Item information [% IF ( CAN_user_editcatalogue_edit_catalogue ) %][% UNLESS ( ITEM_DAT.nomod ) %] -- 2.27.0