diff options
author | myk%mozilla.org <> | 2002-06-04 05:31:08 +0000 |
---|---|---|
committer | myk%mozilla.org <> | 2002-06-04 05:31:08 +0000 |
commit | 92c42f457c526f0d45ef6ce505cd89edbee9b14d (patch) | |
tree | 8fcafef7362afbc06b3520bbc9b5558855dca45f /template/en/default/global | |
parent | ece5d5c0aff51c2cf11648fe5d184c6b36cbe96b (diff) | |
download | bugs-92c42f457c526f0d45ef6ce505cd89edbee9b14d.tar bugs-92c42f457c526f0d45ef6ce505cd89edbee9b14d.tar.gz bugs-92c42f457c526f0d45ef6ce505cd89edbee9b14d.tar.bz2 bugs-92c42f457c526f0d45ef6ce505cd89edbee9b14d.tar.xz bugs-92c42f457c526f0d45ef6ce505cd89edbee9b14d.zip |
Fix for bug 145030: Removes use of CGI.pm from Template Toolkit until problems with it can be investigated and resolved.
r=jouni,gerv
Diffstat (limited to 'template/en/default/global')
-rw-r--r-- | template/en/default/global/select-menu.html.tmpl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/template/en/default/global/select-menu.html.tmpl b/template/en/default/global/select-menu.html.tmpl new file mode 100644 index 000000000..c27f60e8b --- /dev/null +++ b/template/en/default/global/select-menu.html.tmpl @@ -0,0 +1,56 @@ +<!-- 1.0@bugzilla.org --> +[%# 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 <myk@mozilla.org> + #%] + +[%# INTERFACE: + # name: string; the name of the menu. + # + # 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. + # + #%] + +[%# 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 %] + +<select name="[% name FILTER html %]"> + [% IF options_type.search("ARRAY") %] + [% FOREACH value = options %] + <option value="[% value FILTER html %]" + [% " selected" IF value == default %]> + [% value FILTER html %] + </option> + [% END %] + [% ELSIF values_type.search("HASH") %] + [% FOREACH option = options %] + <option value="[% option.value FILTER html %]" + [% " selected" IF option.value == default %]> + [% option.key FILTER html %] + </option> + [% END %] + [% END %] +</select> |