From 7a7013402fb30e8777bc09fb9971651392e65ea1 Mon Sep 17 00:00:00 2001
From: Byron Jones
Date: Tue, 23 Sep 2014 11:41:17 +0800
Subject: Bug 1037663: Make custom bug entry forms more discoverable
---
.../bug/create/create-employee-incident.html.tmpl | 291 +--------------------
.../bug/create/create-presentation.html.tmpl | 222 +---------------
.../en/default/bug/create/custom_forms.none.tmpl | 173 ++++++++++++
.../en/default/bug/create/user-message.html.tmpl | 25 ++
.../en/default/global/choose-product.html.tmpl | 1 +
.../template/en/default/global/redirect.html.tmpl | 25 ++
.../en/default/pages/bug-writing.html.tmpl | 30 +--
.../en/default/pages/custom_forms.html.tmpl | 40 +++
extensions/BMO/web/images/notice.png | Bin 0 -> 6654 bytes
skins/custom/create_bug.css | 24 ++
template/en/default/bug/create/create.html.tmpl | 1 +
11 files changed, 311 insertions(+), 521 deletions(-)
create mode 100644 extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl
create mode 100644 extensions/BMO/template/en/default/global/redirect.html.tmpl
create mode 100644 extensions/BMO/template/en/default/pages/custom_forms.html.tmpl
create mode 100644 extensions/BMO/web/images/notice.png
diff --git a/extensions/BMO/template/en/default/bug/create/create-employee-incident.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-employee-incident.html.tmpl
index 1c1274541..164dd482c 100644
--- a/extensions/BMO/template/en/default/bug/create/create-employee-incident.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-employee-incident.html.tmpl
@@ -1,288 +1,11 @@
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
+[%# 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/.
#
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is the BMO Bugzilla Extension.
- #
- # The Initial Developer of the Original Code is the Mozilla Foundation
- # Portions created by the Initial Developers are Copyright (C) 2011 the
- # Initial Developer. All Rights Reserved.
- #
- # Contributor(s):
- # David Lawrence
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
#%]
-[% PROCESS global/variables.none.tmpl %]
-
-[% PROCESS global/header.html.tmpl
- title = "Mozilla Corporation/Foundation Employee Incident"
+[% PROCESS global/redirect.html.tmpl
+ url = "https://mozilla.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=4f9468ef184a30004a467ddd1a20df63"
%]
-
-[% USE Bugzilla %]
-
-
-
-
- Thanks for contacting us. You will be notified by email of any progress made in resolving your request.
-
-
-[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl
index 104c96aa8..7819818b3 100644
--- a/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl
@@ -1,219 +1,11 @@
-[%# 1.0@bugzilla.org %]
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
+[%# 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/.
#
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is the Bugzilla Bug Tracking System.
- #
- # The Initial Developer of the Original Code is Mozilla Corporation.
- # Portions created by Mozilla are Copyright (C) 2008 Mozilla
- # Corporation. All Rights Reserved.
- #
- # Contributor(s): Reed Loden
- # David Tran
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
#%]
-[% PROCESS global/variables.none.tmpl %]
-
-[% PROCESS global/header.html.tmpl
- title = "Mozilla Corporation Mountain View Presentation Request"
- javascript_urls = [ 'js/field.js', 'js/util.js' ]
- style = ".yui-skin-sam .yui-calcontainer { z-index: 1; }"
- yui = [ 'autocomplete', 'calendar' ]
+[% PROCESS global/redirect.html.tmpl
+ url = "https://air.mozilla.org/requests"
%]
-
-
Mountain View Presentation Request
-
-
Mountain View Presentation Request: Please use this form if you plan on hosting a presentation so that IT will be able to properly provide support.
-
-
Process:
-
-
Complete and submit request below.
-
Your request will be reviewed and assigned to the appropriate person in IT.
-
-
-
These requests will only be visible internally in all cases and only to the
-person who submitted the request and any persons designated in the CC line.
-
-
-
-
-
-
Thanks for contacting us.
- You will be notified by email of any progress made in resolving your request.
-
-
-
-
-
-[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl
new file mode 100644
index 000000000..25af4fa47
--- /dev/null
+++ b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl
@@ -0,0 +1,173 @@
+[%# 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.
+ #%]
+
+[%# link => url (can be relative to bugzilla.mozilla.org, or full url)
+ # title => visible title
+ # group => optional group name, if present the form won't be show to
+ # users not in this group
+ # hide => optional boolean, if true the form will not be shown on
+ # enter_bug (but will be visible on the custom forms list)
+ #%]
+
+[%
+custom_forms = {
+ "mozilla.org" => [
+ {
+ link => "form.moz.project.review",
+ title => "Mozilla Project Review",
+ group => "mozilla-employee-confidential",
+ },
+ {
+ link => "form.trademark",
+ title => "Trademark Usage Requests",
+ },
+ {
+ link => "form.gear",
+ title => "Mozilla Gear Request",
+ group => "mozilla-employee-confidential",
+ },
+ {
+ link => "form.poweredby",
+ title => "Powered by Mozilla Logo Requests",
+ },
+ {
+ link => "form.mozlist",
+ title => "Mozilla Discussion Forum Requests",
+ group => "mozilla-employee-confidential",
+ },
+ ],
+ "Marketing" => [
+ {
+ link => "form.user.engagement",
+ title => "User Engagement Initiation Form",
+ group => "mozilla-employee-confidential",
+ },
+ {
+ link => "form.gear",
+ title => "Mozilla Gear Request",
+ group => "mozilla-employee-confidential",
+ },
+ {
+ link => "form.creative",
+ title => "Brand Engagement Initiation Form",
+ group => "mozilla-employee-confidential",
+ },
+ {
+ link => "form.poweredby",
+ title => "Powered by Mozilla Logo Requests",
+ },
+ ],
+ "Finance" => [
+ {
+ link => "form.finance",
+ title => "Finance Request",
+ group => "mozilla-employee-confidential",
+ },
+ ],
+ "Privacy" => [
+ {
+ link => "form.privacy.data",
+ title => "Privacy - Data Release Proposal",
+ group => "mozilla-employee-confidential",
+ },
+ ],
+ "Mozilla PR" => [
+ {
+ link => "form.mozpr",
+ title => "PR Project Form",
+ group => "pr-private",
+ },
+ ],
+ "Infrastructure & Operations" => [
+ {
+ link => "form.itrequest",
+ title => "IT Request Form",
+ group => "mozilla-employee-confidential",
+ },
+ {
+ link => "form.mozlist",
+ title => "Mozilla Discussion Forum Requests",
+ group => "mozilla-employee-confidential",
+ },
+ ],
+ "Tech Evangelism" => [
+ {
+ link => "form.mobile.compat",
+ title => "Mobile Web Compatibility Problem",
+ },
+ ],
+ "Air Mozilla" => [
+ {
+ link => "https://air.mozilla.org/requests/",
+ title => "Air Mozilla/Brown Bag Request",
+ group => "mozilla-employee-confidential",
+ },
+ ],
+ "Websites" => [
+ {
+ link => "form.web.bounty",
+ title => "Web Bounty Form",
+ },
+ ],
+ "Firefox OS" => [
+ {
+ link => "form.fxos.feature",
+ title => "Firefox OS Feature Request Form",
+ },
+ {
+ link => "form.fxos.mcts.waiver",
+ title => "Firefox OS MCTS Waiver Form",
+ },
+ {
+ link => "form.fxos.partner",
+ title => "Firefox OS Partner Bug Submission",
+ hide => 1,
+ },
+ {
+ link => "form.fxos.preload.app",
+ title => "Firefox OS Pre-load App",
+ hide => 1,
+ },
+ {
+ link => "form.fxos.betaprogram",
+ title => "Firefox OS Beta Program Bug Submission",
+ hide => 1,
+ },
+ ],
+ "Testing" => [
+ {
+ link => "form.automative",
+ title => "Automation Request Form",
+ },
+ ],
+ "Developer Engagement" => [
+ {
+ link => "form.dev.engagement.event",
+ title => "Developer Events Request Form",
+ },
+ ],
+ "Mozilla Developer Network" => [
+ {
+ link => "form.mdn",
+ title => "Mozilla Developer Network Feedback",
+ },
+ ],
+ "Internet Public Policy" => [
+ {
+ link => "form.ipp",
+ title => "Internet Public Policy Issue",
+ },
+ ],
+ "Marketplace" => [
+ {
+ link => "form.fxos.preload.app",
+ title => "Firefox OS Pre-load App",
+ },
+ ],
+}
+%]
diff --git a/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl b/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl
index b548ba127..52014ae15 100644
--- a/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl
@@ -22,3 +22,28 @@
most frequently reported [% terms.bugs %] and
search through descriptions of previously reported [% terms.bugs %].
+
+[%
+ PROCESS bug/create/custom_forms.none.tmpl;
+ visible_forms = [];
+ FOREACH form = custom_forms.${product.name};
+ NEXT IF form.hide;
+ NEXT IF form.group && !user.in_group(form.group);
+ visible_forms.push(form);
+ END;
+ RETURN UNLESS visible_forms.size;
+%]
+
+
+
+
+ This product has task-specific [% terms.bug %] forms that should be used if
+ appropriate:
+
+
+ [% FOREACH form = visible_forms.sort("title") %]
+
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 448226fbf..eb7581d4e 100644
--- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl
+++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
@@ -194,6 +194,7 @@ by changing your preferences.
src="extensions/BMO/web/images/guided.png" width="16" height="16" border="0" align="absmiddle">
Switch to the [% terms.Bugzilla %] Helper
+ | Custom [% terms.bug %] entry forms
[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/global/redirect.html.tmpl b/extensions/BMO/template/en/default/global/redirect.html.tmpl
new file mode 100644
index 000000000..67561d8fa
--- /dev/null
+++ b/extensions/BMO/template/en/default/global/redirect.html.tmpl
@@ -0,0 +1,25 @@
+[%# 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.
+ #%]
+
+
+
+
+ Moved
+
+
+
+
+ Redirecting to [% url FILTER html %]
+
+
diff --git a/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl b/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl
index f326d1821..21ed3b040 100644
--- a/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl
@@ -1,25 +1,11 @@
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
+[%# 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/.
#
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is the Bugzilla Bug Tracking System.
- #
- # The Initial Developer of the Original Code is Netscape Communications
- # Corporation. Portions created by Netscape are
- # Copyright (C) 1998 Netscape Communications Corporation. All
- # Rights Reserved.
- #
- # Contributor(s): David Lawrence
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
#%]
-
-
-
-
-
+[% PROCESS global/redirect.html.tmpl
+ url = "https://developer.mozilla.org/en/Bug_writing_guidelines"
+%]
diff --git a/extensions/BMO/template/en/default/pages/custom_forms.html.tmpl b/extensions/BMO/template/en/default/pages/custom_forms.html.tmpl
new file mode 100644
index 000000000..d484d730c
--- /dev/null
+++ b/extensions/BMO/template/en/default/pages/custom_forms.html.tmpl
@@ -0,0 +1,40 @@
+[%# 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.
+ #%]
+
+[% PROCESS global/header.html.tmpl
+ title = "Custom Bug Entry Forms"
+%]
+
+[%
+ visible_forms = {};
+ PROCESS bug/create/custom_forms.none.tmpl;
+ FOREACH product = custom_forms.keys;
+ product_forms = [];
+ FOREACH form = custom_forms.$product;
+ NEXT IF form.group && !user.in_group(form.group);
+ product_forms.push(form);
+ END;
+ NEXT UNLESS product_forms.size;
+ visible_forms.$product = product_forms;
+ END;
+%]
+
+