summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtemplate/default/attachment/edit.atml158
1 files changed, 79 insertions, 79 deletions
diff --git a/template/default/attachment/edit.atml b/template/default/attachment/edit.atml
index 61452145a..c9a2980b3 100755
--- a/template/default/attachment/edit.atml
+++ b/template/default/attachment/edit.atml
@@ -36,85 +36,6 @@
"
%]
-<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%">
-
- <tr>
- <td width="25%">
- <small>
- <b>Description:</b><br>
- <textarea rows="3" cols="25" name="description" wrap="soft">[% description %]</textarea><br>
-
- <b>MIME Type:</b><br>
- <input type="text" size="20" name="contenttypeentry" value="[% contenttype %]"><br>
-
- <b>Flags:</b><br>
- <input type="checkbox" name="ispatch" value="1"[% " checked" IF ispatch %]>patch
- <input type="checkbox" name="isobsolete" value="1"[% " checked" IF isobsolete %]>obsolete<br>
-
- [% IF statusdefs.size %]
- <b>Status:</b><br>
- [% FOREACH def = statusdefs %]
- <input type="checkbox" name="status" value="[% def.id %]"[% " checked" IF statuses.${def.id} %]>[% def.name %]<br>
- [% END %]
- [% END %]
-
- <div id="smallCommentFrame">
- <b>Comment (on the bug):</b><br>
- <textarea name="comment" rows="5" cols="25" wrap="soft"></textarea><br>
- </div>
-
- <input type="submit" value="Submit">
-
- </small>
- </td>
-
- [% IF isviewable %]
- <td width="75%">
- <textarea id="editFrame" name="comment" style="height: 400px; width: 100%; display: none;" cols="80" wrap="soft"></textarea>
- <iframe id="viewFrame" src="attachment.cgi?id=[% attachid %]&action=view" style="height: 400px; width: 100%;">
- <b>You cannot view the attachment while editing it because your browser does not support IFRAMEs.
- <a href="attachment.cgi?id=[% attachid %]&action=view">View the attachment on a separate page</a>.</b>
- </iframe>
- <script type="application/x-javascript" language="JavaScript">
- <!--
- if (typeof document.getElementById == "function") {
- document.write('<button id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>');
- document.write('<button id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>');
- document.write('<button id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>');
- }
- //-->
- </script>
- </td>
- [% ELSE %]
- <td id="noview" width="50%">
- <p><b>
- Attachment cannot be viewed because its MIME type is not either text/*, image/*, or application/vnd.mozilla.*.
- <a href="attachment.cgi?id=[% attachid %]&action=view">Download the attachment instead</a>.
- </b></p>
- </td>
- [% END %]
-
- </tr>
-
- </table>
-
- Attachments on this Bug:
- [% FOREACH a = attachments %]
- [% IF a == attachid %]
- #[% a %]
- [% ELSE %]
- <a href="attachment.cgi?id=[% a %]&action=edit">#[% a %]</a>
- [% END %]
- [% "|" UNLESS loop.last() %]
- [% END %]
-
-</form>
-
<script type="application/x-javascript" language="JavaScript">
<!--
function editAsComment()
@@ -220,6 +141,85 @@
//-->
</script>
+<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%">
+
+ <tr>
+ <td width="25%">
+ <small>
+ <b>Description:</b><br>
+ <textarea rows="3" cols="25" name="description" wrap="soft">[% description %]</textarea><br>
+
+ <b>MIME Type:</b><br>
+ <input type="text" size="20" name="contenttypeentry" value="[% contenttype %]"><br>
+
+ <b>Flags:</b><br>
+ <input type="checkbox" name="ispatch" value="1"[% " checked" IF ispatch %]>patch
+ <input type="checkbox" name="isobsolete" value="1"[% " checked" IF isobsolete %]>obsolete<br>
+
+ [% IF statusdefs.size %]
+ <b>Status:</b><br>
+ [% FOREACH def = statusdefs %]
+ <input type="checkbox" name="status" value="[% def.id %]"[% " checked" IF statuses.${def.id} %]>[% def.name %]<br>
+ [% END %]
+ [% END %]
+
+ <div id="smallCommentFrame">
+ <b>Comment (on the bug):</b><br>
+ <textarea name="comment" rows="5" cols="25" wrap="soft"></textarea><br>
+ </div>
+
+ <input type="submit" value="Submit">
+
+ </small>
+ </td>
+
+ [% IF isviewable %]
+ <td width="75%">
+ <textarea id="editFrame" name="comment" style="height: 400px; width: 100%; display: none;" cols="80" wrap="soft"></textarea>
+ <iframe id="viewFrame" src="attachment.cgi?id=[% attachid %]&action=view" style="height: 400px; width: 100%;">
+ <b>You cannot view the attachment while editing it because your browser does not support IFRAMEs.
+ <a href="attachment.cgi?id=[% attachid %]&action=view">View the attachment on a separate page</a>.</b>
+ </iframe>
+ <script type="application/x-javascript" language="JavaScript">
+ <!--
+ if (typeof document.getElementById == "function") {
+ document.write('<button id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>');
+ document.write('<button id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>');
+ document.write('<button id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>');
+ }
+ //-->
+ </script>
+ </td>
+ [% ELSE %]
+ <td id="noview" width="50%">
+ <p><b>
+ Attachment cannot be viewed because its MIME type is not either text/*, image/*, or application/vnd.mozilla.*.
+ <a href="attachment.cgi?id=[% attachid %]&action=view">Download the attachment instead</a>.
+ </b></p>
+ </td>
+ [% END %]
+
+ </tr>
+
+ </table>
+
+ Attachments on this Bug:
+ [% FOREACH a = attachments %]
+ [% IF a == attachid %]
+ #[% a %]
+ [% ELSE %]
+ <a href="attachment.cgi?id=[% a %]&action=edit">#[% a %]</a>
+ [% END %]
+ [% "|" UNLESS loop.last() %]
+ [% END %]
+
+</form>
+
<br>
[% INCLUDE global/footer %]