Bug 1083258 - The size check for input <select>s on show_bug.cgi doesn't take…

Bug 1083258 - The size check for input <select>s on show_bug.cgi doesn't take into account is_active r=dkl a=glob
parent e50bddb2
...@@ -3951,6 +3951,11 @@ sub choices { ...@@ -3951,6 +3951,11 @@ sub choices {
my @resolutions = grep($_->name, @{ $resolution_field->legal_values }); my @resolutions = grep($_->name, @{ $resolution_field->legal_values });
$choices{'resolution'} = \@resolutions; $choices{'resolution'} = \@resolutions;
foreach my $key (keys %choices) {
my $value = $self->$key;
$choices{$key} = [grep { $_->is_active || $_->name eq $value } @{ $choices{$key} }];
}
$self->{'choices'} = \%choices; $self->{'choices'} = \%choices;
return $self->{'choices'}; return $self->{'choices'};
} }
......
...@@ -1194,7 +1194,6 @@ ...@@ -1194,7 +1194,6 @@
<input type="hidden" id="[% selname %]_dirty"> <input type="hidden" id="[% selname %]_dirty">
<select id="[% selname %]" name="[% selname %]"> <select id="[% selname %]" name="[% selname %]">
[% FOREACH x = bug.choices.${selname} %] [% FOREACH x = bug.choices.${selname} %]
[% NEXT IF NOT x.is_active AND x.name != bug.${selname} %]
<option value="[% x.name FILTER html %]" <option value="[% x.name FILTER html %]"
[% " selected" IF x.name == bug.${selname} %]> [% " selected" IF x.name == bug.${selname} %]>
[%- x.name FILTER html %] [%- x.name FILTER html %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment