diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index 139f6ac38..98934bfbb 100644 --- a/Bugzilla/FlagType.pm +++ b/Bugzilla/FlagType.pm @@ -401,7 +401,7 @@ sub _get_clusions $product_name ||= "__Any__"; $component_id ||= 0; $component_name ||= "__Any__"; - $clusions{"$product_name:$component_name"} = "$product_id:$component_id"; + $clusions{"$product_id:$component_id"} = "$product_name:$component_name"; } return \%clusions; } diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 6fef3ff19..e63da9db1 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -916,13 +916,12 @@ sub create Bugzilla => Bugzilla::Template::Plugin::Bugzilla->new, # HTML - [% FOREACH category = type.inclusions %] - + [% FOREACH category = type.inclusions.keys %] + [% END %] - [% FOREACH category = type.exclusions %] - + [% FOREACH category = type.exclusions.keys %] + [% END %] [%# Add a hidden button at the top of the form so that the user pressing "return" @@ -121,12 +121,12 @@ Inclusions:
- [% PROCESS "global/select-menu.html.tmpl" name="inclusion_to_remove" multiple="1" size="7" options=type.inclusions %]
+ [% html_select('inclusion_to_remove', '', type.inclusions, '', { multiple => '1', size => '7' }) %] Exclusions:
- [% PROCESS "global/select-menu.html.tmpl" name="exclusion_to_remove" multiple="1" size="7" options=type.exclusions %]
+ [% html_select('exclusion_to_remove', '', type.exclusions, '', { multiple => '1', size => '7' }) %] diff --git a/template/en/default/bug/process/verify-field-values.html.tmpl b/template/en/default/bug/process/verify-field-values.html.tmpl index 5e3a7e79c..e411e9fbb 100644 --- a/template/en/default/bug/process/verify-field-values.html.tmpl +++ b/template/en/default/bug/process/verify-field-values.html.tmpl @@ -25,13 +25,7 @@ [% FOR f = incorrect_fields %] [% f.field.description | html %]:
- [% PROCESS "global/select-menu.html.tmpl" - name = f.field.name - options = f.options - default = f.options.0 - size = 10 - multiple = f.field.type == constants.FIELD_TYPE_MULTI_SELECT - %] + [% html_select(f.field.name, f.options.0, f.options, '', { size => 10, multiple => (f.field.type == constants.FIELD_TYPE_MULTI_SELECT) }) %] [% END %] diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 0dc3bd2ea..ccb940bfa 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -207,11 +207,6 @@ 'series.frequency * 2', ], -'global/select-menu.html.tmpl' => [ - 'options', - 'size', -], - 'global/tabs.html.tmpl' => [ 'content', ], diff --git a/template/en/default/global/select-menu.html.tmpl b/template/en/default/global/select-menu.html.tmpl deleted file mode 100644 index f8d4d68e2..000000000 --- a/template/en/default/global/select-menu.html.tmpl +++ /dev/null @@ -1,64 +0,0 @@ -[%# The contents of this file are subject to the Mozilla Public - # License Version 1.1 (the "License"); you may not use this file - # except in compliance with the License. You may obtain a copy of - # the License at http://www.mozilla.org/MPL/ - # - # Software distributed under the License is distributed on an "AS - # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - # implied. See the License for the specific language governing - # rights and limitations under the License. - # - # The Original Code is the Bugzilla Bug Tracking System. - # - # The Initial Developer of the Original Code is Netscape Communications - # Corporation. Portions created by Netscape are - # Copyright (C) 1998 Netscape Communications Corporation. All - # Rights Reserved. - # - # Contributor(s): Myk Melez - #%] - -[%# INTERFACE: - # name: string; the name of the menu. - # - # multiple: boolean; whether or not the menu is multi-select - # - # size: integer; the number of items to display at once - # - # options: array or hash; the items with which to populate the array. - # If a hash is passed, the hash keys become the names displayed - # to the user while the hash values become the value of the item. - # - # default: string; the item selected in the menu by default. - # - # onchange: code; JavaScript to be run when the user changes the value - # selected in the menu. - #%] - -[%# Get the scalar representation of the options reference, - # which looks like "ARRAY(0xA352BA3F)" or "HASH(0xA352BA3F)", - # so we can figure out whether it is a reference to an array - # or a hash. - #%] -[% options_type = BLOCK %][% options %][% END %] - - diff --git a/template/en/default/request/queue.html.tmpl b/template/en/default/request/queue.html.tmpl index 0a7f6d3c0..35b38f187 100644 --- a/template/en/default/request/queue.html.tmpl +++ b/template/en/default/request/queue.html.tmpl @@ -91,10 +91,7 @@ to some group are shown by default. Flag: - [% PROCESS "global/select-menu.html.tmpl" - name="type" - options=types - default=selected_type %] + [% html_select('type', selected_type, types) %] @@ -115,19 +112,16 @@ to some group are shown by default. Group By: [% groups = { - "Requester" => 'requester' , - "Requestee" => 'requestee', - "Flag" => 'type' , - "Product/Component" => 'category' + 'requester' => "Requester", + 'requestee' => "Requestee", + 'type' => "Flag", + 'category' => "Product/Component", } %] - [% PROCESS "global/select-menu.html.tmpl" name="group" options=groups default=selected_group %] + [% html_select('group', selected_group, groups) %] Status: - [% PROCESS "global/select-menu.html.tmpl" - name="status" - options=["all", "?", "+-", "+", "-"] - default=selected_status %] + [% html_select('status', selected_status, ["all", "?", "+-", "+", "-"]) %]