]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 299405: Attachments don't work if you need to log in again [ Undefined subroutine...
authorlpsolit%gmail.com <>
Thu, 18 Jan 2007 06:27:09 +0000 (06:27 +0000)
committerlpsolit%gmail.com <>
Thu, 18 Jan 2007 06:27:09 +0000 (06:27 +0000)
skins/standard/global.css
template/en/default/account/auth/login.html.tmpl
template/en/default/bug/create/confirm-create-dupe.html.tmpl
template/en/default/global/confirm-user-match.html.tmpl
template/en/default/global/hidden-fields.html.tmpl

index b85a9e2773ce773e5571607246d89036c627a2a6..7504cb0fbe4b861b756a43be02e1faeca24d43dd 100644 (file)
@@ -281,6 +281,14 @@ dl dl > dt {
     border-top: none;
 }
 
+.box {
+    border: 1px solid black;
+    color: black;
+    background-color: #ffc;
+    margin: 1em;
+    padding: 0.5em 1em;
+}
+
 /* Rules specific for printing */
 @media print {
     #header, #footer {
index 15ec4a477afe63f125fa7c20c463f6bbaeb00c24..f57efc113f303b8c0d423f88a5454f4435762745 100644 (file)
   onload = "document.forms['login'].Bugzilla_login.focus()"
 %]
 
+[% USE Bugzilla %]
+
 <p>
   I need a legitimate login and password to continue.
 </p>
 
-<form name="login" action="[% target FILTER html %]" method="POST">
+<form name="login" action="[% target FILTER html %]" method="POST"
+[%- IF Bugzilla.cgi.param("data") %] enctype="multipart/form-data"[% END %]>
   <table>
     <tr>
       <th align="right"><label for="Bugzilla_login">Login:</label></th>
index 47d2ae916a8acf01bc4d6e99aceb17911d6c6c71..9c2b3dbc25876c3d885510c5b293f169626e224c 100644 (file)
@@ -27,6 +27,8 @@
   title = "Already filed $terms.bug"
 %]
 
+[% USE Bugzilla %]
+
 <table cellpadding="20">
   <tr>
     <td bgcolor="#ff0000">
@@ -44,7 +46,8 @@ FILTER bug_link(bugid) FILTER none %].</font></p>
   <p>If you are sure you used the same form to submit a new [% terms.bug %],
   click 'File [% terms.bug %] again'.<p>
 
-  <form name="create" id="create" method="post" action="post_bug.cgi">
+  <form name="create" id="create" method="post" action="post_bug.cgi"
+  [%- IF Bugzilla.cgi.param("data") %] enctype="multipart/form-data"[% END %]>
     [% PROCESS "global/hidden-fields.html.tmpl"
                exclude="^(Bugzilla_login|Bugzilla_password|ignore_token)$" %]
     <input type="hidden" name="ignore_token" value="[% bugid FILTER html %]">
index 8fb20e0703c909fe75afe6da89c0ad10904e590b..35ec93f74e81864dfe3b43c3dee30a00b36a9137 100644 (file)
 [% IF matchsuccess == 1 %]
   [% PROCESS global/header.html.tmpl title="Confirm Match" %]
 
+[% USE Bugzilla %]
+
   <form method="post" 
   [% IF script -%]
     action="[% script %]"
   [%- END -%]
+  [% IF Bugzilla.cgi.param("data") %]
+    enctype="multipart/form-data"
+  [% END %]
   >
 
   <p>
index 7327e43cfac15227bad77ccd4d74fb04488a3b83..063cdd33b377bc55cddac060556b4162f70d9189 100644 (file)
   [%# 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 %]"
+  [% IF field == "data" && cgi.param("data") %]
+    <div class="box">
+      <p>
+        We were unable to store the file you uploaded because of incomplete information
+        in the form you just submitted. Because we are unable to retain the file between
+        form submissions, you must re-attach the file in addition to completing the
+        remaining missing information above.
+      </p>
+      <p>
+        Please re-attach the file <b>[% cgi.param(field) FILTER html %]</b> in
+        the field below:
+      </p>
+      <p>
+        <input type="file" id="data" name="data" size="50">
+      </p>
+    </div>
+  [% ELSE %]
+    [% FOREACH mvalue = cgi.param(field).slice(0) %]
+      <input type="hidden" name="[% field FILTER html %]"
              value="[% mvalue FILTER html FILTER html_linebreak %]">
     [% END %]
+  [% END %]
 [% END %]