From: Ian Walls To: dev@bywatersolutions.com Cc: Ian Walls Subject: [PATCH] Bug 5824: Creating a circ rule for a specific library causes anomalies Date: Thu, 3 Mar 2011 13:32:22 -0500 Message-Id: <1299177142-23115-1-git-send-email-ian.walls@bywatersolutions.com> X-Mailer: git-send-email 1.5.6.5 X-Original-Sender: ian.walls@bywatersolutions.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of koha@dev.bywatersolutions.com designates 174.143.239.187 as permitted sender) smtp.mail=koha@dev.bywatersolutions.com X-Google-Group-Id: 274270250429 Precedence: list Mailing-list: list dev@bywatersolutions.com; contact dev+owners@bywatersolutions.com List-ID: List-Help: , Content-Type: text/plain; charset="utf-8" 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 --- 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 fdd9b91..d015ec2 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 eaa0d43..92a44ce 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() { -- 1.5.6.5
Item Type - &branch=">Delete + &branch=">Delete