Closed
Bug 126487
Opened 24 years ago
Closed 24 years ago
Edit attachment as comment submits attachment as comment before user can edit
Categories
(Bugzilla :: Attachments & Requests, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: asa, Assigned: myk)
Details
Attachments
(1 file)
1.37 KB,
patch
|
bbaetz
:
review+
bbaetz
:
review+
|
Details | Diff | Splinter Review |
Edit attachment as comment submits attachment as comment before user can edit. I
believe this broke when jkeiser checked in some form submission changes in the
last few days.
You can test by clicking the button "edit attachment as comment" at this
landfill bug
http://landfill.tequilarista.org/bugzilla-tip/attachment.cgi?id=18&action=edit
(or some other less spammy bug if you prefer).
Comment 1•24 years ago
|
||
This probably isn't the long-term fix, but it does solve the immidate problem.
Comment 2•24 years ago
|
||
Comment on attachment 70377 [details] [diff] [review]
Patch
r=bbaetz x 2.
jkeiser says that this is correct, too, and it WFM.
Attachment #70377 -
Flags: review+
Comment 3•24 years ago
|
||
Checked in... still have to do something about redisigning that page :)
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 4•24 years ago
|
||
Comment on attachment 70377 [details] [diff] [review]
Patch
>Index: edit.atml
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/template/default/attachment/edit.atml,v
>retrieving revision 1.9
>diff -u -r1.9 edit.atml
>--- edit.atml 12 Feb 2002 22:55:25 -0000 1.9
>+++ edit.atml 19 Feb 2002 21:33:09 -0000
>@@ -188,9 +188,9 @@
> <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>');
>+ document.write('<button type="button" id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>');
>+ document.write('<button type="button" id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>');
>+ document.write('<button type="button" id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>');
> }
> //-->
> </script>
Comment 5•24 years ago
|
||
Comment on attachment 70377 [details] [diff] [review]
Patch
>Index: edit.atml
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/template/default/attachment/edit.atml,v
>retrieving revision 1.9
>diff -u -r1.9 edit.atml
>--- edit.atml 12 Feb 2002 22:55:25 -0000 1.9
>+++ edit.atml 19 Feb 2002 21:33:09 -0000
>@@ -188,9 +188,9 @@
> <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>');
>+ document.write('<button type="button" id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>');
>+ document.write('<button type="button" id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>');
>+ document.write('<button type="button" id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>');
> }
> //-->
> </script>
Comment 6•24 years ago
|
||
Comment on attachment 70377 [details] [diff] [review]
Patch
>Index: edit.atml
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/template/default/attachment/edit.atml,v
>retrieving revision 1.9
>diff -u -r1.9 edit.atml
>--- edit.atml 12 Feb 2002 22:55:25 -0000 1.9
>+++ edit.atml 19 Feb 2002 21:33:09 -0000
>@@ -188,9 +188,9 @@
> <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>');
>+ document.write('<button type="button" id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>');
>+ document.write('<button type="button" id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>');
>+ document.write('<button type="button" id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>');
> }
> //-->
> </script>
Comment 7•24 years ago
|
||
Mozilla has always submitted when <button> does not have a type. I just tested
with 0.9.4 as well as a build from the first. I think this must have been a
recent Bugzilla change.
This is mandated in the spec:
http://www.w3.org/TR/html401/interact/forms.html#adef-type-BUTTON
Comment 8•24 years ago
|
||
Comment on attachment 70377 [details] [diff] [review]
Patch
>Index: edit.atml
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/template/default/attachment/edit.atml,v
>retrieving revision 1.9
>diff -u -r1.9 edit.atml
>--- edit.atml 12 Feb 2002 22:55:25 -0000 1.9
>+++ edit.atml 19 Feb 2002 21:33:09 -0000
>@@ -188,9 +188,9 @@
> <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>');
>+ document.write('<button type="button" id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>');
>+ document.write('<button type="button" id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>');
>+ document.write('<button type="button" id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>');
> }
> //-->
> </script>
Comment 9•24 years ago
|
||
Comment on attachment 70377 [details] [diff] [review]
Patch
>Index: edit.atml
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/template/default/attachment/edit.atml,v
>retrieving revision 1.9
>diff -u -r1.9 edit.atml
>--- edit.atml 12 Feb 2002 22:55:25 -0000 1.9
>+++ edit.atml 19 Feb 2002 21:33:09 -0000
Testing fix on bmo.
Comment 10•24 years ago
|
||
applied this fix to b.m.o
Comment 11•24 years ago
|
||
What happens here if the user's JS is off?
Comment 12•23 years ago
|
||
fixing incorrect milestones on fixed bugs.
Target Milestone: --- → Bugzilla 2.16
Component: Creating/Changing Bugs → attachment and request management
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•