$cgi->param('format_forced', 1);
}
}
- elsif (my $format = forced_format($cgi->param('product'))) {
+ elsif (my $format = forced_format($cgi->param('product'), $cgi->param('component'))) {
$cgi->param('format', $format);
}
sub forced_format {
# note: this is also called from the guided bug entry extension
- my ($product) = @_;
+ my ($product, $component) = @_;
return undef unless defined $product;
# always work on the correct product name
# check for a forced-format entry
my $forced = $create_bug_formats{$product->name} || return;
+ # check if the form is component-specific
+ return if $forced->{component} && $forced->{component} ne $component;
+
# should this user be included?
my $user = Bugzilla->user;
my $include
'developer.mozilla.org' => {'format' => 'mdn', 'include' => 'everyone',},
'Legal' => {'format' => 'legal', 'include' => 'everyone',},
'Recruiting' => {'format' => 'recruiting', 'include' => 'everyone',},
+ 'Toolkit' => {'component' => 'Blocklist Policy Requests',
+ 'format' => 'blocklist', 'include' => 'everyone',},
'Internet Public Policy' => {'format' => 'ipp', 'include' => 'everyone',},
);
#blocklist_form.noscript {
display: none;
}
+
+#standard_link {
+ margin-top: 2em;
+}
+
+#standard_link img {
+ vertical-align: middle;
+}
+
+#standard_link a {
+ cursor: pointer;
+}
[% END %]
[% inline_javascript = BLOCK %]
window.addEventListener("DOMContentLoaded", function() {
document.getElementById("blocklist_form").classList.remove("noscript");
+
+ const canonical_path = `${BUGZILLA.config.basepath}form.blocklist`;
+
+ if (location.pathname !== canonical_path) {
+ history.replaceState(null, document.title, canonical_path);
+ }
});
[% END %]
This form requires JavaScript to be enabled.
</noscript>
+<div id="standard_link">
+ <a href="[% basepath FILTER none %]enter_bug.cgi?product=Toolkit&component=Blocklist%20Policy%20Requests&format=__standard__">
+ <img src="[% basepath FILTER none %]extensions/BMO/web/images/advanced.png" width="16" height="16" border="0">
+ Switch to the standard [% terms.bug %] entry form</a>
+ </a>
+</div>
+
[% PROCESS global/footer.html.tmpl %]