summaryrefslogtreecommitdiffstats
path: root/extensions/MozProjectReview
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/MozProjectReview')
-rw-r--r--extensions/MozProjectReview/Config.pm19
-rw-r--r--extensions/MozProjectReview/Extension.pm288
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.tmpl40
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl31
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl50
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl18
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl12
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl16
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl20
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl36
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl920
-rw-r--r--extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl13
-rw-r--r--extensions/MozProjectReview/web/js/moz_project_review.js307
-rw-r--r--extensions/MozProjectReview/web/style/moz_project_review.css48
14 files changed, 1818 insertions, 0 deletions
diff --git a/extensions/MozProjectReview/Config.pm b/extensions/MozProjectReview/Config.pm
new file mode 100644
index 000000000..5a9d2b730
--- /dev/null
+++ b/extensions/MozProjectReview/Config.pm
@@ -0,0 +1,19 @@
+# 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.
+package Bugzilla::Extension::MozProjectReview;
+
+use strict;
+
+use constant NAME => 'MozProjectReview';
+
+use constant REQUIRED_MODULES => [
+];
+
+use constant OPTIONAL_MODULES => [
+];
+
+__PACKAGE__->NAME;
diff --git a/extensions/MozProjectReview/Extension.pm b/extensions/MozProjectReview/Extension.pm
new file mode 100644
index 000000000..a7c632f46
--- /dev/null
+++ b/extensions/MozProjectReview/Extension.pm
@@ -0,0 +1,288 @@
+# 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.
+package Bugzilla::Extension::MozProjectReview;
+
+use strict;
+
+use base qw(Bugzilla::Extension);
+
+use Bugzilla::User;
+use Bugzilla::Group;
+use Bugzilla::Error;
+use Bugzilla::Constants;
+
+our $VERSION = '0.01';
+
+sub post_bug_after_creation {
+ my ($self, $args) = @_;
+ my $vars = $args->{vars};
+ my $bug = $vars->{bug};
+
+ my $user = Bugzilla->user;
+ my $params = Bugzilla->input_params;
+ my $template = Bugzilla->template;
+
+ return if !($params->{format}
+ && $params->{format} eq 'moz-project-review'
+ && $bug->component eq 'Project Review');
+
+ my $error_mode_cache = Bugzilla->error_mode;
+ Bugzilla->error_mode(ERROR_MODE_DIE);
+
+ # do a match if applicable
+ Bugzilla::User::match_field({
+ 'legal_cc' => { 'type' => 'multi' }
+ });
+
+ my ($do_sec_review, $do_legal, $do_finance, $do_privacy_vendor,
+ $do_data_safety, $do_privacy_tech, $do_privacy_policy);
+
+ # Logic section which dictates which bugs are created. This should be
+ # similar to the logic used in extensions/MozProjectReview/web/js/moz_project_review.js
+
+ if ($params->{new_or_change} eq 'New') {
+ $do_legal = 1;
+ }
+
+ if ($params->{mozilla_data} eq 'Yes') {
+ $do_legal = 1;
+ $do_privacy_policy = 1;
+ $do_privacy_tech = 1;
+ $do_sec_review = 1;
+ }
+
+ if ($params->{mozilla_data} eq 'Yes'
+ && $params->{data_safety_user_data} eq 'Yes')
+ {
+ $do_data_safety = 1;
+ }
+
+ if ($params->{separate_party} eq 'Yes') {
+ if ($params->{relationship_type} ne 'Hardware Purchase') {
+ $do_legal = 1;
+ }
+
+ if ($params->{relationship_type} eq 'Hardware Purchase') {
+ $do_finance = 1;
+ }
+
+ if ($params->{data_access} eq 'Yes') {
+ $do_privacy_policy = 1;
+ $do_legal = 1;
+ $do_sec_review = 1;
+ }
+
+ if ($params->{data_access} eq 'Yes'
+ && $params->{'privacy_policy_vendor_user_data'} eq 'Yes')
+ {
+ $do_privacy_vendor = 1;
+ }
+
+ if ($params->{vendor_cost} eq '> $25,000'
+ || ($params->{vendor_cost} eq '<= $25,000'
+ && $params->{po_needed} eq 'Yes'))
+ {
+ $do_finance = 1;
+ }
+ }
+
+ my ($sec_review_bug, $legal_bug, $finance_bug, $privacy_vendor_bug,
+ $data_safety_bug, $privacy_tech_bug, $privacy_policy_bug, $error,
+ @dep_bug_comment, @dep_bug_errors);
+
+ if ($do_sec_review) {
+ my $bug_data = {
+ short_desc => 'Security Review: ' . $bug->short_desc,
+ product => 'mozilla.org',
+ component => 'Security Assurance: Review Request',
+ bug_severity => 'normal',
+ groups => [ 'mozilla-corporation-confidential' ],
+ keywords => 'sec-review-needed',
+ op_sys => 'All',
+ rep_platform => 'All',
+ version => 'other',
+ blocked => $bug->bug_id,
+ };
+ _file_child_bug({ parent_bug => $bug, template_vars => $vars,
+ template_suffix => 'sec-review', bug_data => $bug_data,
+ dep_comment => \@dep_bug_comment, dep_errors => \@dep_bug_errors });
+ }
+
+ if ($do_legal) {
+ my $component = 'General';
+ if ($params->{new_or_change} eq 'Existing') {
+ $component = $params->{mozilla_project};
+ }
+
+ if ($params->{separate_party} eq 'Yes'
+ && $params->{relationship_type})
+ {
+ $component = ($params->{relationship_type} eq 'Other'
+ || $params->{relationship_type} eq 'Hardware Purchase')
+ ? 'General'
+ : $params->{relationship_type};
+ }
+
+ my $legal_summary = "Legal Review: ";
+ $legal_summary .= $params->{legal_other_party} . " - " if $params->{legal_other_party};
+ $legal_summary .= $bug->short_desc;
+
+ my $bug_data = {
+ short_desc => $legal_summary,
+ product => 'Legal',
+ component => $component,
+ bug_severity => 'normal',
+ priority => '--',
+ groups => [ 'legal' ],
+ op_sys => 'All',
+ rep_platform => 'All',
+ version => 'unspecified',
+ blocked => $bug->bug_id,
+ cc => $params->{'legal_cc'},
+ };
+ _file_child_bug({ parent_bug => $bug, template_vars => $vars,
+ template_suffix => 'legal', bug_data => $bug_data,
+ dep_comment => \@dep_bug_comment, dep_errors => \@dep_bug_errors });
+ }
+
+ if ($do_finance) {
+ my $bug_data = {
+ short_desc => 'Finance Review: ' . $bug->short_desc,
+ product => 'Finance',
+ component => 'Purchase Request Form',
+ bug_severity => 'normal',
+ priority => '--',
+ groups => [ 'finance' ],
+ op_sys => 'All',
+ rep_platform => 'All',
+ version => 'unspecified',
+ blocked => $bug->bug_id,
+ };
+ _file_child_bug({ parent_bug => $bug, template_vars => $vars,
+ template_suffix => 'finance', bug_data => $bug_data,
+ dep_comment => \@dep_bug_comment, dep_errors => \@dep_bug_errors });
+ }
+
+ if ($do_data_safety) {
+ my $bug_data = {
+ short_desc => 'Data Safety Review: ' . $bug->short_desc,
+ product => 'Data Safety',
+ component => 'General',
+ bug_severity => 'normal',
+ priority => '--',
+ groups => [ 'mozilla-corporation-confidential' ],
+ op_sys => 'All',
+ rep_platform => 'All',
+ version => 'unspecified',
+ blocked => $bug->bug_id,
+ };
+
+ _file_child_bug({ parent_bug => $bug, template_vars => $vars,
+ template_suffix => 'data-safety', bug_data => $bug_data,
+ dep_comment => \@dep_bug_comment, dep_errors => \@dep_bug_errors });
+ }
+
+ if ($do_privacy_tech) {
+ my $bug_data = {
+ short_desc => 'Privacy-Technical Review: ' . $bug->short_desc,
+ product => 'mozilla.org',
+ component => 'Security Assurance: Review Request',
+ bug_severity => 'normal',
+ priority => '--',
+ keywords => 'privacy-review-needed',
+ groups => [ 'mozilla-corporation-confidential' ],
+ op_sys => 'All',
+ rep_platform => 'All',
+ version => 'other',
+ blocked => $bug->bug_id,
+ };
+ _file_child_bug({ parent_bug => $bug, template_vars => $vars,
+ template_suffix => 'privacy-tech', bug_data => $bug_data,
+ dep_comment => \@dep_bug_comment, dep_errors => \@dep_bug_errors });
+ }
+
+ if ($do_privacy_policy) {
+ my $bug_data = {
+ short_desc => 'Privacy-Policy Review: ' . $bug->short_desc,
+ product => 'Privacy',
+ component => 'Product Review',
+ bug_severity => 'normal',
+ priority => '--',
+ groups => [ 'mozilla-corporation-confidential' ],
+ op_sys => 'All',
+ rep_platform => 'All',
+ version => 'unspecified',
+ blocked => $bug->bug_id,
+ };
+ _file_child_bug({ parent_bug => $bug, template_vars => $vars,
+ template_suffix => 'privacy-policy', bug_data => $bug_data,
+ dep_comment => \@dep_bug_comment, dep_errors => \@dep_bug_errors });
+ }
+
+ if ($do_privacy_vendor) {
+ my $bug_data = {
+ short_desc => 'Privacy / Vendor Review: ' . $bug->short_desc,
+ product => 'Privacy',
+ component => 'Vendor Review',
+ bug_severity => 'normal',
+ priority => '--',
+ groups => [ 'mozilla-corporation-confidential' ],
+ op_sys => 'All',
+ rep_platform => 'All',
+ version => 'unspecified',
+ blocked => $bug->bug_id,
+ };
+ _file_child_bug({ parent_bug => $bug, template_vars => $vars,
+ template_suffix => 'privacy-vendor', bug_data => $bug_data,
+ dep_comment => \@dep_bug_comment, dep_errors => \@dep_bug_errors });
+ }
+
+ Bugzilla->error_mode($error_mode_cache);
+
+ if (scalar @dep_bug_errors) {
+ warn "[Bug " . $bug->id . "] Failed to create additional moz-project-review bugs:\n" .
+ join("\n", @dep_bug_errors);
+ $vars->{message} = 'moz_project_review_creation_failed';
+ }
+
+ if (scalar @dep_bug_comment) {
+ my $comment = join("\n", @dep_bug_comment);
+ if (scalar @dep_bug_errors) {
+ $comment .= "\n\nSome erors occurred creating dependent bugs and have been recorded";
+ }
+ $bug->add_comment($comment);
+ $bug->update();
+ }
+}
+
+sub _file_child_bug {
+ my ($params) = @_;
+ my ($parent_bug, $template_vars, $template_suffix, $bug_data, $dep_comment, $dep_errors)
+ = @$params{qw(parent_bug template_vars template_suffix bug_data dep_comment dep_errors)};
+ my $template = Bugzilla->template;
+ my $new_bug;
+ eval {
+ my $comment;
+ my $full_template = "bug/create/comment-moz-project-review-$template_suffix.txt.tmpl";
+ $template->process($full_template, $template_vars, \$comment)
+ || ThrowTemplateError($template->error());
+ $bug_data->{comment} = $comment;
+ if ($new_bug = Bugzilla::Bug->create($bug_data)) {
+ $parent_bug->set_all({ dependson => { add => [ $new_bug->bug_id ] }});
+ Bugzilla::BugMail::Send($new_bug->id, { changer => Bugzilla->user });
+ }
+ };
+ if ($@ || !$new_bug) {
+ push(@$dep_comment, "Error creating $template_suffix review bug");
+ push(@$dep_errors, "$template_suffix : $@") if $@;
+ }
+ else {
+ push(@$dep_comment, "Bug " . $new_bug->id . " - " . $new_bug->short_desc);
+ }
+}
+
+__PACKAGE__->NAME;
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.tmpl
new file mode 100644
index 000000000..5a6ffbbbd
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+
+Data Safety Questions:
+
+User Data: [% cgi.param('data_safety_user_data') %]
+How many involved?: [% cgi.param('data_safety_user_count') %]
+How many users do you anticipate to be involved?: [% cgi.param('data_safety_user_count_anticipated') %]
+Type of Data:
+[%+ cgi.param('data_safety_data_type') %]
+Data Reason:
+[%+ cgi.param('data_safety_data_reason') %]
+Community Benefit:
+[%+ cgi.param('data_safety_community_benefit') %]
+Data Collection:
+[%+ cgi.param('data_safety_community_collection') %]
+Data Retention: [% cgi.param('data_safety_retention') %]
+Data Retention Length: [% cgi.param('data_safety_retention_length') %]
+Separate Party: [% cgi.param('data_safety_separate_party') %]
+Separate Party Data Type:
+[%+ cgi.param('data_safety_separate_party_data') %]
+Separate Party Data Communication:
+[%+ cgi.param('data_safety_separate_party_data_communication') %]
+Who are the separate parties?:
+[%+ cgi.param('data_safety_separate_party_who') %]
+Community Visibility and Input: [% cgi.param('data_safety_community_visibility') %]
+Communication Channels:
+[%+ cgi.param('data_safety_communication_channels') %]
+Public Communication Plan:
+[%+ cgi.param('data_safety_communication_plan') %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl
new file mode 100644
index 000000000..99691c287
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl
@@ -0,0 +1,31 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+
+Finance Questions:
+
+Vendor: [% cgi.param('finance_purchase_vendor') %]
+Is this line item in budget?: [% cgi.param('finance_purchase_inbudget') %]
+[% IF cgi.param('finance_purchase_inbudget') == 'No' %]
+Not In Budget Why:
+[%+ cgi.param('finance_purchase_notinbudget_why') %]
+[% END %]
+What is the purchase for?:
+[%+ cgi.param('finance_purchase_what') %]
+Why is the purchase needed?:
+[%+ cgi.param('finance_purchase_why') %]
+What is the risk if not purchased?:
+[%+ cgi.param('finance_purchase_risk') %]
+What is the alternative?:
+[%+ cgi.param('finance_purchase_alternative') %]
+What is the urgency?: [% cgi.param('finance_purchase_urgency') %]
+Total Cost: [% cgi.param('finance_purchase_cost') %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl
new file mode 100644
index 000000000..802caeee9
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl
@@ -0,0 +1,50 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+
+Legal Questions:
+
+Priority: [% cgi.param('legal_priority') %]
+Other Party: [% cgi.param('legal_other_party') %]
+What help do you need from Legal?:
+[%+ cgi.param('legal_help_from_legal') %]
+[% IF cgi.param('legal_vendor_services_where') %]
+Vendor Services from Where:
+[% IF cgi.param('legal_vendor_services_where') == 'A single country' %]
+[%- cgi.param('legal_vendor_single_country') %]
+[% ELSE %]
+[%- cgi.param('legal_vendor_services_where') %]
+[% END %]
+[% END %]
+[% IF cgi.param('separate_party') == 'Yes' && cgi.param('relationship_type') == 'Vendor/Services' %]
+SOW Details:
+Legal Vendor Name: [% cgi.param('legal_sow_vendor_name') %]
+Vendor Address:
+[%+ cgi.param('legal_sow_vendor_address') %]
+Vendor Email for Notices: [% cgi.param('legal_sow_vendor_email') %]
+Mozilla Contact: [% cgi.param('legal_sow_vendor_mozcontact') %]
+Vendor Contact and Email Address: [% cgi.param('legal_sow_vendor_contact') %]
+Description of Services:
+[%+ cgi.param('legal_sow_vendor_services') %]
+Description of Deliverables:
+[%+ cgi.param('legal_sow_vendor_deliverables') %]
+Start Date: [% cgi.param('legal_sow_start_date') %]
+End Date: [% cgi.param('legal_sow_end_date') %]
+Rate of Pay: [% cgi.param('legal_sow_vendor_payment') %]
+Basis for Payment: [% cgi.param('legal_sow_vendor_payment_basis') %]
+Average/Maximum Hours: [% cgi.param('legal_sow_vendor_hours') %]
+Payment Schedule: [% cgi.param('legal_sow_vendor_payment_schedule') %]
+Total Not to Exceed Amount: [% cgi.param('legal_sow_vendor_total_max') %]
+Special Terms:
+[%+ cgi.param('legal_sow_vendor_special_terms') %]
+Product Line: [% cgi.param('legal_sow_vendor_product_line') %]
+[% END %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl
new file mode 100644
index 000000000..816834c40
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl
@@ -0,0 +1,18 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+
+Privacy Policy: [% cgi.param('privacy_policy_project') %]
+Privacy Policy Link: [% cgi.param('privacy_policy_project_link') %]
+User Data: [% cgi.param('privacy_policy_user_data') %]
+Data Safety [% terms.Bug %] ID: [% cgi.param('privacy_policy_user_data_bug') %]
+Legal [% terms.Bug %] ID: [% cgi.param('privacy_policy_legal_bug') %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl
new file mode 100644
index 000000000..7b72cf1bc
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl
@@ -0,0 +1,12 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl
new file mode 100644
index 000000000..eaf9f12e3
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl
@@ -0,0 +1,16 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+
+Privacy Policy: [% cgi.param('privacy_policy_vendor_user_data') %]
+Vendor's Privacy Policy: [% cgi.param('privacy_policy_vendor_link') %]
+Privacy Questionnaire: [% cgi.param('privacy_policy_vendor_questionnaire') %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl
new file mode 100644
index 000000000..029f6df48
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl
@@ -0,0 +1,20 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+
+Security Review Questions:
+
+Affects Products: [% cgi.param('sec_affects_products') %]
+Review Due Date: [% cgi.param('sec_review_date') %]
+Review Invitees: [% cgi.param('sec_review_invitees') %]
+Extra Information:
+[%+ cgi.param('sec_review_extra') %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl
new file mode 100644
index 000000000..6a88aadd8
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl
@@ -0,0 +1,36 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+Initial Questions:
+
+Project/Feature Name: [% cgi.param('short_desc') %]
+Tracking [% terms.Bug %] ID:[% cgi.param('tracking_id') %]
+Description:
+[%+ cgi.param('description') %]
+Additional Information:
+[%+ cgi.param('additional') %]
+Urgency: [% cgi.param('urgency') %]
+Key Initiative: [% cgi.param('key_initiative') == 'Other'
+ ? cgi.param('key_initiative_other')
+ : cgi.param('key_initiative') %]
+Release Date: [% cgi.param('release_date') %]
+Project Status: [% cgi.param('project_status') %]
+Mozilla Data: [% cgi.param('mozilla_data') %]
+New or Change: [% cgi.param('new_or_change') %]
+Mozilla Project: [% cgi.param('mozilla_project') %]
+Mozilla Related: [% cgi.param('mozilla_related') %]
+Separate Party: [% cgi.param('separate_party') %]
+[% IF cgi.param('separate_party') == 'Yes' %]
+Type of Relationship: [% cgi.param('relationship_type') %]
+Data Access: [% cgi.param('data_access') %]
+Privacy Policy: [% cgi.param('privacy_policy') %]
+Vendor Cost: [% cgi.param('vendor_cost') %]
+[% END %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl
new file mode 100644
index 000000000..19fc8ae55
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl
@@ -0,0 +1,920 @@
+[%# 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/variables.none.tmpl %]
+
+[% PROCESS global/header.html.tmpl
+ title = "Mozilla Project Review"
+ style_urls = [ 'extensions/MozProjectReview/web/style/moz_project_review.css' ]
+ javascript_urls = [ 'js/field.js', 'js/util.js',
+ 'extensions/MozProjectReview/web/js/moz_project_review.js' ]
+ yui = [ 'autocomplete', 'calendar' ]
+%]
+
+<p>
+ <strong>Please use this form for submitting a Mozilla Project Review</strong>
+ If you have a [% terms.bug %] to file, go <a href="enter_bug.cgi">here</a>.
+</p>
+
+<p>
+ (<span class="required_star">*</span> =
+ <span class="required_explanation">Required Field</span>)
+</p>
+
+<form method="post" action="post_bug.cgi" id="incidentForm" enctype="multipart/form-data"
+ onSubmit="return MPR.validateAndSubmit();">
+ <input type="hidden" id="product" name="product" value="mozilla.org">
+ <input type="hidden" id="component" name="component" value="Project Review">
+ <input type="hidden" id="rep_platform" name="rep_platform" value="All">
+ <input type="hidden" id="groups" name="groups" value="mozilla-corporation-confidential">
+ <input type="hidden" id="op_sys" name="op_sys" value="All">
+ <input type="hidden" id="priority" name="priority" value="--">
+ <input type="hidden" id="version" name="version" value="other">
+ <input type="hidden" id="format" name="format" value="moz-project-review">
+ <input type="hidden" id="bug_severity" name="bug_severity" value="normal">
+ <input type="hidden" id="token" name="token" value="[% token FILTER html %]">
+
+ <div id="initial_questions">
+ <div class="header">Initial Questions</div>
+
+ <div id="project_feature_summary_row" class="field_row">
+ <span class="field_label required">Project/Feature Name:</span>
+ <span class="field_data">
+ <div class="field_description">Be brief yet descriptive as possible. Include name of product,
+ feature, or name of vendor involved as well if appropriate.</div>
+ <input type="text" name="short_desc" id="short_desc" size="60" maxsize="255">
+ </span>
+ </div>
+
+ <div id="tracking_id_row" class="field_row">
+ <span class="field_label">Tracking [% terms.Bug %] ID:</span>
+ <span class="field_data">
+ <div class="field_description">Master tracking [% terms.bug %] number (if it exists)?</div>
+ <input type="text" name="tracking_id" id="tracking_id" size="60">
+ </span>
+ </div>
+
+ <div id="contacts_row" class="field_row">
+ <span class="field_label required">Points of Contact:</span>
+ <span class="field_data">
+ <div class="field_description">Who are the points of contact for this review?</div>
+ [% INCLUDE global/userselect.html.tmpl
+ id => "cc"
+ name => "cc"
+ value => ""
+ size => 60
+ classes => ["bz_userfield"]
+ multiple => 5
+ %]
+ </span>
+ </div>
+
+ <div id="description_row" class="field_row">
+ <span class="field_label required">Description:</span>
+ <span class="field_data">
+ <div class="field_description">Please provide a short description of the feature / application / project /
+ business relationship (e.g. problem solved, use cases, etc.)</div>
+ <textarea name="description" id="description" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="additional_row" class="field_row">
+ <span class="field_label">Additional Information:</span>
+ <span class="field_data">
+ <div class="field_description">Please provide links to additional information (e.g. feature page, wiki)
+ if available and not yet included in feature description.)</div>
+ <textarea name="additional" id="additional" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="urgency_row" class="field_row">
+ <span class="field_label required">Urgency:</span>
+ <span class="field_data">
+ <div class="field_description">What is the urgency of this project?</div>
+ <select id="urgency" name="urgency">
+ <option value="">Select One</option>
+ <option value="no rush">no rush</option>
+ <option value="2-4 weeks">2-4 weeks</option>
+ <option value="a week">a week</option>
+ <option value="2 days">2 days</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="key_initiative_row" class="field_row">
+ <span class="field_label required">Key Initiative:</span>
+ <span class="field_data">
+ <div class="field_description">Which key initiative does this support?</div>
+ <select name="key_initiative" id="key_initiative">
+ <option value="">Select One</option>
+ <option value="Firefox Desktop">Firefox Desktop</option>
+ <option value="Firefox Mobile">Firefox Mobile</option>
+ <option value="Firefox OS">Firefox OS</option>
+ <option value="Firefox Platform">Firefox Platform</option>
+ <option value="Marketplace / Apps">Marketplace / Apps</option>
+ <option value="Services: Persona">Services: Persona</option>
+ <option value="Services: WebRTC">Services: WebRTC</option>
+ <option value="Services: UP">Services: UP</option>
+ <option value="Services: Social API">Services: Social API</option>
+ <option value="Labs / Research / H3">Labs / Research / H3</option>
+ <option value="Product Support">Product Support</option>
+ <option value="Corp Support">Corp Support</option>
+ <option value="Other">Other</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="key_initiative_other_row" class="field_row bz_default_hidden">
+ <span class="field_label">&nbsp;</span>
+ <span class="field_data">
+ <input type="text" name="key_initiative_other" id="key_initiative_other" size="60">
+ </span>
+ </div>
+
+ <div id="release_date_row" class="field_row">
+ <span class="field_label">Release Date:</span>
+ <span class="field_data">
+ <div class="field_description">What is your key release / launch date (if applicable)?</div>
+ <input name="release_date" size="20" id="release_date" value=""
+ onchange="updateCalendarFromField(this)">
+ <button type="button" class="calendar_button"
+ id="button_calendar_release_date"
+ onclick="showCalendar('release_date')">
+ <span>Calendar</span>
+ </button>
+ <div id="con_calendar_release_date"></div>
+ <script type="text/javascript">
+ createCalendar('release_date')
+ </script>
+ </span>
+ </div>
+
+ <div id="project_status_row" class="field_row">
+ <span class="field_label required">Project Status:</span>
+ <span class="field_data">
+ <div class="field_description">What is the current state of your project?</div>
+ <select name="project_status" id="project_status">
+ <option value="">Select One</option>
+ <option value="future">Future project under discussion</option>
+ <option value="active">Active planning</option>
+ <option value="development">Development</option>
+ <option value="ready">Ready to launch/commit</option>
+ <option value="launched">Already launched/committed</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="mozilla_data_row" class="field_row">
+ <span class="field_label required">Mozilla Data:</span>
+ <span class="field_data">
+ <div class="field_description">Does this product/service/project access, interact with, or store Mozilla
+ (customer, contributor, user, employee) data? Example of such data includes
+ email addresses, first and last name, addresses, phone numbers, credit card data.)</div>
+ <select name="mozilla_data" id="mozilla_data">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="new_or_change_row" class="field_row">
+ <span class="field_label required">New or Change:</span>
+ <span class="field_data">
+ <div class="field_description">Is this a NEW product, service, project, feature, or functionality,
+ a change to an EXISTING one, or neither?</div>
+ <select name="new_or_change" id="new_or_change">
+ <option value="">Select One</option>
+ <option value="New">New</option>
+ <option value="Existing">Existing</option>
+ <option value="Neither">Neither</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="mozilla_project_row" class="field_row bz_default_hidden">
+ <span class="field_label">Mozilla Project:</span>
+ <span class="field_data">
+ <div class="field_description">What product/service/project does this pertain to?</div>
+ <select name="mozilla_project" id="mozilla_project">
+ <option value="none">None</option>
+ <option value="FirefoxOS">FirefoxOS</option>
+ <option value="Marketplace">Marketplace</option>
+ <option value="Persona">Persona</option>
+ <option value="Marketing Initiative">Marketing Initiative</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="mozilla_related_row" class="field_row">
+ <span class="field_label">Mozilla Related:</span>
+ <span class="field_data">
+ <div class="field_description">What Mozilla products/services/projects does this product/service/project
+ integrate with or relate to?</div>
+ <input type="text" name="mozilla_related" id="mozilla_related" size="60">
+ </span>
+ </div>
+
+ <div id="separate_party_row" class="field_row">
+ <span class="field_label required">Separate Party:</span>
+ <span class="field_data">
+ <div class="field_description"> Does this project involve a
+ relationship with another party (such as a third party vendor, hosted
+ service provider, consultant or strategic partner)? This includes MSAs,
+ Consulting Agreements, NDAs, click to accept, API agreements, open
+ source licenses, renewals, additional services or goods, and any other
+ agreements.
+ </div>
+ <select name="separate_party" id="separate_party">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="initial_separate_party_questions" class="bz_default_hidden">
+ <div id="relation_type_row" class="field_row">
+ <span class="field_label required">Type of Relationship:</span>
+ <span class="field_data">
+ <div class="field_description">What type of relationship?</div>
+ <select name="relationship_type" id="relationship_type">
+ <option value="">Select One</option>
+ <option value="Vendor/Services">Vendor/Services</option>
+ <option value="Distribution/Bundling">Distribution/Bundling</option>
+ <option value="Hardware Purchase">Hardware Purchase</option>
+ <option value="Search">Search</option>
+ <option value="NDA">NDA</option>
+ <option value="Other">Other</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="data_access_row" class="field_row">
+ <span class="field_label required">Data Access:</span>
+ <span class="field_data">
+ <div class="field_description">Will the other party have access to Mozilla (customer, contributor, user,
+ employee) data? (If this is for an NDA, choose no)</div>
+ <select name="data_access" id="data_access">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="privacy_policy_row" class="field_row">
+ <span class="field_label">Privacy Policy:</span>
+ <span class="field_data">
+ <div class="field_description">What is the url for their privacy policy?</div>
+ <input type="text" name="privacy_policy" id="privacy_policy" size="60">
+ </span>
+ </div>
+
+ <div id="vendor_cost_row" class="field_row">
+ <span class="field_label required">Vendor Cost:</span>
+ <span class="field_data">
+ <div class="field_description">What is the anticipated cost of the vendor relationship?
+ (Entire Contract Cost, not monthly cost)</div>
+ <select name="vendor_cost" id="vendor_cost">
+ <option value="">Select One</option>
+ <option value="N/A">N/A</option>
+ <option value="&lt;= $25,000">&lt;= $25,000</option>
+ <option value="&gt; $25,000">&gt; $25,000</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="po_needed_row" class="field_row bz_default_hidden">
+ <span class="field_label required">PO Needed?:</span>
+ <span class="field_data">
+ <select name="po_needed" id="po_needed">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div id="sec_review_questions" class="bz_default_hidden">
+ <div class="header">Security Review</div>
+
+ <div id="sec_review_affects_products_row">
+ <span class="field_label">Affects Products:</span>
+ <span class="field_data">
+ <div class="field_description">Does this feature or code change affect Firefox, Thunderbird or any
+ product or service the Mozilla ships to end users?</div>
+ <select name="sec_affects_products" id="sec_affects_products">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="sec_review_date_row" class="field_row">
+ <span class="field_label">Review Due Date:</span>
+ <span class="field_data">
+ <div class="field_description">When would you like the review to be completed?
+ (<a href="https://mail.mozilla.com/home/ckoenig@mozilla.com/Security%20Review.html"
+ target="_blank">more info</a>)</div>
+ <input name="sec_review_date" size="20" id="sec_review_date" value=""
+ onchange="updateCalendarFromField(this)">
+ <button type="button" class="calendar_button"
+ id="button_calendar_sec_review_date"
+ onclick="showCalendar('sec_review_date')">
+ <span>Calendar</span>
+ </button>
+ <div id="con_calendar_sec_review_date"></div>
+ <script type="text/javascript">
+ createCalendar('sec_review_date')
+ </script>
+ </span>
+ </div>
+
+ <div id="sec_review_invitees_row" class="field_row">
+ <span class="field_label">Review Invitees:</span>
+ <span class="field_data">
+ <div class="field_description">Whom should be invited to the review?</div>
+ <input type="text" name="sec_review_invitees" id="sec_review_invitees" size="60">
+ </span>
+ </div>
+
+ <div id="sec_review_extra_row" class="field_row">
+ <span class="field_label">Extra Information:</span>
+ <span class="field_data">
+ <div class="field_description">If you feel something is missing here or you would like to provide other
+ kind of feedback, feel free to do so here?</div>
+ <textarea name="sec_review_extra" id="sec_review_extra" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+ </div>
+
+ <div id="privacy_policy_project_questions" class="bz_default_hidden">
+ <div class="header">Privacy (Policy/Project)</div>
+
+ <div id="privacy_policy_project_row" class="field_row">
+ <span class="field_label">Privacy Policy:</span>
+ <span class="field_data">
+ <div class="field_description">Do you currently have a privacy policy for your project / site / product?</div>
+ <select name="privacy_policy_project" id="privacy_policy_project">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="privacy_policy_project_link_row" class="field_row bz_default_hidden">
+ <span class="field_label">Privacy Policy Link:</span>
+ <span class="field_data">
+ <div class="field_description">Please provide link to policy</div>
+ <input type="text" name="privacy_policy_project_link" id="privacy_policy_project_link" size="60">
+ </span>
+ </div>
+
+ <div id="privacy_policy_project_user_data_row" class="field_row">
+ <span class="field_label">User Data:</span>
+ <span class="field_data">
+ <div class="field_description">Does your product/service/project collect, use or maintain any user data?</div>
+ <select name="privacy_policy_user_data" id="privacy_policy_user_data">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="privacy_policy_project_user_data_bug_row" class="bz_default_hidden">
+ <span class="field_label">Data Safety [% terms.Bug %] ID:</span>
+ <span class="field_data">
+ <div class="field_description">Please provide link to Data Safety [% terms.bug %]</div>
+ <input type="text" name="privacy_policy_user_data_bug" id="privacy_policy_user_data_bug" size="60">
+ </span>
+ </div>
+
+ <div id="privacy_policy_project_legal_bug_row" class="field_row">
+ <span class="field_label">Legal [% terms.Bug %]:</span>
+ <span class="field_data">
+ <div class="field_description">For reference, please provide link to related Legal [% terms.bug %] or enter
+ "not filed" if a legal [% terms.bug %] has not yet been filed.</div>
+ <input type="text" name="privacy_policy_legal_bug" id="privacy_policy_legal_bug" size="60">
+ </span>
+ </div>
+ </div>
+
+ <div id="privacy_policy_vendor_questions" class="bz_default_hidden">
+ <div class="header">Privacy (Policy/Vendor)</div>
+
+ <div id="privacy_policy_vendor_user_data_row" class="field_row">
+ <span class="field_label">Privacy Policy:</span>
+ <span class="field_data">
+ <div class="field_description">Will the vendor have access to Mozilla (customer, contributor, user, employee) data?</div>
+ <select name="privacy_policy_vendor_user_data" id="privacy_policy_vendor_user_data">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="privacy_policy_vendor_extra" class="bz_default_hidden">
+ <div id="privacy_policy_vendor_link_row" class="field_row">
+ <span class="field_label">Vendor's Privacy Policy:</span>
+ <span class="field_data">
+ <div class="field_description">Please provide link to vendor's privacy policy</div>
+ <input type="text" name="privacy_policy_vendor_link" id="privacy_policy_vendor_link" size="60">
+ </span>
+ </div>
+
+ <div id="privacy_policy_vendor_questionnaire_row" class="field_row">
+ <span class="field_label">Privacy Questionnaire:</span>
+ <span class="field_data">
+ <div class="field_description">Has vendor completed Mozilla Vendor Privacy Questionnaire?</div>
+ <select name="privacy_policy_vendor_questionnaire" id="privacy_policy_vendor_questionnaire">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div id="legal_questions" class="bz_default_hidden">
+ <div class="header">Legal</div>
+
+ <div id="legal_priority_row" class="field_row">
+ <span class="field_label required">Priority:</span>
+ <span class="field_data">
+ <div class="field_description">Priority to your team</div>
+ <select name="legal_priority" id="legal_priority">
+ <option value="">Select One</option>
+ <option value="high">High</option>
+ <option value="medium">Medium</option>
+ <option value="low">Low</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="legal_cc_row" class="field_row">
+ <span class="field_label">Cc:</span>
+ <span class="field_data">
+ [% INCLUDE global/userselect.html.tmpl
+ id => "legal_cc"
+ name => "legal_cc"
+ value => ""
+ size => 60
+ classes => ["bz_userfield"]
+ multiple => 5
+ %]
+ </span>
+ </div>
+
+ <div id="legal_other_party_row" class="field_row">
+ <span class="field_label">Other Party:</span>
+ <span class="field_data">
+ <div class="field_description">Name of other party involved</div>
+ <input type="text" name="legal_other_party" id="legal_other_party" size="60">
+ </span>
+ </div>
+
+ <div id="legal_help_from_legal_row" class="field_row">
+ <span class="field_label required">What help do you<br>need from Legal?</span>
+ <span class="field_data">
+ <div class="field_description">
+ Please explain specifically what help you need from Legal. If none, put "No Legal help needed."</div>
+ <textarea name="legal_help_from_legal" id="legal_help_from_legal" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="legal_sow_questions" class="bz_default_hidden">
+ <div class=field_row">
+ <span class="field_label">SOW Details:</span>
+ <span class="field_data">
+ Please provide the following information for the SOW
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_name_row" class="field_row">
+ <span class="field_label required">Legal Vendor Name:</span>
+ <span class="field_data">
+ <input type="text" name="legal_sow_vendor_name" id="legal_sow_vendor_name" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_address_row" class="field_row">
+ <span class="field_label required">Vendor Address:</span>
+ <span class="field_data">
+ <textarea name="legal_sow_vendor_address" id="legal_sow_vendor_address" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_email_row" class="field_row">
+ <span class="field_label required">Vendor Email for Notices:</span>
+ <span class="field_data">
+ <input type="text" name="legal_sow_vendor_email" id="legal_sow_vendor_email" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_mozcontact_row" class="field_row">
+ <span class="field_label required">Main Mozilla Contact:</span>
+ <span class="field_data">
+ [% INCLUDE global/userselect.html.tmpl
+ id => "legal_sow_vendor_mozcontact"
+ name => "legal_sow_vendor_mozcontact"
+ value => ""
+ size => 60
+ classes => ["bz_userfield"]
+ multiple => 5
+ %]
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_contact_row" class="field_row">
+ <span class="field_label required">Main Vendor Contact and Email:</span>
+ <span class="field_data">
+ <input type="text" name="legal_sow_vendor_contact" id="legal_sow_vendor_contact" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_services_row" class="field_row">
+ <span class="field_label required">Vendor Services to be Provided:</span>
+ <span class="field_data">
+ <textarea name="legal_sow_vendor_services" id="legal_sow_vendor_services" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_deliverables_row" class="field_row">
+ <span class="field_label required">Description of Deliverables:</span>
+ <span class="field_data">
+ <textarea name="legal_sow_vendor_deliverables" id="legal_sow_vendor_deliverables" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="legal_sow_start_date_row" class="field_row">
+ <span class="field_label required">Start Date:</span>
+ <span class="field_data">
+ <input name="legal_sow_start_date" size="20" id="legal_sow_start_date" value=""
+ onchange="updateCalendarFromField(this)">
+ <button type="button" class="calendar_button"
+ id="button_calendar_legal_sow_start_date"
+ onclick="showCalendar('legal_sow_start_date')">
+ <span>Calendar</span>
+ </button>
+ <div id="con_calendar_legal_sow_start_date"></div>
+ <script type="text/javascript">
+ createCalendar('legal_sow_start_date')
+ </script>
+ </span>
+ </div>
+
+ <div id="legal_sow_end_date_row" class="field_row">
+ <span class="field_label required">End Date:</span>
+ <span class="field_data">
+ <input name="legal_sow_end_date" size="20" id="legal_sow_end_date" value=""
+ onchange="updateCalendarFromField(this)">
+ <button type="button" class="calendar_button"
+ id="button_calendar_legal_sow_end_date"
+ onclick="showCalendar('legal_sow_end_date')">
+ <span>Calendar</span>
+ </button>
+ <div id="con_calendar_legal_sow_end_date"></div>
+ <script type="text/javascript">
+ createCalendar('legal_sow_end_date')
+ </script>
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_payment_row" class="field_row">
+ <span class="field_label required">Rate of Pay:</span>
+ <span class="field_data">
+ <div class="field_description">Include currency</div>
+ <input type="text" name="legal_sow_vendor_payment" id="legal_sow_vendor_payment" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_payment_basis_row" class="field_row">
+ <span class="field_label required">Basis for Payment:</span>
+ <span class="field_data">
+ <div class="field_description">hourly, flat fee, per deliverable, etc.</div>
+ <input type="text" name="legal_sow_vendor_payment_basis" id="legal_sow_vendor_payment_basis" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_hours_row" class="field_row">
+ <span class="field_label">Average/Max Hours:</span>
+ <span class="field_data">
+ <div class="field_description">If hourly, either average or maximum hours per week/month</div>
+ <input type="text" name="legal_sow_vendor_hours" id="legal_sow_vendor_hours" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_payment_schedule_row" class="field_row">
+ <span class="field_label required">Payment Schedule:</span>
+ <span class="field_data">
+ <div class="field_description">"When will we make payments? E.g. every 30 days; half due up front,
+ half on completion; following acceptance of each deliverable, etc.</div>
+ <input type="text" name="legal_sow_vendor_payment_schedule" id="legal_sow_vendor_payment_schedule" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_total_max_row" class="field_row">
+ <span class="field_label required">Total Not to Exceed Amount:</span>
+ <span class="field_data">
+ <input type="text" name="legal_sow_vendor_total_max" id="legal_sow_vendor_total_max" size="60">
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_special_terms_row" class="field_row">
+ <span class="field_label">Any Special Terms:</span>
+ <span class="field_data">
+ <textarea name="legal_sow_vendor_special_terms" id="legal_sow_vendor_special_terms" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="legal_sow_vendor_product_line_row" class="field_row">
+ <span class="field_label required">Product Line:</span>
+ <span class="field_data">
+ <select id="legal_sow_vendor_product_line" name="legal_sow_vendor_product_line">
+ <option value="">Select One</option>
+ <option value="Firefox OS">Firefox OS</option>
+ <option value="Firefox Desktop">Firefox Desktop</option>
+ <option value="Firefox Mobile">Firefox Mobile</option>
+ <option value="Firefox Platform">Firefox Platform</option>
+ <option value="Marketplace/Apps">Marketplace/Apps</option>
+ <option value="Lab/Research">Lab/Research</option>
+ <option value="Services">Services</option>
+ <option value="Product Support">Product Support</option>
+ <option value="Corp Support">Corp Support</option>
+ </select>
+ </span>
+ </div>
+ </div>
+
+ <div id="legal_vendor_services_where_row" class="field_row bz_default_hidden">
+ <span class="field_label required">Vendor Services Location:</span>
+ <span class="field_data">
+ <div class="field_description">Where will the services primarily be provided?</div>
+ <select name="legal_vendor_services_where" id="legal_vendor_services_where">
+ <option value="">Select One</option>
+ <option value="U.S.">U.S.</option>
+ <option value="Europe">Europe</option>
+ <option value="Canada">Canada</option>
+ <option value="Global">Global</option>
+ <option value="Another region of the world">Another region of the world</option>
+ <option value="A single country">A single country</option>
+ </select>
+ <br>
+ <input class="bz_default_hidden" type="text"
+ name="legal_vendor_single_country" id="legal_vendor_single_country" size="60">
+ </span>
+ </div>
+ </div>
+
+ <div id="finance_questions" class="bz_default_hidden">
+ <div class="header">Finance</div>
+
+ <div id="finance_purchase_vendor_row" class="field_row">
+ <span class="field_label required">Vendor:</span>
+ <span class="field_data">
+ <input type="text" name="finance_purchase_vendor" maxsize="255" size="60" id="finance_purchase_vendor">
+ </span>
+ </div>
+
+ <div id="finance_purchase_inbudget_row" class="field_row">
+ <span class="field_label required">Is this line item in budget?:</span>
+ <span class="field_data">
+ <select name="finance_purchase_inbudget" id="finance_purchase_inbudget">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="finance_purchase_notinbudget_why_row" class="field_row bz_default_hidden">
+ <span class="field_label required">Not In Budget Why:</span>
+ <span class="field_data">
+ <em>Please include additional description for this out of budget line item</em><br>
+ <textarea name="finance_purchase_notinbudget_why" id="finance_purchase_notinbudget_why" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="finance_purchase_what_row" class="field_row">
+ <span class="field_label required">What is the purchase for?:</span>
+ <span class="field_data">
+ <textarea name="finance_purchase_what" id="finance_purchase_what" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="finance_purchase_why_row" class="field_row">
+ <span class="field_label required">Why is the purchase needed?:</span>
+ <span class="field_data">
+ <textarea name="finance_purchase_why" id="finance_purchase_why" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="finance_purchase_risk_row" class="field_row">
+ <span class="field_label required">What is the risk<br>if not purchased?:</span>
+ <span class="field_data">
+ <textarea name="finance_purchase_risk" id="finance_purchase_risk" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="finance_purchase_alternative_row" class="field_row">
+ <span class="field_label required">What is the alternative?:</span>
+ <span class="field_data">
+ <textarea name="finance_purchase_alternative" id="finance_purchase_alternative" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="finance_purchase_urgency_row" class="field_row">
+ <span class="field_label required">When do the items need<br>to be ordered by?:</span>
+ <span class="field_data">
+ <select name="finance_purchase_urgency" id="finance_purchase_urgency">
+ <option value="within 24 hours">within 24 hours</option>
+ <option value="1 to 3 days">1 to 3 days</option>
+ <option value="a week">a week</option>
+ <option value="no rush" selected>no rush</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="finance_purchase_cost_row" class="field_row">
+ <span class="field_label required">Total Cost:</span>
+ <span class="field_data">
+ <input type="text" name="finance_purchase_cost" id="finance_purchase_cost" size="60">
+ </span>
+ </div>
+ </div>
+
+ <div id="data_safety_questions" class="bz_default_hidden">
+ <div class="header">Data Safety</div>
+
+ <div id="data_safety_user_data_row" class="field_row">
+ <span class="field_label">User Data:</span>
+ <span class="field_data">
+ <div class="field_description">Does your project collect data from users?</div>
+ <select name="data_safety_user_data" id="data_safety_user_data">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="data_safety_extra_questions" class="bz_default_hidden">
+ <div id="data_safety_user_count_row" class="field_row">
+ <span class="field_label">How many involved?:</span>
+ <span class="field_data">
+ <div class="field_description">How many users are currently involved?</div>
+ <input type="text" name="data_safety_user_count" id="data_safety_user_count" size="60">
+ </span>
+ </div>
+
+ <div id="data_safety_user_count_anticipated_row" class="field_row">
+ <span class="field_label">How many antcipated?:</span>
+ <span class="field_data">
+ <div class="field_description">How many users do you anticipate to be involved?</div>
+ <input type="text" name="data_safety_user_count_anticipated" id="data_safety_user_count_anticipated" size="60">
+ </span>
+ </div>
+
+ <div id="data_safety_data_type_row" class="field_row">
+ <span class="field_label">Type of Data:</span>
+ <span class="field_data">
+ <div class="field_description">Please provide examples of the types of user data you collect.</div>
+ <textarea name="data_safety_data_type" id="data_safety_data_type" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_data_reason_row" class="field_row">
+ <span class="field_label">Data Reason:</span>
+ <span class="field_data">
+ <div class="field_description">Why do you need to collect user data?</div>
+ <textarea name="data_safety_data_reason" id="data_safety_data_reason" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_community_benefit_row" class="field_row">
+ <span class="field_label">Community Benefit:</span>
+ <span class="field_data">
+ <div class="field_description">What community benefits are derived from the collection of user data for your project?</div>
+ <textarea name="data_safety_community_benefit" id="data_safety_community_benefit" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_community_collection_row" class="field_row">
+ <span class="field_label">Data Collection:</span>
+ <span class="field_data">
+ <div class="field_description">How is the data being collected? (e.g., forms on web site, provided directly by user,
+ observed data collection, etc.) (Consider that you may be collecting data unintentionally
+ such as automatic logging by web servers)</div>
+ <textarea name="data_safety_community_collection" id="data_safety_community_collection" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_retention_row" class="field_row">
+ <span class="field_label">Data Retention:</span>
+ <span class="field_data">
+ <div class="field_description">Will your project / team members need to retain user data?</div>
+ <select name="data_safety_retention" id="data_safety_retention">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="data_safety_retention_length_row" class="field_row bz_default_hidden">
+ <span class="field_label">Data Retention Length:</span>
+ <span class="field_data">
+ <div class="field_description">If the data is being retained, for how long?</div>
+ <input type="text" name="data_safety_retention_length" id="data_safety_retention_length" size="60"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_separate_party_row" class="field_row">
+ <span class="field_label">Separate Party:</span>
+ <span class="field_data">
+ <div class="field_description">Will any user data be shared or accessed by third party partners, customers or providers?</div>
+ <select name="data_safety_separate_party" id="data_safety_separate_party">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="data_safety_separate_party_extra" class="bz_default_hidden">
+ <div id="data_safety_separate_party_data_row" class="field_row">
+ <span class="field_label">Separate Party Data Type:</span>
+ <span class="field_data">
+ <div class="field_description">What is the data being shared or accessed?</div>
+ <textarea name="data_safety_separate_party_data" id="data_safety_community_separate_party_data" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_separate_party_data_communication_row" class="field_row">
+ <span class="field_label">Separate Party<br>Data Communication:</span>
+ <span class="field_data">
+ <div class="field_description">How would the data be communicated / transferred to the third parties?</div>
+ <textarea name="data_safety_separate_party_data_communication" id="data_safety_separate_party_data_communication" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_separate_party_who_row" class="field_row">
+ <span class="field_label">Who are the separate parties?:</span>
+ <span class="field_data">
+ <div class="field_description">Who are the third party vendors and in what countries are they based?</div>
+ <textarea name="data_safety_separate_party_who" id="data_safety_separate_party_who" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+ </div>
+
+ <div id="data_safety_community_visibility_row" class="field_row">
+ <span class="field_label">Community Visibility and Input:</span>
+ <span class="field_data">
+ <div class="field_description">Has your proposal been shared publicly, including requirements for Mozilla to collect and host user data?</div>
+ <select name="data_safety_community_visibility" id="data_safety_community_visibility">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="data_safety_communication_channels_row" class="field_row bz_default_hidden">
+ <span class="field_label">Communication Channels:</span>
+ <span class="field_data">
+ <div class="field_description">What communication channels are you using and what kind of input have you received thus far?</div>
+ <textarea name="data_safety_communication_channels" id="data_safety_communication_channels" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="data_safety_communication_plan_row" class="field_row bz_default_hidden">
+ <span class="field_label">Public Communication Plan:</span>
+ <span class="field_data">
+ <div class="field_description">Data Safety discussion needed. Provide your plan for publicly sharing your proposal.</div>
+ <textarea name="data_safety_communication_plan" id="data_safety_communication_plan" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <input type="submit" id="commit" value="Submit Review">
+</form>
+
+<p>
+ Thanks for contacting us. You will be notified by email of any progress made in resolving your request.
+</p>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl b/extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl
new file mode 100644
index 000000000..ac7c1f6c7
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl
@@ -0,0 +1,13 @@
+[%# 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 message_tag == "moz_project_review_creation_failed" %]
+ The parent [% terms.bug %] was created successfully, but creation of
+ the dependent [% terms.bugs %] failed. The error has been logged
+ and no further action is required at this time.
+[% END %]
diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js
new file mode 100644
index 000000000..dca67f2ae
--- /dev/null
+++ b/extensions/MozProjectReview/web/js/moz_project_review.js
@@ -0,0 +1,307 @@
+/* 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.
+ */
+
+var Dom = YAHOO.util.Dom;
+var Event = YAHOO.util.Event;
+
+var MPR = {
+ required_fields: {
+ "initial_questions": {
+ "short_desc": "Please enter a value for project or feature name in the initial questions section",
+ "cc": "Please enter a value for points of contact in the initial questions section",
+ "urgency": "Please enter a value for urgency in the initial questions section",
+ "key_initiative": "Please select a value for key initiative in the initial questions section",
+ "project_status": "Please select a value for project status in the initial questions section",
+ "mozilla_data": "Please select a value for mozilla data in the initial questions section",
+ "new_or_change": "Please select a value for new or change to existing project in the initial questions section",
+ "separate_party": "Please select a value for separate party in the initial questions section"
+ },
+ "finance_questions": {
+ "finance_purchase_vendor": "Please enter a value for vendor in the finance questions section",
+ "finance_purchase_what": "Please enter a value for what in the finance questions section",
+ "finance_purchase_why": "Please enter a value for why in the finance questions section",
+ "finance_purchase_risk": "Please enter a value for risk in the finance questions section",
+ "finance_purchase_alternative": "Please enter a value for alternative in the finance questions section",
+ "finance_purchase_inbudget": "Please enter a value for in budget in the finance questions section",
+ "finance_purchase_urgency": "Please select a value for urgency in the finance questions section",
+ "finance_purchase_cost": "Please enter a value for total cost in the finance questions section"
+ },
+ "legal_questions": {
+ "legal_priority": "Please select a priority for the legal questions section",
+ "legal_help_from_legal": "Please describe the help needed from the Legal department"
+ },
+ "legal_sow_questions": {
+ "legal_sow_vendor_name": "Please enter a value for SOW legal vendor name",
+ "legal_sow_vendor_address": "Please enter a value for SOW vendor address",
+ "legal_sow_vendor_email": "Please enter a value for SOW vendor email for notices",
+ "legal_sow_vendor_mozcontact": "Please enter a value for SOW Mozilla contact",
+ "legal_sow_vendor_contact": "Please enter a value for SOW vendor contact and email address",
+ "legal_sow_vendor_services": "Please enter a value for SOW vendor services description",
+ "legal_sow_vendor_deliverables": "Please enter a value for SOW vendor deliverables description",
+ "legal_sow_start_date": "Please enter a value for SOW vendor start date",
+ "legal_sow_end_date": "Please enter a value for SOW vendor end date",
+ "legal_sow_vendor_payment": "Please enter a value for SOW vendor payment amount",
+ "legal_sow_vendor_payment_basis": "Please enter a value for SOW vendor payment basis",
+ "legal_sow_vendor_payment_schedule": "Please enter a value for SOW vendor payment schedule",
+ "legal_sow_vendor_total_max": "Please enter a value for SOW vendor maximum total to be paid",
+ "legal_sow_vendor_product_line": "Please enter a value for SOW vendor product line"
+ }
+ },
+
+ select_inputs: [
+ 'urgency',
+ 'key_initiative',
+ 'project_status',
+ 'mozilla_data',
+ 'new_or_change',
+ 'mozilla_project',
+ 'separate_party',
+ 'relationship_type',
+ 'data_access',
+ 'vendor_cost',
+ 'po_needed',
+ 'sec_affects_products',
+ 'privacy_policy_project',
+ 'privacy_policy_user_data',
+ 'privacy_policy_vendor_user_data',
+ 'privacy_policy_vendor_questionnaire',
+ 'legal_priority',
+ 'legal_sow_vendor_product_line',
+ 'legal_vendor_services_where',
+ 'finance_purchase_inbudget',
+ 'finance_purchase_urgency',
+ 'data_safety_user_data',
+ 'data_safety_retention',
+ 'data_safety_separate_party',
+ 'data_safety_community_visibility'
+ ],
+
+ init: function () {
+ // Bind the updateSections function to each of the inputs desired
+ for (var i = 0, l = this.select_inputs.length; i < l; i++) {
+ Event.on(this.select_inputs[i], 'change', MPR.updateSections);
+ }
+ MPR.updateSections();
+ },
+
+ updateSections: function () {
+ // Sections that will be hidden/shown based on the input values
+ // Start out as all false except for initial questions which is always visible
+ var page_sections = {
+ initial_questions: true,
+ key_initiative_other_row: false,
+ initial_separate_party_questions: false,
+ finance_questions: false,
+ finance_purchase_notinbudget_why_row: false,
+ po_needed_row: false,
+ legal_questions: false,
+ legal_sow_questions: false,
+ legal_vendor_single_country: false,
+ legal_vendor_services_where_row: false,
+ sec_review_questions: false,
+ privacy_policy_project_questions: false,
+ privacy_policy_vendor_questions: false,
+ data_safety_questions: false,
+ data_safety_extra_questions: false,
+ mozilla_project_row: false,
+ privacy_policy_project_link_row: false,
+ privacy_policy_project_user_data_bug_row: false,
+ privacy_policy_vendor_extra: false,
+ data_safety_extra_questions: false,
+ data_safety_retention_length_row: false,
+ data_safety_separate_party_data_row: false,
+ data_safety_communication_channels_row: false,
+ data_safety_communication_plan_row: false,
+ };
+
+ if (Dom.get('key_initiative').value == 'Other') {
+ page_sections.key_initiative_other_row = true;
+ }
+
+ if (Dom.get('new_or_change').value == 'Existing') {
+ page_sections.mozilla_project_row = true;
+ }
+
+ if (Dom.get('new_or_change').value == 'New')
+ page_sections.legal_questions = true;
+
+ if (Dom.get('mozilla_data').value == 'Yes') {
+ page_sections.legal_questions = true;
+ page_sections.privacy_policy_project_questions = true;
+ page_sections.data_safety_questions = true;
+ page_sections.sec_review_questions = true;
+ }
+
+ if (Dom.get('separate_party').value == 'Yes') {
+ page_sections.initial_separate_party_questions = true;
+
+ if (Dom.get('relationship_type').value
+ && Dom.get('relationship_type').value != 'Hardware Purchase')
+ {
+ page_sections.legal_questions = true;
+ }
+
+ if (Dom.get('relationship_type').value == 'Vendor/Services'
+ || Dom.get('relationship_type').value == 'Distribution/Bundling')
+ {
+ page_sections.legal_sow_questions = true;
+ page_sections.legal_vendor_services_where_row = true;
+ }
+
+ if (Dom.get('relationship_type').value == 'Hardware Purchase') {
+ page_sections.finance_questions = true;
+ }
+
+ if (Dom.get('data_access').value == 'Yes') {
+ page_sections.legal_questions = true;
+ page_sections.sec_review_questions = true;
+ page_sections.privacy_policy_vendor_questions = true;
+ }
+
+ if (Dom.get('vendor_cost').value == '<= $25,000') {
+ page_sections.po_needed_row = true;
+ }
+
+ if (Dom.get('po_needed').value == 'Yes') {
+ page_sections.finance_questions = true;
+ }
+
+ if (Dom.get('vendor_cost').value == '> $25,000') {
+ page_sections.finance_questions = true;
+ }
+ }
+
+ if (Dom.get('legal_vendor_services_where').value == 'A single country') {
+ page_sections.legal_vendor_single_country = true;
+ }
+
+ if (Dom.get('finance_purchase_inbudget').value == 'No') {
+ page_sections.finance_purchase_notinbudget_why_row = true;
+ }
+
+ if (Dom.get('privacy_policy_project').value == 'Yes') {
+ page_sections.privacy_policy_project_link_row = true;
+ }
+
+ if (Dom.get('privacy_policy_user_data').value == 'Yes') {
+ page_sections.privacy_policy_project_user_data_bug_row = true;
+ }
+
+ if (Dom.get('privacy_policy_vendor_user_data').value == 'Yes') {
+ page_sections.privacy_policy_vendor_extra = true;
+ }
+
+ if (Dom.get('data_safety_user_data').value == 'Yes') {
+ page_sections.data_safety_extra_questions = true;
+ }
+
+ if (Dom.get('data_safety_retention').value == 'Yes') {
+ page_sections.data_safety_retention_length_row = true;
+ }
+
+ if (Dom.get('data_safety_separate_party').value == 'Yes') {
+ page_sections.data_safety_separate_party_data_row = true;
+ }
+
+ if (Dom.get('data_safety_community_visibility').value == 'Yes') {
+ page_sections.data_safety_communication_channels_row = true;
+ }
+
+ if (Dom.get('data_safety_community_visibility').value == 'No') {
+ page_sections.data_safety_communication_plan_row = true;
+ }
+
+ // Toggle the individual page_sections
+ for (section in page_sections) {
+ MPR.toggleShowSection(section, page_sections[section]);
+ }
+ },
+
+ toggleShowSection: function (section, show) {
+ if (show) {
+ Dom.removeClass(section, 'bz_default_hidden');
+ }
+ else {
+ Dom.addClass(section ,'bz_default_hidden');
+ }
+ },
+
+ validateAndSubmit: function () {
+ var alert_text = '';
+ var section = '';
+ for (section in this.required_fields) {
+ if (!Dom.hasClass(section, 'bz_default_hidden')) {
+ var field = '';
+ for (field in MPR.required_fields[section]) {
+ if (!MPR.isFilledOut(field)) {
+ alert_text += this.required_fields[section][field] + "\n";
+ }
+ }
+ }
+ }
+
+ // Special case checks
+ if (Dom.get('relationship_type').value == 'Vendor/Services'
+ && Dom.get('legal_vendor_services_where').value == '')
+ {
+ alert_text += "Please select a value for vendor services where\n";
+ }
+
+ if (Dom.get('relationship_type').value == 'Vendor/Services'
+ && Dom.get('legal_vendor_services_where').value == 'A single country'
+ && Dom.get('legal_vendor_single_country').value == '')
+ {
+ alert_text += "Please select a value for vendor services where single country\n";
+ }
+
+ if (Dom.get('key_initiative').value == 'Other') {
+ if (!MPR.isFilledOut('key_initiative_other')) {
+ alert_text += "Please enter a value for key initiative in the initial questions section\n";
+ }
+ }
+
+ if (Dom.get('separate_party').value == 'Yes') {
+ if (!MPR.isFilledOut('relationship_type')) {
+ alert_text += "Please select a value for type of relationship\n";
+ }
+ if (!MPR.isFilledOut('data_access')) {
+ alert_text += "Please select a value for data access\n";
+ }
+ if (!MPR.isFilledOut('vendor_cost')) {
+ alert_text += "Please select a value for vendor cost\n";
+ }
+ }
+
+ if (Dom.get('finance_purchase_inbudget').value == 'No') {
+ if (!MPR.isFilledOut('finance_purchase_notinbudget_why')) {
+ alert_text += "Please include additional description for the out of budget line item\n";
+ }
+ }
+
+ if (Dom.get('vendor_cost').value == '<= $25,000'
+ && Dom.get('po_needed').value == '')
+ {
+ alert_text += "Please select whether a PO is needed or not\n";
+ }
+
+ if (alert_text) {
+ alert(alert_text);
+ return false;
+ }
+
+ return true;
+ },
+
+ //Takes a DOM element id and makes sure that it is filled out
+ isFilledOut: function (elem_id) {
+ var str = Dom.get(elem_id).value;
+ return str.length > 0 ? true : false;
+ }
+};
+
+Event.onDOMReady(MPR.init());
diff --git a/extensions/MozProjectReview/web/style/moz_project_review.css b/extensions/MozProjectReview/web/style/moz_project_review.css
new file mode 100644
index 000000000..cf1c3a8b8
--- /dev/null
+++ b/extensions/MozProjectReview/web/style/moz_project_review.css
@@ -0,0 +1,48 @@
+/* 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. */
+
+.header {
+ width: 95%;
+ border-bottom: 1px solid rgb(116,126,147);
+ font-size: 1.5em;
+ color: rgb(102, 100, 88);
+ padding-bottom: 5px;
+ margin-bottom: 5px;
+ margin-top: 12px;
+}
+
+.field_row {
+ width: 100%;
+ min-width: 700px;
+ clear: both;
+}
+
+.field_label {
+ float: left;
+ width: 20%;
+}
+
+.field_data {
+ float: left;
+ width: 75%;
+ margin-left: 5px;
+ margin-bottom: 5px;
+}
+
+.field_description {
+ font-style: italic;
+ font-size: 90%;
+ color: rgb(102, 100, 88);
+}
+
+span.required:before {
+ content: "* ";
+}
+
+span.required:before, span.required_star {
+ color: red;
+}