From 4735e296cf99dea4dd5217193460f8585d6cf25d Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Thu, 3 Mar 2011 18:13:26 -0500 Subject: [PATCH] Bug 5824: Creating a circ rule for a specific library causes anomalies The variable name for the current branch being edited was the same as the variable used in cat-search.inc, which passed along the circ-rule library to circulation.pl, and then overriding the set library from there. This patch renames the template variable 'current_branch', so that it does not populate the 'branch' param in cat-search.inc Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- admin/smart-rules.pl | 2 +- .../prog/en/modules/admin/smart-rules.tmpl | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index fdd9b9132b..d015ec2a00 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -481,7 +481,7 @@ $template->param(categoryloop => \@category_loop, rules => \@sorted_row_loop, branchloop => \@branchloop, humanbranch => ($branch ne '*' ? $branches->{$branch}->{branchname} : ''), - branch => $branch, + current_branch => $branch, definedbranch => scalar(@sorted_row_loop)>0 ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl index eaa0d438f2..92a44ceb99 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl @@ -56,7 +56,8 @@ $(document).ready(function() { -
" /> + " />
@@ -109,7 +110,7 @@ $(document).ready(function() { - &categorycode=&branch=">Delete + &categorycode=&branch=">Delete @@ -139,7 +140,7 @@ $(document).ready(function() { - "/> + "/>
@@ -149,7 +150,7 @@ $(document).ready(function() {

You can set a default maximum number of checkouts and hold policy that will be used if none is defined below for a particular item type or category.

- "/> + "/> @@ -188,7 +189,7 @@ $(document).ready(function() {
  - ">Unset + ">Unset
@@ -205,7 +206,7 @@ $(document).ready(function() {

- "/> + "/> @@ -231,7 +232,7 @@ $(document).ready(function() { @@ -274,7 +275,7 @@ $(document).ready(function() { - "/> + "/>
Patron Category - &branch=">Delete + &branch=">Delete
@@ -302,7 +303,7 @@ $(document).ready(function() { -- 2.39.5
Item Type - &branch=">Delete + &branch=">Delete