From 456365012757b0ac821a41f595a6ba1372351bad Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 28 Jan 2014 10:27:07 -0500 Subject: [PATCH] Bug 11625 - Default to logged in library for circ rules and notices & slips This patch makes the default circ rules and notices/slips to edit the logged in branch, if one is set. Test Plan: 1) Apply this patch 2) Log into staff side, and set your library 3) Browse to Administration/Circulation and fines rules 4) Note the rule set selected is for your library 5) Select "All libraries" 6) Note the rule set selected is for "All libraries" 7) Browse to Toos/Notices & slips 8) Note the notice set selected is for your library 9) Select "All libraries" 10) Not the rule set selected is for "All libraries" 11) Click "New Notice" 12) Note the Library field is set to "All libraries" --- admin/smart-rules.pl | 2 +- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- tools/letter.pl | 26 +++++++++++++------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 5d4166d..68c5d42 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -43,7 +43,7 @@ my ($template, $loggedinuser, $cookie) }); my $type=$input->param('type'); -my $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' ); +my $branch = $input->param('branch') || C4::Branch::mybranch(); my $op = $input->param('op') || q{}; if ($op eq 'delete') { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 52e2b83..3f4480c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -143,7 +143,7 @@ $(document).ready(function() {

Select a library :