Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
a87a5b41
Commit
a87a5b41
authored
Oct 26, 2001
by
myk%mozilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 98602: re-implementation of "create attachment" page.
Patch by Myk Melez <myk@mozilla.org>. r=gerv@mozilla.org,jake@acutex.net
parent
3a866ab7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
160 additions
and
10 deletions
+160
-10
contenttypes
template/default/attachment/contenttypes
+6
-0
created.atml
template/default/attachment/created.atml
+35
-0
edit.atml
template/default/attachment/edit.atml
+4
-3
enter.atml
template/default/attachment/enter.atml
+108
-0
list.atml
template/default/attachment/list.atml
+4
-4
viewall.atml
template/default/attachment/viewall.atml
+3
-3
No files found.
template/default/attachment/contenttypes
0 → 100644
View file @
a87a5b41
<option value="text/plain">plain text (text/plain)</option>
<option value="text/html">HTML source (text/html)</option>
<option value="image/gif">GIF image (image/gif)</option>
<option value="image/jpeg">JPEG image (image/jpeg)</option>
<option value="image/png">PNG image (image/png)</option>
<option value="application/octet-stream">binary file (application/octet-stream)</option>
template/default/attachment/created.atml
0 → 100644
View file @
a87a5b41
[% INCLUDE global/header
title = "Changes Submitted"
style = "th { text-align: left; }"
%]
<table border="1">
<tr>
<td>
<h2>
<a title="[% description %]" href="attachment.cgi?id=[% attachid %]&action=edit">Attachment #[% attachid %]</a>
to <a href="show_bug.cgi?id=[% bugid %]">Bug #[% bugid %]</a> Created
</h2>
[% mailresults %]
[% IF contenttypemethod == 'autodetect' %]
<p>
<b>Note:</b> Bugzilla automatically detected the content type
<em>[% contenttype %]</em> for this attachment. If this is
incorrect, correct the value by
<a href="attachment.cgi?id=[% attachid %]&action=edit">editing the attachment</a>.
</p>
[% END %]
</td>
<td>
<a href="show_bug.cgi?id=[% bugid %]">Go back to bug #[% bugid %]</a>
</td>
</tr>
</table>
<p>
<a href="attachment.cgi?bugid=[% bugid %]&action=enter">Create Another Attachment to Bug #[% bugid %]</a>
</p>
[% INCLUDE global/footer %]
template/default/attachment/edit.atml
View file @
a87a5b41
...
...
@@ -19,6 +19,7 @@
<form
method=
"post"
action=
"attachment.cgi"
onsubmit=
"normalizeComments();"
>
<input
type=
"hidden"
name=
"id"
value=
"[% attachid %]"
>
<input
type=
"hidden"
name=
"action"
value=
"update"
>
<input
type=
"hidden"
name=
"contenttypemethod"
value=
"manual"
>
<table
width=
"100%"
>
...
...
@@ -29,7 +30,7 @@
<textarea
rows=
"3"
cols=
"25"
name=
"description"
wrap=
"soft"
>
[% description %]
</textarea><br>
<b>
MIME Type:
</b><br>
<input
type=
"text"
size=
"20"
name=
"
mimetype"
value=
"[% mime
type %]"
><br>
<input
type=
"text"
size=
"20"
name=
"
contenttypeentry"
value=
"[% content
type %]"
><br>
<b>
Flags:
</b><br>
<input
type=
"checkbox"
name=
"ispatch"
value=
"1"
[%
"
checked
"
IF
ispatch
%]
>
patch
...
...
@@ -100,8 +101,8 @@
// If this is a plaintext document, remove cruft that Mozilla adds
// because it treats it as an HTML document with a big PRE section.
// http://bugzilla.mozilla.org/show_bug.cgi?id=86012
var
mimeType
=
'[% mime
type %]'
;
if
(
mime
Type
==
'text/plain'
)
var
contentType
=
'[% content
type %]'
;
if
(
content
Type
==
'text/plain'
)
{
theContent
=
theContent
.
replace
(
/^<html><head
\/
><body><pre>/
,
""
);
theContent
=
theContent
.
replace
(
/<
\/
pre><
\/
body><
\/
html>$/
,
""
);
...
...
template/default/attachment/enter.atml
0 → 100644
View file @
a87a5b41
[%# Define strings that will serve as the title and header of this page %]
[% title = BLOCK %]Create New Attachment for Bug #[% bugid %][% END %]
[% h1 = BLOCK %]Create New Attachment for <a href="show_bug.cgi?id=[% bugid %]">Bug #[% bugid %]</a>[% END %]
[% h2 = BLOCK %][% bugsummary FILTER html %][% END %]
[% INCLUDE global/header
title = title
h1 = h1
h2 = h2
style = "
th { text-align: right; vertical-align: baseline; white-space: nowrap; }
td { text-align: left; vertical-align: baseline; padding-bottom: 5px; }
"
%]
<form name="entryform" method="post" action="attachment.cgi" enctype="multipart/form-data">
<input type="hidden" name="bugid" value="[% bugid %]">
<input type="hidden" name="action" value="insert">
<table>
<tr>
<th>File:</th>
<td>
<em>Enter the path to the file on your computer.</em><br>
<input type="file" name="data" size="50">
</td>
</tr>
<tr>
<th>Description:</th>
<td>
<em>Describe the attachment briefly.</em><br>
<input type="text" name="description" size="60" maxlength="200">
</td>
</tr>
<tr>
<th></th>
<td>
</td>
</tr>
<tr>
<th>Content Type:</th>
<td>
<em>If the attachment is a patch, check the box below.</em><br>
<input type="checkbox" name="ispatch" value="1" onchange="setContentTypeDisabledState();"> patch<br><br>
<em>Otherwise, choose a method for determining the content type.</em><br>
<input type="radio" name="contenttypemethod" value="autodetect">
auto-detect<br>
<input type="radio" name="contenttypemethod" value="list">
select from list: <select name="contenttypeselection" onchange="this.form.contenttypemethod[1].checked = true;">
[% PROCESS attachment/contenttypes %]
</select><br>
<input type="radio" name="contenttypemethod" value="manual">
enter manually: <input type="text" name="contenttypeentry" size="30" maxlength="200" onchange="if (this.value) this.form.contenttypemethod[2].checked = true;">
</td>
</tr>
<tr>
<th>Obsoletes:</th>
<td>
<em>(optional) Check each existing attachment made obsolete by your new attachment.</em><br>
[% IF attachments.size %]
[% FOREACH attachment = attachments %]
<input type="checkbox" name="obsolete" value="[% attachment.id %]">
<a href="attachment.cgi?id=[% attachment.id %]&action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br>
[% END %]
[% ELSE %]
[no attachments can be made obsolete]
[% END %]
</td>
</tr>
<tr>
<th>Comment:</th>
<td>
<em>(optional) Add a comment about this attachment to the bug.</em><br>
<textarea wrap="soft" name="comment" rows="6" cols="80"></textarea>
</td>
</tr>
<tr>
<th> </th>
<td><input type="submit" value="Submit"></td>
</tr>
</table>
</form>
<script language="JavaScript" type="text/javascript">
<!--
function setContentTypeDisabledState()
{
var entryform = document.entryform;
var isdisabled = false;
if (entryform.ispatch.checked)
isdisabled = true;
for (var i=0 ; i<entryform.contenttypemethod.length ; i++)
entryform.contenttypemethod[i].disabled = isdisabled;
entryform.contenttypeselection.disabled = isdisabled;
entryform.contenttypeentry.disabled = isdisabled;
}
//-->
</script>
[% INCLUDE global/footer %]
template/default/attachment/list.atml
View file @
a87a5b41
...
...
@@ -12,9 +12,9 @@
<tr>
<td valign="top">
[% IF attachment.isobsolete %]
<strike><a href="attachment.cgi?id=[% attachment.attachid %]&action=view">[% attachment.description %]</a></strike>
<strike><a href="attachment.cgi?id=[% attachment.attachid %]&action=view">[% attachment.description
FILTER html
%]</a></strike>
[% ELSE %]
<a href="attachment.cgi?id=[% attachment.attachid %]&action=view">[% attachment.description %]</a>
<a href="attachment.cgi?id=[% attachment.attachid %]&action=view">[% attachment.description
FILTER html
%]</a>
[% END %]
</td>
...
...
@@ -22,7 +22,7 @@
[% IF attachment.ispatch %]
<i>patch</i>
[% ELSE %]
[% attachment.
mime
type %]
[% attachment.
content
type %]
[% END %]
</td>
...
...
@@ -48,7 +48,7 @@
<tr>
<td colspan="4">
<a href="
createattachment.cgi?id=[% bugid %]">Create a new a
ttachment</a> (proposed patch, testcase, etc.)
<a href="
attachment.cgi?bugid=[% bugid %]&action=enter">Create a New A
ttachment</a> (proposed patch, testcase, etc.)
</td>
<td colspan="1">
<a href="attachment.cgi?bugid=[% bugid %]&action=viewall">View All</a>
...
...
template/default/attachment/viewall.atml
View file @
a87a5b41
...
...
@@ -24,9 +24,9 @@
<tr>
<td valign="top">
[% IF a.isobsolete %]
<strike>[% a.description %]</strike>
<strike>[% a.description
FILTER html
%]</strike>
[% ELSE %]
[% a.description %]
[% a.description
FILTER html
%]
[% END %]
</td>
...
...
@@ -34,7 +34,7 @@
[% IF a.ispatch %]
<i>patch</i>
[% ELSE %]
[% a.
mimetype
%]
[% a.
contenttype FILTER html
%]
[% END %]
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment