From f47c5f09f7efcd2a92dd91f7c2819d62a31ec893 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 14 Mar 2022 13:59:37 +1300 Subject: [PATCH] Bug 8367: (follow-up) Remove pickup delay message from OPAC It adds unnecessary complexity and information. Signed-off-by: Emmi Takkinen Signed-off-by: Nick Clemens Signed-off-by: Kelly Signed-off-by: Katrin Fischer Signed-off-by: Kelly Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../bootstrap/en/modules/opac-reserve.tt | 24 ------------------- opac/opac-reserve.pl | 19 --------------- 2 files changed, 43 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index a285057766..e2918332a3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -283,10 +283,6 @@ [% END # / UNLESS singleBranchMode %] - [% IF pickup_delays %] - - [% END %] -
@@ -510,20 +506,6 @@ var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); - function calculate_delay_days(){ - $(".branch > select").each(function(){ - var selected_branch = $(this).val(); - var branch_biblionumber = $(this).attr('id'); - var biblionumber = branch_biblionumber.slice( branch_biblionumber.indexOf('_')+1 ); - [% FOREACH branchcode IN pickup_delays.keys %] - var branchcode = "[% branchcode | html %]"; - if ( branchcode == selected_branch ) { - $("#pickup_delay_days_" + biblionumber).text([% pickup_delays.$branchcode | html %]); - } - [% END %] - }); - } - $(document).ready(function() { $(".toggle_unholdable").click(function(e){ @@ -531,12 +513,6 @@ $(this).parent('div').find(".unholdable").toggle(); }); - calculate_delay_days(); - $(".pickup_delay").show(); - $(".branch > select").change(function(){ - calculate_delay_days(); - }); - $("#hold-request-form").preventDoubleFormSubmit(); var copiesRowId = null; var wasSpecific = false; diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index b2bff11964..641b8c749d 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -626,23 +626,4 @@ if ( ); } -my @branches = Koha::Libraries->search->as_list; -my %hold_pickup_delay_by_branch = (); - -foreach my $branch ( @branches ) { - my $rule = Koha::CirculationRules->get_effective_rule({ - categorycode => $patron->categorycode, - branchcode => $branch->branchcode, - itemtype => undef, - rule_name => 'holds_pickup_period', - }); - if ( $rule and $rule->rule_value ) { - $hold_pickup_delay_by_branch{$branch->branchcode} = $rule->rule_value; - } else { - $hold_pickup_delay_by_branch{$branch->branchcode} = C4::Context->preference('ReservesMaxPickUpDelay'); - } -} - -$template->param( pickup_delays => \%hold_pickup_delay_by_branch ); - output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; -- 2.39.5