summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/global')
-rw-r--r--template/en/default/global/confirm-user-match.html.tmpl2
-rw-r--r--template/en/default/global/hidden-fields.html.tmpl23
2 files changed, 11 insertions, 14 deletions
diff --git a/template/en/default/global/confirm-user-match.html.tmpl b/template/en/default/global/confirm-user-match.html.tmpl
index 456af1fc2..fd09f89a6 100644
--- a/template/en/default/global/confirm-user-match.html.tmpl
+++ b/template/en/default/global/confirm-user-match.html.tmpl
@@ -21,8 +21,6 @@
#%]
[%# INTERFACE:
- # form: hash; the form values submitted to the script
- # mform: hash; the form multi-values submitted to the script
# fields: hash/record; the fields being matched, each of which has:
# type: single|multi: whether or not the user can select multiple matches
# flag_type: for flag requestee fields, the type of flag being requested
diff --git a/template/en/default/global/hidden-fields.html.tmpl b/template/en/default/global/hidden-fields.html.tmpl
index 2fa577b43..7327e43cf 100644
--- a/template/en/default/global/hidden-fields.html.tmpl
+++ b/template/en/default/global/hidden-fields.html.tmpl
@@ -20,23 +20,22 @@
#%]
[%# INTERFACE:
- # form: hash; the form fields/values for which to generate hidden fields.
- # mform: hash; the form fields/values with multiple values for which to
- # generate hidden fields.
# exclude: string; a regular expression matching fields to exclude
# from the list of hidden fields generated by this template
#%]
+[%# The global Bugzilla->cgi object is used to obtain form variable values. %]
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
[%# Generate hidden form fields for non-excluded fields. %]
-[% FOREACH field = form %]
- [% NEXT IF exclude && field.key.search(exclude) %]
- [% IF mform.${field.key}.size > 1 %]
- [% FOREACH mvalue = mform.${field.key} %]
- <input type="hidden" name="[% field.key FILTER html %]"
+[% FOREACH field = cgi.param() %]
+ [% NEXT IF exclude && field.search(exclude) %]
+ [%# The '.slice(0)' bit is here to force the 'param(field)' to be evaluated
+ in a list context, so we can avoid extra code checking for single valued or
+ empty fields %]
+ [% FOREACH mvalue = cgi.param(field).slice(0) %]
+ <input type="hidden" name="[% field FILTER html %]"
value="[% mvalue FILTER html FILTER html_linebreak %]">
[% END %]
- [% ELSE %]
- <input type="hidden" name="[% field.key FILTER html %]"
- value="[% field.value FILTER html FILTER html_linebreak %]">
- [% END %]
[% END %]