Bug 4307: Sorts library locations in inventory drop-down list.
Replacement patch for previous patch submitted. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
86c82d0aaa
commit
a8927736dc
|
|
@ -77,6 +77,7 @@ $(document).ready(function(){
|
|||
<legend>Select items you want to check</legend>
|
||||
<ol><li>
|
||||
<label for="branchloop">Library</label><select id="branchloop" name="branchcode" style="width:12em;">
|
||||
<option value="">All Locations</option>
|
||||
<!-- TMPL_LOOP NAME="branchloop" -->
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
|
||||
|
|
|
|||
|
|
@ -65,13 +65,13 @@ my ($template, $borrowernumber, $cookie)
|
|||
|
||||
my $branches = GetBranches();
|
||||
my @branch_loop;
|
||||
push @branch_loop, {value => "", branchname => "All Locations", };
|
||||
for my $branch_hash (keys %$branches) {
|
||||
push @branch_loop, {value => "$branch_hash",
|
||||
branchname => $branches->{$branch_hash}->{'branchname'},
|
||||
selected => ($branch_hash eq $branchcode?1:0)};
|
||||
}
|
||||
|
||||
@branch_loop = sort {$a->{branchname} cmp $b->{branchname}} @branch_loop;
|
||||
my @authorised_value_list;
|
||||
my $authorisedvalue_categories;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue