summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl16
-rw-r--r--extensions/GuidedBugEntry/Extension.pm18
-rw-r--r--extensions/GuidedBugEntry/template/en/default/pages/guided_products.js.tmpl8
3 files changed, 22 insertions, 20 deletions
diff --git a/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl
index 44f81abc8..cd3466fe7 100644
--- a/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl
@@ -21,13 +21,13 @@ strong.required:before {
height: 1px;
visibility: hidden;
}
-#advanced {
- margin-top: 50px;
+#standard {
+ margin-top: 2em;
}
-#advanced img {
+#standard img {
vertical-align: middle;
}
-#advanced a {
+#standard a {
cursor: pointer;
}
[% END %]
@@ -263,11 +263,11 @@ strong.required:before {
</div>
</form>
-<div id="advanced">
- <a id="advanced_img" href="enter_bug.cgi?format=__standard__&product=Mozilla+Developer+Network">
+<div id="standard">
+ <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 id="advanced_link" href="enter_bug.cgi?format=__standard__&product=Mozilla+Developer+Network">
- Switch to the advanced [% terms.bug %] entry form</a>
+ <a href="enter_bug.cgi?format=__standard__&product=[% product.name FILTER uri %]">
+ Switch to the standard [% terms.bug %] entry form</a>
</div>
<script>
diff --git a/extensions/GuidedBugEntry/Extension.pm b/extensions/GuidedBugEntry/Extension.pm
index 5665e18ae..127a93a8e 100644
--- a/extensions/GuidedBugEntry/Extension.pm
+++ b/extensions/GuidedBugEntry/Extension.pm
@@ -14,6 +14,7 @@ use Bugzilla::Error;
use Bugzilla::Status;
use Bugzilla::Util 'url_quote';
use Bugzilla::UserAgent;
+use Bugzilla::Extension::BMO::Data;
our $VERSION = '1';
@@ -92,9 +93,6 @@ sub _init_vars {
$vars->{'platform'} = detect_platform();
$vars->{'op_sys'} = detect_op_sys();
-
- eval 'use Bugzilla::Extension::BMO::Data';
- $vars->{'BMO'} = $@ ? 0 : 1;
}
sub page_before_template {
@@ -104,13 +102,17 @@ sub page_before_template {
return unless $page eq 'guided_products.js';
- # import product -> security group mappings from the BMO ext
+ # import data from the BMO ext
- our %product_sec_groups;
- eval q#use Bugzilla::Extension::BMO::Data '%product_sec_groups'#;
- return if $@;
+ $vars->{'product_sec_groups'} = \%product_sec_groups;
- $vars->{'products'} = \%product_sec_groups;
+ my %bug_formats;
+ foreach my $product (keys %create_bug_formats) {
+ if (my $format = Bugzilla::Extension::BMO::forced_format($product)) {
+ $bug_formats{$product} = $format;
+ }
+ }
+ $vars->{'create_bug_formats'} = \%bug_formats;
}
__PACKAGE__->NAME;
diff --git a/extensions/GuidedBugEntry/template/en/default/pages/guided_products.js.tmpl b/extensions/GuidedBugEntry/template/en/default/pages/guided_products.js.tmpl
index 268fe06f8..b58df8298 100644
--- a/extensions/GuidedBugEntry/template/en/default/pages/guided_products.js.tmpl
+++ b/extensions/GuidedBugEntry/template/en/default/pages/guided_products.js.tmpl
@@ -8,16 +8,16 @@
[%# this file allows us to pull in data defined in the BMO ext %]
-[% IF formats %]
- [% FOREACH product = formats %]
+[% IF create_bug_formats %]
+ [% FOREACH product = create_bug_formats %]
if (!products['[% product.key FILTER js %]']) [% ~%]
products['[% product.key FILTER js %]'] = {};
products['[% product.key FILTER js %]'].format = '[% product.value FILTER js %]';
[% END %]
[% END %]
-[% IF products %]
- [% FOREACH product = products %]
+[% IF product_sec_groups %]
+ [% FOREACH product = product_sec_groups %]
if (!products['[% product.key FILTER js %]']) [% ~%]
products['[% product.key FILTER js %]'] = {};
products['[% product.key FILTER js %]'].secgroup = '[% product.value FILTER js %]';