Commit 7c0b9e7f authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 299405: Attachments don't work if you need to log in again [ Undefined…

Bug 299405: Attachments don't work if you need to log in again [ Undefined subroutine @ Fh::slice ] - Patch by Fré©ric Buclin <LpSolit@gmail.com> r/a=justdave
parent 8a33252e
......@@ -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 {
......
......@@ -31,11 +31,14 @@
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>
......
......@@ -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 %]">
......
......@@ -42,10 +42,15 @@
[% 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>
......
......@@ -34,8 +34,26 @@
[%# 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 %]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment