From b2f7765446bb382ff0716785832c4135f695b498 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 1 May 2013 14:12:59 +0800 Subject: Bug 867207: make the "Internet Public Policy" custom form the default for bugs, with a link to the standard bug entry form --- extensions/BMO/Extension.pm | 6 +++++- extensions/BMO/lib/Data.pm | 4 ++++ .../en/default/bug/create/create-ipp.html.tmpl | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) (limited to 'extensions') 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() { [ * Required Field ] + + [% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b