diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/attachment/createformcontents.html.tmpl | 9 | ||||
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 34 | ||||
-rw-r--r-- | template/en/default/global/header.html.tmpl | 23 |
3 files changed, 49 insertions, 17 deletions
diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl index 956b7bcc7..2fc80a518 100644 --- a/template/en/default/attachment/createformcontents.html.tmpl +++ b/template/en/default/attachment/createformcontents.html.tmpl @@ -33,7 +33,7 @@ </td> </tr> [% IF Param("maxlocalattachment") %] -<tr> +<tr class="expert_fields"> <th>BigFile:</th> <td> <input type="checkbox" id="bigfile" @@ -45,7 +45,7 @@ </tr> [% END %] [% IF Param("allow_attach_url") %] -<tr> +<tr class="expert_fields"> <th><label for="attachurl">AttachURL</label>:</th> <td> <em>URL to be attached instead.</em><br> @@ -54,6 +54,7 @@ onkeyup="URLFieldHandler()" onblur="URLFieldHandler()"> </td> </tr> +</tbody> [% END %] <tr> <th><label for="description">Description</label>:</th> @@ -62,7 +63,7 @@ <input type="text" id="description" name="description" size="60" maxlength="200"> </td> </tr> -<tr> +<tr class="expert_fields"> <th>Content Type:</th> <td> <em>If the attachment is a patch, check the box below.</em><br> @@ -89,7 +90,7 @@ onchange="if (this.value) this.form.contenttypemethod[2].checked = true;"> </td> </tr> -<tr> +<tr class="expert_fields"> <td> </td> <td> [% IF flag_types && flag_types.size > 0 %] diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 5b99d38ba..7b6180781 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -34,7 +34,7 @@ 'skins/standard/yui/calendar.css' ] javascript_urls = [ "js/attachment.js", "js/util.js", "js/yui/yahoo-dom-event.js", "js/yui/calendar.js", - "js/field.js" ] + "js/field.js", "js/yui/cookie.js", "js/TUI.js" ] %] <script type="text/javascript"> @@ -159,6 +159,12 @@ function handleWantsAttachment(wants_attachment) { } } + +TUI_alternates['expert_fields'] = 'Show Advanced Fields'; +// Hide the Advanced Fields by default, unless the user has a cookie +// that specifies otherwise. +TUI_hide_default('expert_fields'); + --> </script> @@ -187,7 +193,16 @@ function handleWantsAttachment(wants_attachment) { </tr> <tr> - <td colspan="4"> </td> + <td colspan="4"> + <a id="expert_fields_controller" class="controller bz_default_hidden" + href="javascript:TUI_toggle_class('expert_fields')">Hide + Advanced Fields</a> + [%# Show the link if the browser supports JS %] + <script type="text/javascript"> + YAHOO.util.Dom.removeClass('expert_fields_controller', + 'bz_default_hidden'); + </script> + </td> </tr> <tr> @@ -454,7 +469,7 @@ function handleWantsAttachment(wants_attachment) { </tr> </tbody> -<tbody> +<tbody class="expert_fields"> [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] @@ -466,6 +481,9 @@ function handleWantsAttachment(wants_attachment) { value_span = 3 %] </tr> [% END %] +</tbody> + +<tbody> <tr> <th>Summary:</th> @@ -501,7 +519,7 @@ function handleWantsAttachment(wants_attachment) { </tr> [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] - <tr> + <tr class="expert_fields"> <th> </th> <td colspan="3"> @@ -513,9 +531,7 @@ function handleWantsAttachment(wants_attachment) { </td> </tr> [% END %] -</tbody> -<tbody class="expert_fields"> <tr> <th>Attachment:</th> <td colspan="3"> @@ -550,7 +566,9 @@ function handleWantsAttachment(wants_attachment) { </script> </td> </tr> +</tbody> +<tbody class="expert_fields"> [% IF user.in_group('editbugs', product.id) %] [% IF use_keywords %] <tr> @@ -577,7 +595,7 @@ function handleWantsAttachment(wants_attachment) { [% END %] </tbody> -<tbody> +<tbody class="expert_fields"> [% IF group.size %] <tr> <th> </th> @@ -604,7 +622,9 @@ function handleWantsAttachment(wants_attachment) { </td> </tr> [% END %] +</tbody> +<tbody> [%# Form controls for entering additional data about the bug being created. %] [% Hook.process("form") %] diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index a25cf70dc..82a75e6a3 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -188,12 +188,23 @@ type="text/css"> <![endif]--> - - [% IF javascript %] - <script type="text/javascript"> - [% javascript %] - </script> - [% END %] + <script type="text/javascript"> + <!-- + [%# Make some Bugzilla information available to all scripts. + # We don't import every parameter and constant because we + # don't want to add a lot of uncached JS to every page. + #%] + var BUGZILLA = { + param: { + cookiepath: '[% Param('cookiepath') FILTER js %]' + } + }; + + [% IF javascript %] + [% javascript %] + [% END %] + // --> + </script> [% IF javascript_urls %] [% FOREACH javascript_url = javascript_urls %] |