[MT2343] Select in budget add forum
authorJean-André Santoni <jeanandre.santoni@biblibre.com>
Thu, 3 Dec 2009 12:43:33 +0000 (13:43 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Sun, 20 Dec 2009 13:31:23 +0000 (14:31 +0100)
Sorted the branches select.
Modified display to "branchcode - branchname"
Fixed a bug, selection was inverted.

admin/aqbudgets.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl

index 8f45e99..c74d1d2 100755 (executable)
@@ -152,7 +152,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'},
index b6342f1..92d8890 100644 (file)
     <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>