From 67eb42b3e38110697c3e6301fef7fc8fcc66065b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Tue, 26 Jul 2011 11:08:44 +0200 Subject: [PATCH] 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 --- js/attachment.js | 15 +++- .../en/default/admin/params/common.html.tmpl | 77 +++++++++---------- .../default/admin/params/editparams.html.tmpl | 2 +- .../en/default/bug/create/create.html.tmpl | 43 +++-------- 4 files changed, 60 insertions(+), 77 deletions(-) diff --git a/js/attachment.js b/js/attachment.js index d759248cdf..9251a9b541 100644 --- a/js/attachment.js +++ b/js/attachment.js @@ -312,7 +312,7 @@ function hideElementById(id) } } -function showElementById(id, val) +function showElementById(id) { var elm = document.getElementById(id); if (elm) { @@ -348,3 +348,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 @@ -625,11 +606,7 @@ TUI_hide_default('expert_fields'); flag_table_id ="attachment_flags" %]
- +
[% END %] -- 2.47.2