diff options
author | Byron Jones <bjones@mozilla.com> | 2013-05-01 08:12:59 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-05-01 08:12:59 +0200 |
commit | b2f7765446bb382ff0716785832c4135f695b498 (patch) | |
tree | ad709e4fd3d1a0d7c7b422fa2eaa9722307f1a7b | |
parent | 617e59c29d0987ab03dc59db4f97df36dc29b58f (diff) | |
download | bugzilla-b2f7765446bb382ff0716785832c4135f695b498.tar.gz bugzilla-b2f7765446bb382ff0716785832c4135f695b498.tar.xz |
Bug 867207: make the "Internet Public Policy" custom form the default for bugs, with a link to the standard bug entry form
-rw-r--r-- | extensions/BMO/Extension.pm | 6 | ||||
-rw-r--r-- | extensions/BMO/lib/Data.pm | 4 | ||||
-rw-r--r-- | extensions/BMO/template/en/default/bug/create/create-ipp.html.tmpl | 20 |
3 files changed, 29 insertions, 1 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 7d992645d..798bca82a 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -1063,8 +1063,12 @@ sub forced_format { my ($product) = @_; return undef unless defined $product; + # always work on the correct product name + $product = Bugzilla::Product->new({ name => $product, cache => 1 }) + unless blessed($product); + # check for a forced-format entry - my $forced = $create_bug_formats{blessed($product) ? $product->name : $product} + my $forced = $create_bug_formats{$product->name} || return; # should this user be included? diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm index 6c13165b7..3e03aa625 100644 --- a/extensions/BMO/lib/Data.pm +++ b/extensions/BMO/lib/Data.pm @@ -463,6 +463,10 @@ our %create_bug_formats = ( 'format' => 'legal', 'include' => 'everyone', }, + 'Internet Public Policy' => { + 'format' => 'ipp', + 'include' => 'everyone', + }, ); 1; diff --git a/extensions/BMO/template/en/default/bug/create/create-ipp.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-ipp.html.tmpl index 0bf75f4a9..fb59cfeb3 100644 --- a/extensions/BMO/template/en/default/bug/create/create-ipp.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-ipp.html.tmpl @@ -21,6 +21,19 @@ font-family: inherit; font-size: inherit; } + +#standard_link { + margin-top: 2em; +} + +#standard_link img { + vertical-align: middle; +} + +#standard_link a { + cursor: pointer; +} + [% END %] [% inline_javascript = BLOCK %] @@ -160,4 +173,11 @@ function validateAndSubmit() { [ <span class="required_star">*</span> <span class="required_explanation">Required Field</span> ] +<div id="standard_link"> + <a href="enter_bug.cgi?format=__standard__&product=[% product.name FILTER uri %]"> + <img src="extensions/BMO/web/images/advanced.png" width="16" height="16" border="0"></a> + <a href="enter_bug.cgi?format=__standard__&product=[% product.name FILTER uri %]"> + Switch to the standard [% terms.bug %] entry form</a> +</div> + [% PROCESS global/footer.html.tmpl %] |