diff options
Diffstat (limited to 'extensions/BMO')
-rw-r--r-- | extensions/BMO/Extension.pm | 27 | ||||
-rw-r--r-- | extensions/BMO/lib/Data.pm | 8 | ||||
-rw-r--r-- | extensions/BMO/template/en/default/global/choose-product.html.tmpl | 13 |
3 files changed, 45 insertions, 3 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index e8e58db27..44a1a3e69 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -186,6 +186,26 @@ sub _get_field_values_sort_key { return \%field_values; } +sub active_custom_fields { + my ($self, $args) = @_; + my $fields = $args->{'fields'}; + my $params = $args->{'params'}; + my $product = $params->{'product'}; + my $component = $params->{'component'}; + + return if !$product; + + my $product_name = blessed $product ? $product->name : $product; + my $component_name = blessed $component ? $component->name : $component; + + my @tmp_fields; + foreach my $field (@$$fields) { + next if cf_hidden_in_product($field->name, $product_name, $component_name, $params->{'type'}); + push(@tmp_fields, $field); + } + $$fields = \@tmp_fields; +} + sub cf_hidden_in_product { my ($field_name, $product_name, $component_name, $custom_flag_mode) = @_; @@ -196,8 +216,11 @@ sub cf_hidden_in_product { # Also in buglist.cgi, we pass in a list of components instead # of a single compoent name everywhere else. - my $component_list = ref $component_name ? $component_name - : [ $component_name ]; + my $component_list = []; + if ($component_name) { + $component_list = ref $component_name ? $component_name + : [ $component_name ]; + } if ($custom_flag_mode) { if ($custom_flag_mode == 1) { diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm index be829e786..93118f5b1 100644 --- a/extensions/BMO/lib/Data.pm +++ b/extensions/BMO/lib/Data.pm @@ -52,6 +52,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash", "AUS" => [], "Core" => [], "Fennec" => [], + "Fennec Native" => [], "mozilla.org" => ["Release Engineering"], "Mozilla Services" => [], "NSPR" => [], @@ -82,6 +83,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash", "Core" => [], "Directory" => [], "Fennec" => [], + "Fennec Native" => [], "Firefox" => [], "MailNews Core" => [], "mozilla.org" => ["Release Engineering"], @@ -178,6 +180,12 @@ our $cf_disabled_flags = [ 'cf_status_thunderbird7', 'cf_tracking_seamonkey24', 'cf_status_seamonkey24', + 'cf_tracking_firefox8', + 'cf_status_firefox8', + 'cf_tracking_thunderbird8', + 'cf_status_thunderbird8', + 'cf_tracking_seamonkey25', + 'cf_status_seamonkey25', ]; # Who to CC on particular bugmails when certain groups are added or removed. diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl index 7e0a8dc18..9daae1d25 100644 --- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl +++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl @@ -125,7 +125,18 @@ href="http://www.mozilla.org/support/">Visit the mozilla.org support page</a> be [% END %] [% FOREACH p = c.products %] - <tr> + [% class = "" %] + [% has_entry_groups = 0 %] + [% FOREACH gid = p.group_controls.keys %] + [% IF p.group_controls.$gid.entry %] + [% has_entry_groups = 1 %] + [% class = class _ " group_$gid" %] + [% END %] + [% END %] + <tr class="[% "group_secure" IF has_entry_groups +%] [% class FILTER html %]" + [%- IF has_entry_groups %] title="This product requires one or more + group memberships in order to enter [% terms.bugs %] in it. You have them, but be + aware not everyone else does."[% END %]> <th align="right" valign="top"> [% IF p.name == "Mozilla PR" AND target == "enter_bug.cgi" AND NOT format AND NOT cgi.param("debug") %] <a href="[% target FILTER uri %]?product=[% p.name FILTER uri -%] |