]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 161203 - Bug changes with intermediate pages munges fields with
authorbbaetz%student.usyd.edu.au <>
Tue, 27 Aug 2002 16:35:05 +0000 (16:35 +0000)
committerbbaetz%student.usyd.edu.au <>
Tue, 27 Aug 2002 16:35:05 +0000 (16:35 +0000)
multiple values (e.g., CC)
patch by "Randall M! Gee", r=bbaetz, myk

CGI.pl
process_bug.cgi
template/en/default/account/login.html.tmpl
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

diff --git a/CGI.pl b/CGI.pl
index 69819263a12e1f487752f0337b7ebbd821605029..836788c172f94f8f629833285f4715297f82ba59 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -787,6 +787,7 @@ Content-type: text/html
         
         $vars->{'target'} = $nexturl;
         $vars->{'form'} = \%::FORM;
+        $vars->{'mform'} = \%::MFORM;
         
         print "Content-type: text/html\n\n";
         $template->process("account/login.html.tmpl", $vars)
index a3461605871102af06ad86a38d1c67325cac4315..45d8ba1ddea1ed78ee3a203d5d14b3ad6ecc634b 100755 (executable)
@@ -41,7 +41,6 @@ use RelationSet;
 use vars qw(%versions
           %components
           %COOKIE
-          %MFORM
           %legal_opsys
           %legal_platform
           %legal_priority
@@ -204,6 +203,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;
@@ -359,6 +359,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;
     
@@ -1014,6 +1015,7 @@ foreach my $id (@idlist) {
 
         $::FORM{'delta_ts'} = $delta_ts;
         $vars->{'form'} = \%::FORM;
+        $vars->{'mform'} = \%::MFORM;
         
         $vars->{'bug_id'} = $id;
         $vars->{'quoteUrls'} = \&quoteUrls;
index b1f2377e5eba5ff873dfdb18ae9a9e9c8828c11b..29b5b1aee22b57c9cdd1d64c9767da6ffc1d33f7 100644 (file)
@@ -22,6 +22,8 @@
 [%# INTERFACE:
   # target: string. URL to go to after login.
   # form: hash; the form values which need to be submitted to the target script
+  # mform: hash; the form values with multiple values which need to be 
+  #   submitted to the target script
   #%]
 
 [% PROCESS global/header.html.tmpl 
index ff87216536f018f112444cd61a9c74c583a42722..22ae57b75790432cc44c968aadc3cd756188b78b 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 24766aa04319830fc3feabc97383cb3ca98c4cf5..6305c11e40dedb19aa67c0a1cce2e9e867c98627 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 %]