From: Jean-AndrĂ© Santoni <[email protected]>

Sorted the branches select.
Modified display to "branchcode - branchname"
Fixed a bug, selection was inverted.
---
 admin/aqbudgets.pl                                 |    2 +-
 .../prog/en/modules/admin/aqbudgets.tmpl           |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl
index b5e565b..01bfdbc 100755
--- a/admin/aqbudgets.pl
+++ b/admin/aqbudgets.pl
@@ -155,7 +155,7 @@ if ($op eq 'add_form') {
     # build branches select
     my $branches = GetBranches;
     my @branchloop_select;
-    foreach my $thisbranch ( keys %$branches ) {
+    foreach my $thisbranch ( sort keys %$branches ) {
         my %row = (
             value      => $thisbranch,
             branchname => $branches->{$thisbranch}->{'branchname'},
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
index 4648b3d..b001038 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
@@ -319,7 +319,9 @@
     <select name="budget_branchcode">
     <option value=""></option>
     <!-- TMPL_LOOP name="branchloop_select" -->
-        <!-- TMPL_IF name="selected" --> <option value="<!-- TMPL_VAR 
name="value" -->" > <!--TMPL_ELSE--> <option value="<!-- TMPL_VAR name="value" 
-->" selected="selected"> <!-- /TMPL_IF --> <!-- TMPL_VAR name="branchname" 
--></option>
+        <option value="<!-- TMPL_VAR name="value" -->"<!-- TMPL_IF 
name="selected" -->selected="selected"<!-- /TMPL_IF -->>
+            <!-- TMPL_VAR name="value" --> - <!-- TMPL_VAR name="branchname" 
-->
+        </option>
     <!-- /TMPL_LOOP -->
     </select>
     </li>
-- 
1.6.3.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to