From 5db6eeb9cf4bf82d785dd193703b46b2139247e5 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 21 Apr 2015 14:00:18 +0800 Subject: Bug 579089: Change default Hardware / OS values to be "Unspecified/Unspecified" --- .../params/editparams-current_panel.html.tmpl | 16 +++++--- .../hook/admin/products/edit-common-rows.html.tmpl | 35 +++++++++++++++++ .../hook/admin/products/updated-changes.html.tmpl | 14 +++++++ .../default/hook/bug/edit-after_op_sys.html.tmpl | 45 ++++++++++++++++++++++ 4 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 extensions/BMO/template/en/default/hook/admin/products/edit-common-rows.html.tmpl create mode 100644 extensions/BMO/template/en/default/hook/admin/products/updated-changes.html.tmpl create mode 100644 extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl (limited to 'extensions/BMO/template/en/default/hook') diff --git a/extensions/BMO/template/en/default/hook/admin/params/editparams-current_panel.html.tmpl b/extensions/BMO/template/en/default/hook/admin/params/editparams-current_panel.html.tmpl index 39f063464..9b251431c 100644 --- a/extensions/BMO/template/en/default/hook/admin/params/editparams-current_panel.html.tmpl +++ b/extensions/BMO/template/en/default/hook/admin/params/editparams-current_panel.html.tmpl @@ -6,8 +6,14 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% IF panel.name == "groupsecurity" %] - [% panel.param_descs.delete_comments_group = - 'The name of the group of users who can delete comments by using the "deleted" comment tag.' - %] -[% END -%] +[% +IF panel.name == "groupsecurity"; + panel.param_descs.delete_comments_group = + 'The name of the group of users who can delete comments by using the "deleted" comment tag.'; + +ELSIF panel.name == "bugfields"; + panel.param_descs.defaultplatform = "This parameter is ignored on BMO, use per-product defaults instead."; + panel.param_descs.defaultopsys = "This parameter is ignored on BMO, use per-product defaults instead."; + +END; +%] diff --git a/extensions/BMO/template/en/default/hook/admin/products/edit-common-rows.html.tmpl b/extensions/BMO/template/en/default/hook/admin/products/edit-common-rows.html.tmpl new file mode 100644 index 000000000..7093bcfc6 --- /dev/null +++ b/extensions/BMO/template/en/default/hook/admin/products/edit-common-rows.html.tmpl @@ -0,0 +1,35 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + + + Default Platform + + [% INCLUDE default_select + field_name = 'default_platform_id' + field_value = product.default_platform_id + field_values = bug_fields.rep_platform.legal_values + %] + [%= INCLUDE default_select + field_name = 'default_op_sys_id' + field_value = product.default_op_sys_id + field_values = bug_fields.op_sys.legal_values + %] + + + +[% BLOCK default_select %] + +[% END %] diff --git a/extensions/BMO/template/en/default/hook/admin/products/updated-changes.html.tmpl b/extensions/BMO/template/en/default/hook/admin/products/updated-changes.html.tmpl new file mode 100644 index 000000000..af480134e --- /dev/null +++ b/extensions/BMO/template/en/default/hook/admin/products/updated-changes.html.tmpl @@ -0,0 +1,14 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% IF changes.default_platform_id.defined %] +

Default Platform updated

+[% END %] +[% IF changes.default_op_sys_id.defined %] +

Default Op-Sys updated

+[% END %] diff --git a/extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl b/extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl new file mode 100644 index 000000000..b5c3a722b --- /dev/null +++ b/extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl @@ -0,0 +1,45 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# because the "from reporter" button adds likely unnecessary noise to a bug, + # we only show it on unconfirmed or untriaged bugs %] +[% + RETURN UNLESS + (bug.status.value == "UNCONFIRMED" || bug.component == "Untriaged") + && bug.check_can_change_field('op_sys', 0, 1); + hw_os = bug.reporters_hw_os; + RETURN UNLESS hw_os.size; + RETURN IF bug.rep_platform == hw_os.0 && bug.op_sys == hw_os.1; + + title = "Set platform to reporter's: " _ hw_os.0 _ " / " _ hw_os.1; +%] + +[% onclick = BLOCK %] + $('#rep_platform').val('[% hw_os.0 FILTER js FILTER html %]'); + $('#op_sys').val('[% hw_os.1 FILTER js FILTER html %]'); + $('#rep_hw_os').hide(); +[% END %] +[% + IF bug_modal; + INCLUDE modal; + ELSE; + INCLUDE classic; + END; +%] + +[% BLOCK classic %] + + (from reporter) + +[% END %] + +[% BLOCK modal %] + +[% END %] -- cgit v1.2.3-24-g4f1b