| [%# The contents of this file are subject to the Mozilla Public |
| # License Version 1.1 (the "License"); you may not use this file |
| # except in compliance with the License. You may obtain a copy of |
| # the License at http://www.mozilla.org/MPL/ |
| # |
| # Software distributed under the License is distributed on an "AS |
| # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| # implied. See the License for the specific language governing |
| # rights and limitations under the License. |
| # |
| # The Original Code is the Bugzilla Bug Tracking System. |
| # |
| # The Initial Developer of the Original Code is Netscape Communications |
| # Corporation. Portions created by Netscape are |
| # Copyright (C) 1998 Netscape Communications Corporation. All |
| # Rights Reserved. |
| # |
| # Contributor(s): Myk Melez <myk@mozilla.org> |
| #%] |
| |
| [% PROCESS global/variables.none.tmpl %] |
| |
| <style> |
| * { font-size: small; } |
| #comment { width: 100%; height: 100%; font-family: monospace; } |
| #form-controls { height: 40px; } |
| #form-controls td { width: 25%; text-align: center; } |
| </style> |
| |
| [% javascript = BLOCK %] |
| var viewing_formatted_diff = true; |
| function viewPrettyPatch() |
| { |
| viewing_formatted_diff = !viewing_formatted_diff; |
| var src = "attachment.cgi?id=[% attachment.id %]"; |
| var buttonText = "View Formatted Diff"; |
| if (viewing_formatted_diff) { |
| src += "&action=prettypatch" |
| buttonText = "View Plain Diff"; |
| } |
| |
| top.document.getElementById('viewFrame').src = src; |
| document.getElementById('viewPrettyPatchButton').innerHTML = buttonText; |
| } |
| function onSubmitComments() |
| { |
| // If someone just left the entire comment alone, then upload the form |
| // with no comment at all. |
| var textarea = document.getElementById("comment"); |
| if (textarea.defaultValue === textarea.value) |
| textarea.value = ""; |
| return true; |
| } |
| [% END %] |
| |
| [% PROCESS global/header.html.tmpl |
| hide_content = 1 |
| javascript = javascript |
| %] |
| |
| <form method="post" action="attachment.cgi" target="_top" onsubmit="return onSubmitComments();"> |
| <input type="hidden" name="id" value="[% attachment.id %]"> |
| <input type="hidden" name="action" value="update"> |
| <input type="hidden" name="contenttypemethod" value="manual"> |
| <input type="hidden" name="delta_ts" value="[% attachment.modification_time FILTER html %]"> |
| [% IF user.id %] |
| <input type="hidden" name="token" value="[% issue_hash_token([attachment.id, attachment.modification_time]) FILTER html %]"> |
| [% END %] |
| <input type="hidden" name="description" value="[% attachment.description FILTER html %]"> |
| <input type="hidden" name="filename" value="[% attachment.filename FILTER html %]"> |
| <input type="hidden" name="contenttypeentry" value="[% attachment.contenttype FILTER html %]"> |
| <input type="hidden" name="ispatch" [% IF attachment.ispatch %] value="1" [% ELSE %] value="0" [% END %] > |
| <input type="hidden" name="isobsolete" [% IF attachment.isobsolete %] value="1" [% ELSE %] value="0" [% END %] > |
| [% IF (Param("insidergroup") && user.in_group(Param("insidergroup"))) %] |
| <input type="hidden" name="isprivate" [% IF attachment.isprivate %] value="1" [% ELSE %] value="0" [% END %] > |
| [% END %] |
| |
| <table style="width:100%; height:90%" cellpadding=0 cellspacing=0> |
| <tr id="form-controls"> |
| <td> |
| <button id="submitBtn" type="submit">Submit</button> |
| </td> |
| <td> |
| [% IF attachment.flag_types.size > 0 %] |
| [% PROCESS "flag/list.html.tmpl" attach_id = attachment.id |
| bug_id = attachment.bug_id |
| flag_types = attachment.flag_types %]<br> |
| [% END %] |
| |
| [% IF NOT attachment.bug.cc || NOT attachment.bug.cc.contains(user.login) %] |
| <input type="checkbox" id="addselfcc" name="addselfcc" |
| [%~ ' checked="checked"' |
| IF user.settings.state_addselfcc.value == 'always' |
| || (!attachment.bug.user.has_any_role |
| && user.settings.state_addselfcc.value == 'cc_unless_role') %]> |
| <label for="addselfcc">Add me to CC list</label> |
| [% END %] |
| </td> |
| <td> |
| [% IF attachment.ispatch %] |
| <table> |
| <tr><th style="text-align: left;">Bot Status:</th></tr> |
| <tr> |
| <td> |
| <div class="statusBubble" style="margin-left: 30px;"> |
| <iframe src="https://webkit-queues.webkit.org/status-bubble/[% attachment.id %]" |
| style="width: 400px; height: 20px; border: none;" scrolling="no"> |
| </iframe> |
| <iframe src="https://ews.webkit.org/status-bubble/[% attachment.id %]?hide_icons=True" |
| style="width: 700px; height: 20px; border: none;" scrolling="no"> |
| </iframe> |
| </div> |
| </td> |
| </tr> |
| </table> |
| [% END %] |
| </td> |
| <td> |
| <div>Back to <a href="show_bug.cgi?id=[% attachment.bug_id %]" target="_top">[% terms.Bug %] #[% attachment.bug_id %]</a></div> |
| [% IF attachment.ispatch %] |
| <script type="text/javascript"> |
| <!-- |
| if (typeof document.getElementById == "function") { |
| document.write('<p><button type="button" id="viewPrettyPatchButton" onclick="viewPrettyPatch();">View Plain Diff</button></p>'); |
| } |
| //--> |
| </script> |
| [% END %] |
| </td> |
| </tr> |
| <tr> |
| <td colspan="4"> |
| Enter comments below:<br> |
| <textarea id=comment name="comment" wrap="soft"> |
| [% quotedpatch FILTER html %] |
| </textarea><br> |
| |
| </tr> |
| </table> |
| |
| </form> |