summaryrefslogtreecommitdiffstats
path: root/extensions/GuidedBugEntry
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/GuidedBugEntry')
-rw-r--r--extensions/GuidedBugEntry/Extension.pm23
-rw-r--r--extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl2
2 files changed, 17 insertions, 8 deletions
diff --git a/extensions/GuidedBugEntry/Extension.pm b/extensions/GuidedBugEntry/Extension.pm
index 9ff7441d3..3f739d9fe 100644
--- a/extensions/GuidedBugEntry/Extension.pm
+++ b/extensions/GuidedBugEntry/Extension.pm
@@ -43,13 +43,18 @@ sub enter_bug_start {
) {
# skip the first step if a product is provided
if ($cgi->param('product')) {
- print $cgi->redirect('enter_bug.cgi?format=guided#h=dupes' .
+ print $cgi->redirect('enter_bug.cgi?format=guided' .
+ ($cgi->param('format_forced') ? '&format_forced=1' : '') .
+ '#h=dupes' .
'|' . url_quote($cgi->param('product')) .
'|' . url_quote($cgi->param('component') || '')
);
exit;
}
+ # Do not redirect to product forms if we came from there already
+ $vars->{'format_forced'} = 1 if $cgi->param('format_forced');
+
$self->_init_vars($vars);
print $cgi->header();
$template->process('guided/guided.html.tmpl', $vars)
@@ -104,17 +109,21 @@ sub page_before_template {
my ($self, $args) = @_;
my $page = $args->{'page_id'};
my $vars = $args->{'vars'};
+ my $cgi = Bugzilla->cgi;
return unless $page eq 'guided_products.js';
- my %bug_formats;
- foreach my $product (keys %create_bug_formats) {
- if (my $format = Bugzilla::Extension::BMO::forced_format($product)) {
- $bug_formats{$product} = $format;
+ if (!$cgi->param('format_forced')) {
+ 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;
}
- $vars->{'create_bug_formats'} = \%bug_formats;
- $vars->{'webdev'} = Bugzilla->cgi->param('webdev');
+
+ $vars->{'webdev'} = $cgi->param('webdev');
}
__PACKAGE__->NAME;
diff --git a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
index 007ae5ce7..ee1ba2931 100644
--- a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
+++ b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
@@ -71,7 +71,7 @@ dupes.setLabels(
}
);
</script>
-<script type="text/javascript" src="page.cgi?id=guided_products.js"></script>
+<script type="text/javascript" src="page.cgi?id=guided_products.js[% "&amp;format_forced=1" IF format_forced %]"></script>
[% PROCESS global/footer.html.tmpl %]
[%############################################################################%]