]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 161203 - Bug changes with intermediate pages munges fields with
authorbbaetz%student.usyd.edu.au <>
Tue, 3 Sep 2002 14:24:54 +0000 (14:24 +0000)
committerbbaetz%student.usyd.edu.au <>
Tue, 3 Sep 2002 14:24:54 +0000 (14:24 +0000)
multiple values (e.g., CC)
original patch by randall_gee_51227124@yahoo.com (Randall M! Gee),
r=bbaetz, myk

Ported to 2.16 by me, r=preed x2

process_bug.cgi
template/en/default/bug/process/confirm-duplicate.html.tmpl
template/en/default/bug/process/midair.html.tmpl
template/en/default/bug/process/verify-new-product.html.tmpl
template/en/default/global/hidden-fields.html.tmpl

index 5482a1ad23a25808ea718fdab8707a9ea144298b..43c926867fd4f8d21e677496806977714513ae17 100755 (executable)
@@ -42,7 +42,6 @@ use RelationSet;
 use vars qw(%versions
           %components
           %COOKIE
-          %MFORM
           %legal_keywords
           %legal_opsys
           %legal_platform
@@ -188,6 +187,7 @@ if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct)
     # a verification form.
     if (!$vok || !$cok || !$mok || (Param('usebuggroups') && !defined($::FORM{'addtonewgroup'}))) {
         $vars->{'form'} = \%::FORM;
+        $vars->{'mform'} = \%::MFORM;
         
         if (!$vok || !$cok || !$mok) {
             $vars->{'verify_fields'} = 1;
@@ -344,6 +344,7 @@ sub DuplicateUserConfirm {
     # ask the duper what he/she wants to do.
     
     $vars->{'form'} = \%::FORM;
+    $vars->{'mform'} = \%::MFORM;
     $vars->{'original_bug_id'} = $original;
     $vars->{'duplicate_bug_id'} = $dupe;
     
@@ -885,6 +886,7 @@ foreach my $id (@idlist) {
 
         $::FORM{'delta_ts'} = $delta_ts;
         $vars->{'form'} = \%::FORM;
+        $vars->{'mform'} = \%::MFORM;
         
         $vars->{'bug_id'} = $id;
         $vars->{'quoteUrls'} = \&quoteUrls;
index 1725719005f6a1c66bf4d0014518036a3919981d..abb0f719f1febe0eece7fc2c3b90453641b59790 100644 (file)
@@ -21,6 +21,7 @@
 
 [%# INTERFACE:
   # form: hash; the form values submitted to the script
+  # mform: hash; the form multi-values submitted to the script
   # original_bug_id: number; the bug number for the bug
   #   against which a bug is being duped
   # duplicate_bug_id: number; the bug number for the bug
index a30e89b3ca474a42f0754b2006d46a274c642c4a..21f5f6fb2a2d46e95d54fdf32f3d4f0df23db69e 100644 (file)
@@ -21,6 +21,7 @@
 
 [%# INTERFACE:
   # form: hash; the form values submitted to the script
+  # mform: hash; the form multi-values submitted to the script
   # operations: array; bug activity since the user last displayed the bug form,
   #   used by bug/activity/table.html.tmpl to display recent changes that will
   #   be overwritten if the user submits these changes.  See that template
index 21c5664b88adf1a79e12cea6cca5ae4d401cbe45..77a2ab7629b4200c436bac71ad124466a925d95a 100644 (file)
@@ -21,6 +21,7 @@
 
 [%# INTERFACE:
   # form: hash; the form values submitted to the script
+  # mform: hash; the form multi-values submitted to the script
   # verify_fields: boolean; whether or not to verify 
   #   the version, component, and target milestone fields
   # versions: array; versions for the new product.
index e622e7b900f84c27ce1907a98ad7a6903d99fc39..f968fab200d78217c94adea21febff65a4ac8945 100644 (file)
@@ -21,6 +21,8 @@
 
 [%# 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
   #%]
 [%# Generate hidden form fields for non-excluded fields. %]
 [% FOREACH field = form %]
   [% NEXT IF exclude && field.key.search(exclude) %]
-  <input type="hidden" name="[% field.key %]"
-         value="[% field.value | html | html_linebreak %]">
+  [% IF mform.${field.key}.size > 1 %]
+    [% FOREACH mvalue = mform.${field.key} %]
+      <input type="hidden" name="[% field.key %]"
+             value="[% mvalue | html | html_linebreak %]">
+    [% END %]
+  [% ELSE %]
+    <input type="hidden" name="[% field.key %]"
+           value="[% field.value | html | html_linebreak %]">
+  [% END %]
 [% END %]