From: Frédéric Buclin Date: Tue, 26 Jul 2011 09:06:11 +0000 (+0200) Subject: Bug 647158: The Error Console in Firefox reports X-Git-Tag: bugzilla-4.1.3~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ae7ccb35d64116573ae2611a752b4fd6a147dce;p=thirdparty%2Fbugzilla.git Bug 647158: The Error Console in Firefox reports "unbalanced tree was written using document.write()" when reporting a new bug or when visiting the "User Authentication" panel in the Parameters page r=glob a=LpSolit --- diff --git a/js/attachment.js b/js/attachment.js index dfa6d472d3..7861164b1e 100644 --- a/js/attachment.js +++ b/js/attachment.js @@ -309,7 +309,7 @@ function hideElementById(id) } } -function showElementById(id, val) +function showElementById(id) { var elm = document.getElementById(id); if (elm) { @@ -345,3 +345,16 @@ function toggle_attachment_details_visibility ( ) } } +/* Used in bug/create.html.tmpl to show/hide the attachment field. */ + +function handleWantsAttachment(wants_attachment) { + if (wants_attachment) { + hideElementById('attachment_false'); + showElementById('attachment_true'); + } + else { + showElementById('attachment_false'); + hideElementById('attachment_true'); + clearAttachmentFields(); + } +} diff --git a/template/en/default/admin/params/common.html.tmpl b/template/en/default/admin/params/common.html.tmpl index 3ec38ca56d..d86da0dcdc 100644 --- a/template/en/default/admin/params/common.html.tmpl +++ b/template/en/default/admin/params/common.html.tmpl @@ -62,55 +62,48 @@ [% END %] [% ELSIF param.type == "o" %] -
- [% boxSize = 7 %] [% boxSize = 3 + param.choices.size IF param.choices.size < 7 %] [% plist = Param(param.name).split(',') %] - [% ELSIF param.type == "s" %] + + +
+
Add an attachment @@ -629,11 +610,7 @@ TUI_hide_default('attachment_text_field'); flag_table_id ="attachment_flags" %]
- +
[% END %]