]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Moving JS to beginning of file to avoid IE warnings.
authorgerv%gerv.net <>
Wed, 13 Feb 2002 06:55:25 +0000 (06:55 +0000)
committergerv%gerv.net <>
Wed, 13 Feb 2002 06:55:25 +0000 (06:55 +0000)
template/default/attachment/edit.atml

index 61452145a4bf0fd0563991cc325ca8973f89552a..c9a2980b3d2d422c49228e88a779c09c45e37252 100755 (executable)
   "
 %]
 
-<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()
   //-->
 </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 %]