summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Pyrzak <guy.pyrzak@gmail.com>2010-10-28 02:35:16 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-10-28 02:35:16 +0200
commit178eb04938393f06f60ee1a21df5d2a955c93634 (patch)
tree4ac2fb627e0888fc9949655c3a4bd28126cd78ba
parentdf0f3430e1592503dd0ca6a8dd4f2da1da67eb5c (diff)
downloadbugzilla-178eb04938393f06f60ee1a21df5d2a955c93634.tar.gz
bugzilla-178eb04938393f06f60ee1a21df5d2a955c93634.tar.xz
Bug 607716: The attachment content is pasted into a comment when editing an attachment with JS disabled
r=LpSolit r=mkanat a=LpSolit
-rw-r--r--template/en/default/attachment/edit.html.tmpl5
-rw-r--r--template/en/default/global/textarea.html.tmpl1
2 files changed, 6 insertions, 0 deletions
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 676f374e6..f124df43f 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -180,6 +180,7 @@
minrows = 10
cols = 80
wrap = 'soft'
+ disabled = 'disabled'
defaultcontent = (attachment.contenttype.match('^text\/')) ?
attachment.data.replace('(.*\n|.+)', '>$1') : undef
%]
@@ -217,6 +218,10 @@
document.write('<button type="button" id="editButton" onclick="editAsComment(patchviewerinstalled);">Edit Attachment As Comment<\/button>');
document.write('<button type="button" id="undoEditButton" onclick="undoEditAsComment(patchviewerinstalled);" class="bz_default_hidden">Undo Edit As Comment<\/button>');
document.write('<button type="button" id="redoEditButton" onclick="redoEditAsComment(patchviewerinstalled);" class="bz_default_hidden">Redo Edit As Comment<\/button>');
+ var editFrame = document.getElementById('editFrame');
+ if (editFrame) {
+ editFrame.disabled = false;
+ }
[% END %]
[% IF use_patchviewer %]
document.write('<button type="button" id="viewDiffButton" onclick="viewDiff(attachment_id, patchviewerinstalled);">View Attachment As Diff<\/button>');
diff --git a/template/en/default/global/textarea.html.tmpl b/template/en/default/global/textarea.html.tmpl
index 65dd93bdc..c158615bd 100644
--- a/template/en/default/global/textarea.html.tmpl
+++ b/template/en/default/global/textarea.html.tmpl
@@ -41,6 +41,7 @@
[% IF style %] style="[% style FILTER html %]"[% END %]
[% IF classes %] class="[% classes FILTER html %]"[% END %]
[% IF wrap %] wrap="[% wrap FILTER html %]"[% END %]
+ [% IF disabled %] disabled="disabled"[% END %]
[% IF defaultrows && user.settings.zoom_textareas.value == 'off' %]
rows="[% defaultrows FILTER html %]"
[% ELSE %]