Skip to content

Commit

Permalink
[#56448214] Random drop down menu order when updating member attribut…
Browse files Browse the repository at this point in the history
…e SC 39223

Drop down menu sorting was not being applied when editing (updating) member
attributes that were already assigned a value.
  • Loading branch information
dlbptfs committed Jan 15, 2015
1 parent 4545a9c commit 92e0d59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cgi/members/memberentry.pl
Original file line number Diff line number Diff line change
Expand Up @@ -789,11 +789,11 @@ sub patron_attributes_form {
$newentry->{use_dropdown} = 0;
if ($attr_type->authorised_value_category()) {
$newentry->{use_dropdown} = 1;
$newentry->{auth_val_loop} = GetAuthorisedValues($attr_type->authorised_value_category(), $attr->{value});
my $authvals = GetAuthorisedValues($attr_type->authorised_value_category(), $attr->{value});
$newentry->{auth_val_loop} = [ sort {lc($a->{lib}) cmp lc($b->{lib})} @{$authvals} ];
}
$i++;
$newentry->{form_id} = "patron_attr_$i";
#use Data::Dumper; die Dumper($entry) if $entry->{use_dropdown};
push @attribute_loop, $newentry;
}
} else {
Expand Down

0 comments on commit 92e0d59

Please sign in to comment.