summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-11-23 15:25:36 +0100
committerDavid Lawrence <dkl@mozilla.com>2016-11-23 15:25:36 +0100
commitaad9a94d7da97d68f4d4289ae93d2665dedfd98e (patch)
tree1baeda284157f38229ab5a3e88da78a619d54080 /extensions
parent10bf6d405accfa7ccfb9aac816b8c54d9e5d86d5 (diff)
downloadbugzilla-aad9a94d7da97d68f4d4289ae93d2665dedfd98e.tar.gz
bugzilla-aad9a94d7da97d68f4d4289ae93d2665dedfd98e.tar.xz
Bug 1264821 - We want to replace the project kick-off form with a contract request form
Diffstat (limited to 'extensions')
-rw-r--r--extensions/MozProjectReview/Extension.pm155
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-compliance.txt.tmpl28
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl18
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl51
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl17
-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.tmpl10
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl137
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl780
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/initial-questions-comment.txt.tmpl42
-rw-r--r--extensions/MozProjectReview/web/js/moz_project_review.js424
-rw-r--r--extensions/MozProjectReview/web/style/moz_project_review.css4
13 files changed, 771 insertions, 923 deletions
diff --git a/extensions/MozProjectReview/Extension.pm b/extensions/MozProjectReview/Extension.pm
index fcad6916c..f85822d4d 100644
--- a/extensions/MozProjectReview/Extension.pm
+++ b/extensions/MozProjectReview/Extension.pm
@@ -12,23 +12,14 @@ use warnings;
use base qw(Bugzilla::Extension);
+our $VERSION = '0.01';
+
use Bugzilla::User;
use Bugzilla::Group;
use Bugzilla::Error;
use Bugzilla::Constants;
-our $VERSION = '0.01';
-
-# these users will be cc'd to the parent bug when the corresponding child bug
-# is created, as well as the child bug.
-our %auto_cc = (
- 'legal' => ['liz@mozilla.com'],
- 'finance' => ['waoieong@mozilla.com', 'mcristobal@mozilla.com', 'echoe@mozilla.com'],
- 'privacy-vendor' => ['smartin@mozilla.com'],
- 'privacy-project' => ['ahua@mozilla.com'],
- 'privacy-tech' => ['ahua@mozilla.com'],
- 'policy-business-partner' => ['smartin@mozilla.com']
-);
+use List::MoreUtils qw(any);
sub post_bug_after_creation {
my ($self, $args) = @_;
@@ -39,50 +30,28 @@ sub post_bug_after_creation {
my $params = Bugzilla->input_params;
my $template = Bugzilla->template;
- return if !($params->{format}
- && $params->{format} eq 'moz-project-review'
- && $bug->component eq 'Project Review');
+ return if !($params->{format} && $params->{format} eq 'moz-project-review');
# do a match if applicable
Bugzilla::User::match_field({
- 'legal_cc' => { 'type' => 'multi' }
+ 'sow_vendor_mozcontact' => { 'type' => 'single' },
});
- my ($do_sec_review, $do_legal, $do_finance, $do_data_compliance);
-
- if ($params->{'mozilla_data'} eq 'Yes') {
- $do_legal = 1;
- $do_data_compliance = 1;
+ my $do_sec_review = 0;
+ my @sec_review_needed = (
+ 'Engaging a new vendor company',
+ 'Engaging an individual (independent contractor, temp agency worker, incorporated)',
+ 'Adding a new SOW with a vendor',
+ 'Extending an SOW or renewing a contract',
+ 'Purchasing software',
+ 'Signing up for an online service',
+ );
+ if ((any { $_ eq $params->{contract_type} } @sec_review_needed)
+ || $params->{mozilla_data} eq 'Yes') {
$do_sec_review = 1;
}
- if ($params->{'separate_party'} eq 'Yes') {
- if ($params->{'relationship_type'} ne 'Hardware Purchase') {
- $do_legal = 1;
- }
-
- if ($params->{'data_access'} eq 'Yes') {
- $do_data_compliance = 1;
- $do_legal = 1;
- $do_sec_review = 1;
- }
-
- if ($params->{'data_access'} eq 'Yes'
- && $params->{'privacy_policy_vendor_user_data'} eq 'Yes')
- {
- $do_data_compliance = 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, $data_compliance_bug,
- $error, @dep_comment, @dep_errors, @send_mail);
+ my ($sec_review_bug, $finance_bug, $error, @dep_comment, @dep_errors, @send_mail);
# Common parameters always passed to _file_child_bug
# bug_data and template_suffix will be different for each bug
@@ -105,79 +74,27 @@ sub post_bug_after_creation {
rep_platform => 'All',
version => 'unspecified',
blocked => $bug->bug_id,
+ cc => $params->{cc},
};
$child_params->{'template_suffix'} = 'sec-review';
_file_child_bug($child_params);
}
- if ($do_legal) {
- my $component = 'General';
-
- 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;
-
- $child_params->{'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'},
- };
- $child_params->{'template_suffix'} = 'legal';
- _file_child_bug($child_params);
- }
-
- if ($do_finance) {
- $child_params->{'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,
- };
- $child_params->{'template_suffix'} = 'finance';
- _file_child_bug($child_params);
- }
-
- if ($do_data_compliance) {
- $child_params->{'bug_data'} = {
- short_desc => 'Data Compliance Review: ' . $bug->short_desc,
- product => 'Data Compliance',
- component => 'General',
- bug_severity => 'normal',
- priority => '--',
- bug_severity => $params->{data_comp_urgency},
- groups => [ 'mozilla-employee-confidential' ],
- op_sys => 'All',
- rep_platform => 'All',
- version => 'unspecified',
- cf_due_date => $params->{release_date},
- blocked => $bug->bug_id,
- };
- $child_params->{'template_suffix'} = 'data-compliance';
- _file_child_bug($child_params);
- }
+ $child_params->{'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,
+ cc => $params->{cc},
+ };
+ $child_params->{'template_suffix'} = 'finance';
+ _file_child_bug($child_params);
if (scalar @dep_errors) {
warn "[Bug " . $bug->id . "] Failed to create additional moz-project-review bugs:\n" .
@@ -214,16 +131,10 @@ sub _file_child_bug {
Bugzilla->template->process($full_template, $template_vars, \$comment)
|| ThrowTemplateError(Bugzilla->template->error());
$bug_data->{'comment'} = $comment;
- if (exists $auto_cc{$template_suffix}) {
- $bug_data->{'cc'} = $auto_cc{$template_suffix};
- }
if ($new_bug = Bugzilla::Bug->create($bug_data)) {
my $set_all = {
dependson => { add => [ $new_bug->bug_id ] }
};
- if (exists $auto_cc{$template_suffix}) {
- $set_all->{'cc'} = { add => $auto_cc{$template_suffix} };
- }
$parent_bug->set_all($set_all);
$parent_bug->update($parent_bug->creation_ts);
}
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-compliance.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-compliance.txt.tmpl
deleted file mode 100644
index 889543c0c..000000000
--- a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-compliance.txt.tmpl
+++ /dev/null
@@ -1,28 +0,0 @@
-[%# 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 %]
-
-> Request Type
-[%+ cgi.param('data_comp_request_type') %]
-
-> Area
-[%+ cgi.param('data_comp_area') %]
-
-> Description
-[%+ cgi.param('data_comp_desc') %]
-
-> Does this request involve a change in data collection or handling?
-[%+ cgi.param('data_comp_handling_change') %]
-
-> Does this request involve a change in to the business unit's data practices?
-[%+ cgi.param('data_comp_practice_change') %]
-
-> Other Information
-[%+ cgi.param('data_comp_other') || "None" %]
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
index eaa626a7e..f28658078 100644
--- 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
@@ -9,22 +9,28 @@
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
-[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+[% PROCESS "bug/create/initial-questions-comment.txt.tmpl" %]
-Finance Questions:
+[% RETURN IF cgi.param('vendor_cost') != '< $25,000 PO Needed' && cgi.param('vendor_cost') != '> $25,000' %]
+>> Finance Question
-Vendor: [% cgi.param('finance_purchase_vendor') %]
Is this line item in budget?:
[%+ cgi.param('finance_purchase_inbudget') %]
+
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?:
+
+What is the alternative?:
[%+ cgi.param('finance_purchase_alternative') %]
-What is the urgency?: [% cgi.param('finance_purchase_urgency') %]
+
What is the shipping address?:
[%+ cgi.param('finance_shipment_address') %]
-Total Cost: [% cgi.param('finance_purchase_cost') %]
+
+Total not to exceed amount:
+[%+ cgi.param('sow_vendor_total_max') %]
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
deleted file mode 100644
index 9856736d1..000000000
--- a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl
+++ /dev/null
@@ -1,51 +0,0 @@
-[%# 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') %]
-Time Frame For Completion of Legal Portion?: [% cgi.param('legal_timeframe') %]
-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
deleted file mode 100644
index ff3f5adb6..000000000
--- a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl
+++ /dev/null
@@ -1,17 +0,0 @@
-[%# 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" %]
-
-Is there a privacy policy for this new feature/product?:
-[%+ cgi.param('privacy_policy_project_link') %]
-What assistance do you need from the privacy team (if any)?:
-[%+ cgi.param('privacy_policy_project_assistance') %]
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
deleted file mode 100644
index 7b72cf1bc..000000000
--- a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl
+++ /dev/null
@@ -1,12 +0,0 @@
-[%# 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
deleted file mode 100644
index eaf9f12e3..000000000
--- a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl
+++ /dev/null
@@ -1,16 +0,0 @@
-[%# 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
index 029f6df48..cb3317cfa 100644
--- 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
@@ -9,12 +9,12 @@
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
-[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %]
+[% PROCESS "bug/create/initial-questions-comment.txt.tmpl" %]
-Security Review Questions:
+>> Vendor Security Review Questions
+
+Review Invitees:
+[%+ cgi.param('sec_review_invitees') %]
-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
index 07d5fa5ad..e0c42df7e 100644
--- 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
@@ -9,25 +9,120 @@
[% 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') %]
-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') %]
-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') %]
+[% PROCESS "bug/create/initial-questions-comment.txt.tmpl" %]
+
+[% IF cgi.param('contract_type') == 'Engaging an individual (independent contractor, temp agency worker, incorporated)' %]
+>> Independent Contractor Questions
+
+Is this someone we've worked with before?
+[%+ cgi.param('independent_contractor_prev_work') %]
+
+[% IF cgi.param('independent_contractor_prev_work') == 'Yes' %]
+If yes, enter the [% terms.bug %] number for the previous work or note that this is a former employee:
+[%+ terms.Bug +%] [%+ cgi.param('independent_contractor_prev_work_bug') %]
+[% END %]
+
+Has this person incorporated (sole proprietorship or similar form)?
+[%+ cgi.param('independent_contractor_incorporated') %]
+
+Will the person be engaged through a staffing agency?
+[%+ cgi.param('independent_contractor_staff_agency') %]
+
+Does the person have other clients?
+[%+ cgi.param('independent_contractor_other_clients') %]
+
+Does the person provide services similar to a paid Mozilla employee?
+[%+ cgi.param('independent_contractor_dupe_services') %]
+
+[% IF cgi.param('independent_contractor_dupe_services') == 'Yes' %]
+If yes, is the person primarily being engaged due to a temporary increase in workload or as backfill for an employee on leave?
+[%+ cgi.param('independent_contractor_dupe_services_temp') %]
+[% END %]
+
+Will the person be managing his or her own time?
+[%+ cgi.param('independent_contractor_self_manage') %]
+
+Will the person be using his or her own equipment?
+[%+ cgi.param('independent_contractor_own_equipment') %]
+
+Will the person be regularly working at a Mozilla facility?
+[%+ cgi.param('independent_contractor_mozilla_facility') %]
+
+Will the person be supervising Mozilla employees?
+[%+ cgi.param('independent_contractor_supervising') %]
+[% END %]
+
+>> Contract Specific Questions
+
+Vendor/Contractor/Partner Name:
+[%+ cgi.param('other_party') %]
+
+[% IF cgi.param('contract_type') == 'Engaging a new vendor company'
+ || cgi.param('contract_type') == 'Engaging an individual (independent contractor, temp agency worker, incorporated)'
+ || cgi.param('contract_type') == 'Adding a new SOW with a vendor' %]
+>> SOW Details
+
+Vendor Address:
+[%+ cgi.param('sow_vendor_address') %]
+
+Vendor Email for Legal Notices:
+[%+ cgi.param('sow_vendor_email') %]
+
+Mozilla Contact:
+[%+ cgi.param('sow_vendor_mozcontact') %]
+
+Vendor Contact and Email Address:
+[%+ cgi.param('sow_vendor_contact') %]
+
+Vendor Services to be Provided:
+[%+ cgi.param('sow_vendor_services') %]
+
+Access to Mozilla Systems Required:
+[%+ cgi.param('sow_vendor_mozilla_systems') %]
+
+[% IF cgi.param('sow_vendow_mozilla_systems') == 'Yes' %]
+Mozilla Systems Access Explanation:
+[%+ cgi.param('sow_vendor_mozilla_systems_explain') %]
+[% END %]
+
+Vendor Onsite at Mozilla Location:
+[%+ cgi.param('sow_vendor_onsite') %]
+
+[% IF cgi.param('sow_vendor_onsite') == 'Yes' %]
+Where and When Vendor will be Onsite:
+[%+ cgi.param('sow_vendor_onsite_where') %]
+[% END %]
+
+Description of Deliverables:
+[%+ cgi.param('sow_vendor_deliverables') %]
+
+Start Date:
+[%+ cgi.param('sow_start_date') %]
+
+End Date:
+[%+ cgi.param('sow_end_date') %]
+
+Rate of Pay:
+[%+ cgi.param('sow_vendor_payment') %]
+
+Basis for Payment:
+[%+ cgi.param('sow_vendor_payment_basis') %]
+
+Cap on reimbursement expenses:
+[%+ cgi.param('sow_vendor_cap_expenses') %]
+
+Average/Maximum Hours:
+[%+ cgi.param('sow_vendor_hours') %]
+
+Payment Schedule:
+[%+ cgi.param('sow_vendor_payment_schedule') %]
+
+Total Not to Exceed Amount:
+[%+ cgi.param('sow_vendor_total_max') %]
+
+Any Special Terms:
+[%+ cgi.param('sow_vendor_special_terms') || 'None' %]
+
+Where will the services be provided?:
+[%+ cgi.param('vendor_services_where') %]
[% 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
index 736daad31..daf900a5e 100644
--- 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
@@ -11,15 +11,27 @@
[% PROCESS global/header.html.tmpl
title = "Mozilla Project Review"
generate_api_token = 1
- style_urls = [ 'extensions/MozProjectReview/web/style/moz_project_review.css' ]
+ style_urls = [ 'skins/custom/create_bug.css',
+ 'extensions/MozProjectReview/web/style/moz_project_review.css'
+ 'js/jquery/plugins/datetimepicker/datetimepicker.css' ]
javascript_urls = [ 'js/field.js', 'js/util.js',
'extensions/MozProjectReview/web/js/moz_project_review.js' ]
- yui = [ 'calendar' ]
+ jquery = ["datetimepicker" ]
%]
+<div id="custom_form_list">
+ <div id="custom_form_list_text">
+ Other task-specific [% terms.bug %] forms exist that should be used if appropriate:
+ <ul>
+ <li><a href="enter_bug.cgi?product=Mozilla%20Foundation%20Operations">Mozilla Foundation Vendor Request</a></li>
+ <li><a href="form.name.clearance">Name Clearance Request</a></li>
+ <li><a href="form.nda">NDA Request</a></li>
+ </ul>
+ </div>
+</div>
+
<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>.
+ <strong>Please use this form for submitting a contract request, spend approval request and/or vendor review request.</strong>
</p>
<p>
@@ -27,47 +39,67 @@
<span class="required_explanation">Required Field</span>)
</p>
-<form method="post" action="post_bug.cgi" id="mozProjectForm" 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">
+<form method="post" action="post_bug.cgi" id="mozProjectForm" enctype="multipart/form-data">
+ <input type="hidden" id="product" name="product" value="Legal">
+ <input type="hidden" id="component" name="component" value="General">
<input type="hidden" id="rep_platform" name="rep_platform" value="All">
<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="version" name="version" value="unspecified">
<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="groups" name="groups" value="mozilla-employee-confidential">
+ <input type="hidden" id="short_desc" name="short_desc" value="">
<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>
+ <div id="contract_type_row" class="field_row">
+ <span class="field_label required">What are you doing?:</span>
+ <span class="field_data">
+ <div class="field_description">Select one from the list</div>
+ <select name="contract_type" id="contract_type">
+ <option value="">Select One</option>
+ <option value="Engaging a new vendor company">Engaging a new vendor company</option>
+ <option value="Engaging an individual (independent contractor, temp agency worker, incorporated)">Engaging an individual (independent contractor, temp agency worker, incorporated)</option>
+ <option value="Adding a new SOW with a vendor">Adding a new SOW with a vendor</option>
+ <option value="Extending a SOW or renewing a contract">Extending an SOW or renewing a contract</option>
+ <option value="Purchasing software">Purchasing software</option>
+ <option value="Purchasing hardware">Purchasing hardware</option>
+ <option value="Signing up for an online service">Signing up for an online service</option>
+ <option value="An agreement with a partner">An agreement with a partner</option>
+ <option value="Other">Other</option>
+ </select>
+ <br>
+ <input type="text" name="contract_type_other" id="contract_type_other" size="60" style="display:none;">
+ </span>
+ </div>
+
+ <div id="description_row" class="field_row">
+ <span class="field_label required">Description:</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">
+ <div class="field_description">
+ Expand on the request, but most needed information will be requested in later questions.
+ </div>
+ <textarea name="comment" id="comment" rows="10" cols="80"></textarea>
</span>
</div>
- <div id="tracking_id_row" class="field_row">
- <span class="field_label">Tracking [% terms.Bug %] ID:</span>
+ <div id="other_party_row" class="field_row">
+ <span class="field_label required">Vendor/Contractor/Partner Name:</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">
+ <div class="field_description">Name of other party involved</div>
+ <input type="text" name="other_party" id="other_party" size="60">
</span>
</div>
- <div id="contacts_row" class="field_row">
- <span class="field_label required">Points of Contact:</span>
+ <div id="cc_row" class="field_row">
+ <span class="field_label">Cc:</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
@@ -75,28 +107,12 @@
</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="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>
+ <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="Business Support">Business Support</option>
@@ -104,576 +120,461 @@
<option value="Content Services">Content Services</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="Labs / Research / H3">Labs / Research / H3</option>
- <option value="Marketplace / Apps">Marketplace / Apps</option>
- <option value="Services: Persona">Services: Persona</option>
- <option value="Services: Social API">Services: Social API</option>
- <option value="Services: UP">Services: UP</option>
- <option value="Services: WebRTC">Services: WebRTC</option>
+ <option value="Labs/Research/H3">Labs/Research/H3</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 required">Release Date:</span>
- <span class="field_data">
- <div class="field_description">What is your overall key release / launch date / go live date?</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>
+ <br>
+ <input type="text" name="key_initiative_other" id="key_initiative_other" size="60" style="display:none;">
</span>
</div>
<div id="mozilla_data_row" class="field_row">
- <span class="field_label required">Mozilla Data:</span>
+ <span class="field_label required">Data Access</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>
+ <div class="field_description">
+ Will the vendor or the vendor's systems access, interact with, or
+ store customer, contributor, user, or employee data? Examples of such
+ data include 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="Don't Know">Don't Know</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
+ <div id="mozilla_data_explain_row" style="display:none;">
+ <div class="field_description required">
+ If yes, please explain
+ </div>
+ <textarea name="mozilla_data_explain" id="mozilla_data_explain" rows="10" cols="80"></textarea>
+ </div>
</span>
</div>
- <div id="mozilla_related_row" class="field_row">
- <span class="field_label">Mozilla Related:</span>
+ <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 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">
+ <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="&lt; $25,000 PO Needed">&lt; $25,000 PO Needed</option>
+ <option value="&lt; $25,000 No PO Needed">&lt; $25,000 No PO Needed</option>
+ <option value="&gt; $25,000">&gt; $25,000</option>
+ </select>
</span>
</div>
- <div id="separate_party_row" class="field_row">
- <span class="field_label required">Separate Party:</span>
+ <div id="timeframe_row" class="field_row">
+ <span class="field_label required">Time Frame For Completion:</span>
<span class="field_data">
- <div class="field_description">Hardware Purchases,
- Vendor agreements, NDAs, Contracts etc</div>
- <select name="separate_party" id="separate_party">
+ <div class="field_description">What is the desired time frame to have this completed.</div>
+ <select name="timeframe" id="timeframe">
<option value="">Select One</option>
- <option value="Yes">Yes</option>
- <option value="No">No</option>
+ <option value="2 days">2 days</option>
+ <option value="a week">a week</option>
+ <option value="2-4 weeks">2-4 weeks</option>
+ <option value="will take a while but please start soon">
+ will take a while but please start soon</option>
+ <option value="no rush" selected>no rush</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="Hardware Purchase">Hardware Purchase</option>
- <option value="Vendor/Services">Vendor/Services</option>
- <option value="Firefox Distribution/Bundling">Firefox Distribution/Bundling</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>
+ <div id="contract_priority_row" class="field_row">
+ <span class="field_label required">Priority:</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">
+ <div class="field_description">Priority to your team</div>
+ <select name="contract_priority" id="contract_priority">
<option value="">Select One</option>
- <option value="Yes">Yes</option>
- <option value="No">No</option>
+ <option value="high">High</option>
+ <option value="medium">Medium</option>
+ <option value="low">Low</option>
</select>
</span>
</div>
- <div id="sec_review_date_row" class="field_row">
- <span class="field_label">Review Due Date:</span>
+ <div id="internal_org_row" class="field_row">
+ <span class="field_label required">Internal Organization:</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>
+ <select id="internal_org" name="internal_org">
+ <option value="">Select One</option>
+ <option value="Firefox">Firefox</option>
+ <option value="Connected Devices">Connected Devices</option>
+ <option value="Emerging Technologies">Emerging Technologies</option>
+ <option value="Innovation">Innovation</option>
+ <option value="Marketing">Marketing</option>
+ <option value="BD/Legal/Policy">BD/Legal/Policy</option>
+ <option value="Finance &amp; Accounting">Finance &amp; Accounting</option>
+ <option value="WPR">WPR</option>
+ <option value="IT">IT</option>
+ <option value="People">People</option>
+ <option value="Internal Comms">Internal Comms</option>
+ <option value="Metrics">Metrics</option>
+ <option value="Other">Other</option>
+ </select>
</span>
</div>
- <div id="sec_review_invitees_row" class="field_row">
- <span class="field_label">Review Invitees:</span>
+ <div id="total_cost_row" class="field_row" style="display:none;">
+ <span class="field_label required">Total Cost:</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">
+ <div class="field_description">
+ Please enter the total cost if a one time payment or the total for the entire
+ contract term if monthly or annual payments
+ </div>
+ <input type="text" name="total_cost" id="total_cost" size="60">
</span>
</div>
- <div id="sec_review_extra_row" class="field_row">
- <span class="field_label">Extra Information:</span>
+ <div id="attachment_row" class="field_row">
+ <span class="field_label">Attachment:</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 class="field_description">
+ Upload any supporting document as draft SOW, quote, order form, etc.
+ </div>
+ <input type="file" id="attachment" name="data" size="50"><br>
+ <input type="hidden" name="contenttypemethod" value="autodetect">
+ <div class="field_description">Description</div>
+ <input type="text" name="description" id="description" size="30">
</div>
</div>
- <div id="data_compliance_questions" class="bz_default_hidden">
- <div class="header">Data Compliance</div>
-
- <div id="data_comp_request_type_row" class="field_row">
- <span class="field_label required">Type of request</span>
- <span class="field_data">
- <select id="data_comp_request_type" name="data_comp_request_type">
- <option value="">-- Select --</option>
- <option value="General">General</option>
- <option value="Data Compliance">Data Compliance</option>
- <option value="Vendor Review">Vendor Review</option>
- <option value="Privacy Policy">Privacy Policy</option>
- <option value="Other">Other</option>
- </select>
- </span>
- </div>
+ <div id="independent_contractor_questions" style="display:none">
+ <div class="header">Independent Contractor Questions</div>
- <div class="data_comp_area_row">
- <span class="field_label required">Area</span>
+ <div id="independent_contractor_prev_work_row" class="field_row">
+ <span class="field_label required">Previous Work:</span>
<span class="field_data">
- <select id="data_comp_area" name="data_comp_area">
- <option value="">-- Select --</option>
- <option value="Firefox">Firefox</option>
- <option value="Cloud Services">Cloud Services</option>
- <option value="FxOS">FxOS</option>
- <option value="Foundation">Foundation</option>
- <option value="Engagement">Engagement</option>
- <option value="IT">IT</option>
- <option value="Content Services">Content Services</option>
- <option value="Platform">Platform</option>
- <option value="Other">Other</option>
+ <div class="field_description">Is this someone we've worked with before?</div>
+ <select name="independent_contractor_prev_work" id="independent_contractor_prev_work">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
</select>
- </span>
- </div>
-
- <div id="data_comp_description_row">
- <span class="field_label required">Description</span>
- <span class="field_data">
- <div class="field_description">
- Describe the data compliance issue: If your request involves changes
- or additional data collection, please describe that collection,
- including specific fields, where the data will be stored, how long it
- will be stored, and who will have access to the data.
+ <div id="independent_contractor_prev_work_bug_row" style="display:none;">
+ <div class="field_description required">
+ If yes, enter the [% terms.bug %] number for the previous work or note that this is a former employee
+ </div>
+ <input type="text" name="independent_contractor_prev_work_bug" id="independent_contractor_prev_work_bug" size="30">
</div>
- <textarea name="data_comp_desc" id="data_comp_desc" rows="10" cols="60"
- class="wide"></textarea>
</span>
</div>
- <div id="data_comp_urgency_row">
- <span class="field_label required">Urgency</span>
+ <div id="independent_contractor_incorporated_row" class="field_row">
+ <span class="field_label required">Incorporated:</span>
<span class="field_data">
- <select id="data_comp_urgency" name="data_comp_urgency">
- <option value="">-- Select --</option>
- <option value="blocker">blocker</option>
- <option value="critical">critical</option>
- <option value="major">major</option>
- <option value="normal">normal</option>
- <option value="minor">minor</option>
- <option value="trivial">trivial</option>
- <option value="enhancement">enhancement</option>
+ <div class="field_description">Has this person incorporated (sole proprietorship or similar form)?</div>
+ <select name="independent_contractor_incorporated" id="independent_contractor_incorporated">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
</select>
</span>
</div>
- <div id="data_comp_handling_change_row">
- <span class="field_label required">Collection/Handling Change</span>
+ <div id="independent_contractor_staff_agency_row" class="field_row">
+ <span class="field_label required">Staffing Agency:</span>
<span class="field_data">
- <div class="field_description">
- Does this request involve a change in data collection or handling?
- </div>
- <select id="data_comp_handling_change" name="data_comp_handling_change">
- <option value="">-- Select --</option>
+ <div class="field_description">Will the person be engaged through a staffing agency?</div>
+ <select name="independent_contractor_staff_agency" id="independent_contractor_staff_agency">
+ <option value="">Select One</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
</span>
</div>
- <div id="data_comp_practice_change_row">
- <span class="field_label required">Practice Change</span>
+ <div id="independent_contractor_other_clients_row" class="field_row">
+ <span class="field_label required">Other Clients:</span>
<span class="field_data">
- <div class="field_description">
- Does this request involve a change in to the business unit's data practices?
- </div>
- <select id="data_comp_practice_change" name="data_comp_practice_change">
- <option value="">-- Select --</option>
+ <div class="field_description">Does the person have other clients?</div>
+ <select name="independent_contractor_other_clients" id="independent_contractor_other_clients">
+ <option value="">Select One</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
</span>
</div>
- <div id="data_comp_other_row">
- <span class="field_label">Other</span>
+ <div id="independent_contractor_dupe_services_row" class="field_row">
+ <span class="field_label required">Duplicate Services:</span>
<span class="field_data">
- <div class="field_description">
- Please include any additional information, including links to relevant
- material, details regarding user benefit, etc.
+ <div class="field_description">Does the person provide services similar to a paid Mozilla employee?</div>
+ <select name="independent_contractor_dupe_services" id="independent_contractor_dupe_services">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ <div id="independent_contractor_dupe_services_temp_row" style="display:none;">
+ <div class="field_description required">
+ If yes, is the person primarily being engaged due to a temporary increase in workload or as backfill for an employee on leave?
+ </div>
+ <select name="independent_contractor_dupe_services_temp" id="independent_contractor_dupe_services_temp">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
</div>
- <textarea name="data_comp_other" id="data_comp_other" rows="10" cols="60"
- class="wide"></textarea>
</span>
</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>
+ <div id="independent_contractor_self_manage_row" class="field_row">
+ <span class="field_label required"a>Self Managed:</span>
<span class="field_data">
- <div class="field_description">Priority to your team</div>
- <select name="legal_priority" id="legal_priority">
+ <div class="field_description">Will the person be managing his or her own time?</div>
+ <select name="independent_contractor_self_manage" id="independent_contractor_self_manage">
<option value="">Select One</option>
- <option value="high">High</option>
- <option value="medium">Medium</option>
- <option value="low">Low</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
</select>
</span>
</div>
- <div id="legal_timeframe_row" class="field_row">
- <span class="field_label required">Time Frame For Completion<br>of Legal Portion?:</span>
+- <div id="independent_contractor_own_equipment_row" class="field_row">
+ <span class="field_label required">Own Equipment:</span>
<span class="field_data">
- <div class="field_description">What is the desired time frame to have the legal component/involvement completed.</div>
- <select name="legal_timeframe" id="legal_timeframe">
- <option value="2 days">2 days</option>
- <option value="a week">a week</option>
- <option value="2-4 weeks">2-4 weeks</option>
- <option value="will take a while but please start soon">
- will take a while but please start soon</option>
- <option value="no rush" selected>no rush</option>
+ <div class="field_description">Will the person be using his or her own equipment?</div>
+ <select name="independent_contractor_own_equipment" id="independent_contractor_own_equipment">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
</select>
</span>
</div>
- <div id="legal_cc_row" class="field_row">
- <span class="field_label">Cc:</span>
+ <div id="independent_contractor_mozilla_facility_row" class="field_row">
+ <span class="field_label required">Mozilla Facility:</span>
<span class="field_data">
- [% INCLUDE global/userselect.html.tmpl
- id => "legal_cc"
- name => "legal_cc"
- value => ""
- size => 60
- classes => ["bz_userfield"]
- multiple => 5
- %]
+ <div class="field_description">Will the person be regularly working at a Mozilla facility?</div>
+ <select name="independent_contractor_mozilla_facility" id="independent_contractor_mozilla_facility">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
</span>
</div>
- <div id="legal_other_party_row" class="field_row">
- <span class="field_label">Other Party:</span>
+ <div id="independent_contractor_supervising_row" class="field_row">
+ <span class="field_label required">Supervise Mozilla Employees:</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">
+ <div class="field_description">Will the person be supervising Mozilla employees?</div>
+ <select name="independent_contractor_supervising" id="independent_contractor_supervising">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
</span>
</div>
+ </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="contract_specific_questions">
+ <div class="header">Contract Specific Questions</div>
- <div id="legal_sow_questions" class="bz_default_hidden">
+ <div id="sow_details" style="display:none;">
<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">
+ <div id="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>
+ <textarea name="sow_vendor_address" id="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>
+ <div id="sow_vendor_email_row" class="field_row">
+ <span class="field_label required">Vendor Email for Legal Notices:</span>
<span class="field_data">
- <input type="text" name="legal_sow_vendor_email" id="legal_sow_vendor_email" size="60">
+ <input type="text" name="sow_vendor_email" id="sow_vendor_email" size="60">
</span>
</div>
- <div id="legal_sow_vendor_mozcontact_row" class="field_row">
+ <div id="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 => ""
+ id => "sow_vendor_mozcontact"
+ name => "sow_vendor_mozcontact"
size => 60
classes => ["bz_userfield"]
- multiple => 5
%]
</span>
</div>
- <div id="legal_sow_vendor_contact_row" class="field_row">
+ <div id="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">
+ <input type="text" name="sow_vendor_contact" id="sow_vendor_contact" size="60">
</span>
</div>
- <div id="legal_sow_vendor_services_row" class="field_row">
+ <div id="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>
+ <textarea name="sow_vendor_services" id="sow_vendor_services" rows="10" cols="80"></textarea>
+ </span>
+ </div>
+
+ <div id="sow_vendor_mozilla_systems_row" class="field_row">
+ <span class="field_label required">Mozilla Systems:</span>
+ <span class="field_data">
+ <div class="field_description">
+ Will vendor require access to Mozilla systems (e.g. workday, email, google docs, servers)?
+ </div>
+ <select name="sow_vendor_mozilla_systems" id="sow_vendor_mozilla_systems">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ <div id="sow_vendor_mozilla_systems_explain_row" style="display:none;">
+ <div class="field_description required">
+ If yes, please explain
+ </div>
+ <textarea name="sow_vendor_mozilla_systems_explain" id="sow_vendor_mozilla_systems_explain" rows="10" cols="80"></textarea>
+ </div>
+ </span>
+ </div>
+
+ <div id="sow_vendor_onsite_row" class="field_row">
+ <span class="field_label required">Vendor Onsite:</span>
+ <span class="field_data">
+ <div class="field_description">
+ Will vendor be physically onsite at a Mozilla office?
+ </div>
+ <select name="sow_vendor_onsite" id="sow_vendor_onsite">
+ <option value="">Select One</option>
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </select>
+ <div id="sow_vendor_onsite_where_row" style="display:none;">
+ <div class="field_description required">
+ If yes, where and when?
+ </div>
+ <textarea name="sow_vendor_onsite_where" id="sow_vendor_onsite_where" rows="10" cols="80"></textarea>
+ </div>
</span>
</div>
- <div id="legal_sow_vendor_deliverables_row" class="field_row">
+ <div id="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>
+ <textarea name="sow_vendor_deliverables" id="sow_vendor_deliverables" rows="10" cols="80"></textarea>
</span>
</div>
- <div id="legal_sow_start_date_row" class="field_row">
+ <div id="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>
+ <input class="date-field" name="sow_start_date" id="sow_start_date">
+ <img class="date-field-img" id="sow_start_date-img"
+ src="extensions/BugModal/web/calendar.png" width="16" height="16">
</span>
</div>
- <div id="legal_sow_end_date_row" class="field_row">
+ <div id="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>
+ <input class="date-field" name="sow_end_date" id="sow_end_date">
+ <img class="date-field-img" id="sow_end_date-img"
+ src="extensions/BugModal/web/calendar.png" width="16" height="16">
</span>
</div>
-
- <div id="legal_sow_vendor_payment_row" class="field_row">
+
+ <div id="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">
+ <input type="text" name="sow_vendor_payment" id="sow_vendor_payment" size="60">
</span>
</div>
- <div id="legal_sow_vendor_payment_basis_row" class="field_row">
+ <div id="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">
+ <div class="field_description">hourly, flat fee, per deliverable, per milestone, etc.</div>
+ <input type="text" name="sow_vendor_payment_basis" id="sow_vendor_payment_basis" size="60">
+ </span>
+ </div>
+
+ <div id="sow_vendor_cap_expenses_row" class="field_row">
+ <span class="field_label required">Cap on reimbursable expenses, if any:</span>
+ <span class="field_data">
+ <input type="text" name="sow_vendor_cap_expenses" id="sow_vendor_cap_expenses" size="60">
</span>
</div>
- <div id="legal_sow_vendor_hours_row" class="field_row">
- <span class="field_label">Average/Max Hours:</span>
+ <div id="sow_vendor_hours_row" class="field_row">
+ <span class="field_label">Max Hours/Week (and average if different):</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">
+ <div class="field_description">If paid hourly</div>
+ <input type="text" name="sow_vendor_hours" id="sow_vendor_hours" size="60">
</span>
</div>
- <div id="legal_sow_vendor_payment_schedule_row" class="field_row">
+ <div id="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,
+ <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">
+ <input type="text" name="sow_vendor_payment_schedule" id="sow_vendor_payment_schedule" size="60">
</span>
</div>
- <div id="legal_sow_vendor_total_max_row" class="field_row">
+ <div id="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">
+ <input type="text" name="sow_vendor_total_max" id="sow_vendor_total_max" size="60">
</span>
</div>
- <div id="legal_sow_vendor_special_terms_row" class="field_row">
+ <div id="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>
+ <textarea name="sow_vendor_special_terms" id="sow_vendor_special_terms" rows="10" cols="80"></textarea>
</span>
</div>
+ </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 id="vendor_services_where_row" class="field_row">
+ <span class="field_label required">Where will the services be provided?:</span>
+ <span class="field_data">
+ <input type="text" name="vendor_services_where" id="vendor_services_where" size="60">
+ </span>
</div>
-
- <div id="legal_vendor_services_where_row" class="field_row bz_default_hidden">
- <span class="field_label required">Vendor Services Location:</span>
+ </div>
+
+ <div id="sec_review_questions" style="display:none">
+ <div class="header">Vendor Security Review</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">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">
+ <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">
+ Please add any additional information related to data handling by the Vendor you think the security team should know.
+ </div>
+ <textarea name="sec_review_extra" id="sec_review_extra" rows="10" cols="80"></textarea>
</span>
</div>
</div>
- <div id="finance_questions" class="bz_default_hidden">
+ <div id="finance_questions" style="display:none">
<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">
@@ -710,18 +611,6 @@
</span>
</div>
- <div id="finance_purchase_urgency_row" class="field_row">
- <span class="field_label required">When do the items need<br>to be purchased by?:</span>
- <span class="field_data">
- <select name="finance_purchase_urgency" id="finance_purchase_urgency">
- <option value="3 to 5 days">3 to 5 days</option>
- <option value="7 to 10 days">7 to 10 days</option>
- <option value="two weeks">two weeks</option>
- <option value="no rush" selected>no rush</option>
- </select>
- </span>
- </div>
-
<div id="finance_shipment_address_row" class="field_row">
<span class="field_label">What is the shipment address<br>(if applicable)?:</span>
<span class="field_data">
@@ -729,21 +618,14 @@
<textarea name="finance_shipment_address" id="finance_shipment_address" rows="10" cols="80"></textarea>
</span>
</div>
-
- <div id="finance_purchase_cost_row" class="field_row">
- <span class="field_label required">Total Cost:</span>
- <span class="field_data">
- <div class="field_description">Please include currency type (e.g. USD, EUR)</div>
- <input type="text" name="finance_purchase_cost" id="finance_purchase_cost" size="60">
- </span>
- </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.
+ Thanks for contacting us. Legal, Finance, and Security [% terms.bugs %] will be opened
+ so those teams can work with you on this request.
</p>
[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/MozProjectReview/template/en/default/bug/create/initial-questions-comment.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/initial-questions-comment.txt.tmpl
new file mode 100644
index 000000000..9b880af06
--- /dev/null
+++ b/extensions/MozProjectReview/template/en/default/bug/create/initial-questions-comment.txt.tmpl
@@ -0,0 +1,42 @@
+[%# 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.
+ #%]
+>> Initial Questions
+
+Description:
+[%+ cgi.param('comment') %]
+
+Key Initiative:
+[%+ cgi.param('key_initiative') == 'Other' ? cgi.param('key_initiative_other') : cgi.param('key_initiative') %]
+
+Mozilla Data:
+[%+ cgi.param('mozilla_data') %]
+
+[% IF cgi.param('mozilla_data') == 'Yes' %]
+Mozilla Data Explanation:
+[%+ cgi.param('mozilla_data_explain') %]
+[% END %]
+
+Type of Contract:
+[%+ cgi.param('contract_type') %]
+
+Vendor Cost:
+[%+ cgi.param('vendor_cost') %]
+
+Time Frame For Completion:
+[%+ cgi.param('timeframe') %]
+
+Priority:
+[%+ cgi.param('contract_priority') %]
+
+Internal Organization:
+[%+ cgi.param('internal_org') %]
+
+[% IF cgi.param('total_cost') %]
+Total Cost:
+[%+ cgi.param('total_cost') %]
+[% END %]
diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js
index e2a198e2a..3d1caf528 100644
--- a/extensions/MozProjectReview/web/js/moz_project_review.js
+++ b/extensions/MozProjectReview/web/js/moz_project_review.js
@@ -6,230 +6,229 @@
* defined by the Mozilla Public License, v. 2.0.
*/
-var Dom = YAHOO.util.Dom;
-var Event = YAHOO.util.Event;
-
-var MPR = {
- required_fields: {
+$(function() {
+ 'use strict';
+ var 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",
- "key_initiative": "Please select a value for key initiative in the initial questions section",
- "release_date": "Please enter a value for release date 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",
- "separate_party": "Please select a value for separate party in the initial questions section"
+ "comment": "Please enter a value for description in the initial questions section.",
+ "key_initiative": "Please select a value for key initiative in the initial questions section.",
+ "contract_type": "Please select a value for contract type in the initial questions section.",
+ "mozilla_data": "Please select a value for mozilla data in the initial questions section.",
+ "vendor_cost": "Please select a value for vendor cost in the initial questions section.",
+ "timeframe": "Please select a value for timeframe in the initial questions section.",
+ "contract_priority": "Please select a value for priority in the initial questions section.",
+ "internal_org": "Please select a value for the internal organization 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"
+ "key_initiative_other": {
+ "key_initiative_other": "Please enter a value for other key initiative in the initial questions section."
+ },
+ "mozilla_data_explain_row": {
+ "mozilla_data_explain": "Please enter a value for mozilla data access explanation in the initial questions section."
+ },
+ "contract_type_other": {
+ "contract_type_other": "Please enter a value for other contract type in the initial questions section."
+ },
+ "contract_specific_questions": {
+ "other_party": "Please enter a value for vendor name in the contract specific questions.",
+ "vendor_services_where": "Please enter a value for the where the services will be provided in the contract specific questions.",
+ },
+ "independent_contractor_questions": {
+ "independent_contractor_prev_work": "Please select a value for previous work in the independent contractor section.",
+ "independent_contractor_incorporated": "Please select a value for incorporated in the independent contractor section.",
+ "independent_contractor_staff_agency": "Please select a value for staffing agency in the independent contractor section.",
+ "independent_contractor_other_clients": "Please select a value for other clients in the independent contractor section.",
+ "independent_contractor_dupe_services": "Please select a value for in the independent contractor section.",
+ "independent_contractor_self_manage": "Please select a value for self management of time in the independent contractor section.",
+ "independent_contractor_own_equipment": "Please select a value for use of contractors own equipment in the independent contractor section.",
+ "independent_contractor_mozilla_facility": "Please select a value for use of Mozilla facility in the independent contractor section.",
+ "independent_contractor_supervising": "Please select a value for contractor supervising Mozilla employees in the independent contractor section.",
+ },
+ "independent_contractor_prev_work_bug_row": {
+ "independent_contractor_prev_work_bug": "Please enter a value for previous work bug id in the independent contractor section."
+ },
+ "independent_contractor_dupe_services_temp_row": {
+ "independent_contractor_dupe_services_temp": "Please select a value for temporarily need duplicate services in the independent contractor section."
+ },
+ "sow_details": {
+ "sow_vendor_address": "Please enter a value for SOW vendor address.",
+ "sow_vendor_email": "Please enter a value for SOW vendor email for notices.",
+ "sow_vendor_contact": "Please enter a value for SOW vendor contact and email address.",
+ "sow_vendor_services": "Please enter a value for SOW vendor services description.",
+ "sow_vendor_deliverables": "Please enter a value for SOW vendor deliverables description.",
+ "sow_start_date": "Please enter a value for SOW vendor start date.",
+ "sow_end_date": "Please enter a value for SOW vendor end date.",
+ "sow_vendor_payment": "Please enter a value for SOW vendor payment amount.",
+ "sow_vendor_payment_basis": "Please enter a value for SOW vendor payment basis.",
+ "sow_vendor_cap_expenses": "Please enter a value for SOW cap on reimbursable expenses.",
+ "sow_vendor_payment_schedule": "Please enter a value for SOW vendor payment schedule.",
+ "sow_vendor_total_max": "Please enter a value for SOW vendor maximum total to be paid.",
},
- "legal_questions": {
- "legal_priority": "Please select a value for priority in the legal questions section",
- "legal_timeframe": "Please select a value for timeframe in the legal questions section",
- "legal_help_from_legal": "Please describe the help needed from the Legal department"
+ "sow_vendor_mozilla_systems_explain_row": {
+ "sow_vendor_mozilla_systems_explain": "Please enter a value for SOW vendor explanation for use of mozilla systems."
},
- "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"
+ "sow_vendor_onsite_where_row": {
+ "sow_vendor_onsite_where": "Please enter a value for SOW vendor onsite where and when."
},
- "data_compliance_questions": {
- "data_comp_request_type": "Please select a value for the data compliance request type",
- "data_comp_area": "Please select a value for the data compliance area",
- "data_comp_desc": "Please enter a value for the data compliance description",
- "data_comp_handling_change": "Please select a value for the data compliance handling change",
- "data_comp_practice_change": "Please select a value for the data compliance practice change"
+ "finance_questions": {
+ "finance_purchase_inbudget": "Please enter a value for in budget 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.",
+ },
+ "total_cost_row": {
+ "total_cost": "Please enter a value for total cost"
}
- },
+ };
- select_inputs: [
+ var select_inputs = [
+ 'contract_type',
+ 'independent_contractor_prev_work',
+ 'independent_contractor_dupe_services',
'key_initiative',
- 'project_status',
'mozilla_data',
- 'separate_party',
- 'relationship_type',
- 'data_access',
'vendor_cost',
- 'po_needed',
- 'sec_affects_products',
- 'legal_priority',
- 'legal_sow_vendor_product_line',
- 'legal_vendor_services_where',
- 'finance_purchase_urgency'
- ],
-
- init: function () {
+ 'sow_vendor_mozilla_systems',
+ 'sow_vendor_onsite'
+ ];
+
+ function init() {
// 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);
+ for (var i = 0, l = select_inputs.length; i < l; i++) {
+ $('#' + select_inputs[i]).change(updateSections);
}
- MPR.updateSections();
- },
+ updateSections();
+ $('#mozProjectForm').submit(validateAndSubmit);
+ }
- fieldValue: function (id) {
- var field = Dom.get(id);
- if (!field) return '';
- if (field.type == 'text'
- || field.type == 'textarea')
- {
- return field.value;
- }
- return field.options[field.selectedIndex].value;
- },
-
- 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,
- 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,
- data_compliance_questions: false,
- };
-
- if (MPR.fieldValue('key_initiative') == 'Other') {
- page_sections.key_initiative_other_row = true;
- }
-
- if (MPR.fieldValue('mozilla_data') == 'Yes') {
- page_sections.legal_questions = true;
- page_sections.data_compliance_questions = true;
- page_sections.sec_review_questions = true;
- }
-
- if (MPR.fieldValue('separate_party') == 'Yes') {
- page_sections.initial_separate_party_questions = true;
-
- if (MPR.fieldValue('relationship_type')
- && MPR.fieldValue('relationship_type') != 'Hardware Purchase')
- {
- page_sections.legal_questions = true;
- }
+ function updateSections(e) {
+ if ($('#key_initiative').val() == 'Other') {
+ $('#key_initiative_other').show();
+ if ($(e.target).attr('id') == 'key_initiative') $('#key_initiative_other').focus();
+ } else {
+ $('#key_initiative_other').hide();
+ }
- if (MPR.fieldValue('relationship_type') == 'Vendor/Services'
- || MPR.fieldValue('relationship_type') == 'Firefox Distribution/Bundling')
- {
- page_sections.legal_sow_questions = true;
- page_sections.legal_vendor_services_where_row = true;
- }
+ if ($('#vendor_cost').val() == '< $25,000 PO Needed'
+ || $('#vendor_cost').val() == '> $25,000')
+ {
+ $('#finance_questions').show();
+ } else {
+ $('#finance_questions').hide();
+ }
- if (MPR.fieldValue('relationship_type') == 'Hardware Purchase') {
- page_sections.finance_questions = true;
- }
+ var do_sec_review = [
+ 'Engaging a new vendor company',
+ 'Adding a new SOW with a vendor',
+ 'Extending an SOW or renewing a contract',
+ 'Purchasing software',
+ 'Signing up for an online service',
+ 'Other'
+ ];
+ var contract_type = $('#contract_type').val();
+ if ((contract_type && $.inArray(contract_type, do_sec_review) >= 0)
+ || $('#mozilla_data').val() == 'Yes')
+ {
+ $('#sec_review_questions').show();
- if (MPR.fieldValue('data_access') == 'Yes') {
- page_sections.legal_questions = true;
- page_sections.sec_review_questions = true;
- page_sections.data_compliance_questions = true;
- }
+ } else {
+ $('#sec_review_questions').hide();
+ }
- if (MPR.fieldValue('vendor_cost') == '<= $25,000') {
- page_sections.po_needed_row = true;
- }
+ if ($('#mozilla_data').val() == 'Yes') {
+ $('#mozilla_data_explain_row').show();
+ if ($(e.target).attr('id') == 'mozilla_data') $('#mozilla_data_explain').focus();
- if (MPR.fieldValue('po_needed') == 'Yes') {
- page_sections.finance_questions = true;
- }
+ } else {
+ $('#mozilla_data_explain_row').hide();
+ }
- if (MPR.fieldValue('vendor_cost') == '> $25,000') {
- page_sections.finance_questions = true;
- }
+ if (contract_type == 'Other') {
+ $('#contract_type_other').show();
+ if ($(e.target).attr('id') == 'contract_type') $('#contract_type_other').focus();
+ }
+ else {
+ $('#contract_type_other').hide();
}
- if (MPR.fieldValue('legal_vendor_services_where') == 'A single country') {
- page_sections.legal_vendor_single_country = true;
+ if (contract_type == 'Engaging a new vendor company'
+ || contract_type == 'Engaging an individual (independent contractor, temp agency worker, incorporated)'
+ || contract_type == 'Adding a new SOW with a vendor')
+ {
+ $('#sow_details').show();
+ }
+ else {
+ $('#sow_details').hide();
}
- // Toggle the individual page_sections
- for (section in page_sections) {
- MPR.toggleShowSection(section, page_sections[section]);
+ if (contract_type == "Extending a SOW or renewing a contract"
+ || contract_type == "Purchasing software"
+ || contract_type == "Purchasing hardware"
+ || contract_type == "Signing up for an online service"
+ || contract_type == "Other")
+ {
+ $('#total_cost_row').show();
+ }
+ else {
+ $('#total_cost_row').hide();
}
- },
- toggleShowSection: function (section, show) {
- if (show) {
- Dom.removeClass(section, 'bz_default_hidden');
+ if (contract_type == 'Engaging an individual (independent contractor, temp agency worker, incorporated)') {
+ $('#independent_contractor_questions').show();
}
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";
- }
- }
- }
+ $('#independent_contractor_questions').hide();
}
- // Special case checks
- if (MPR.fieldValue('relationship_type') == 'Vendor/Services'
- && MPR.fieldValue('legal_vendor_services_where') == '')
- {
- alert_text += "Please select a value for vendor services where\n";
+ if ($('#independent_contractor_prev_work').val() == 'Yes') {
+ $('#independent_contractor_prev_work_bug_row').show();
+ if ($(e.target).attr('id') == 'independent_contractor_prev_work')
+ $('#independent_contractor_prev_work_bug').focus();
+ }
+ else {
+ $('#independent_contractor_prev_work_bug_row').hide();
}
- if (MPR.fieldValue('relationship_type') == 'Vendor/Services'
- && MPR.fieldValue('legal_vendor_services_where') == 'A single country'
- && MPR.fieldValue('legal_vendor_single_country') == '')
- {
- alert_text += "Please select a value for vendor services where single country\n";
+ if ($('#independent_contractor_dupe_services').val() == 'Yes') {
+ $('#independent_contractor_dupe_services_temp_row').show();
+ if ($(e.target).attr('id') == 'independent_contractor_dupe_services')
+ $('#independent_contractor_dupe_services_temp').focus();
+ }
+ else {
+ $('#independent_contractor_dupe_services_temp_row').hide();
}
- if (MPR.fieldValue('key_initiative') == 'Other') {
- if (!MPR.isFilledOut('key_initiative_other')) {
- alert_text += "Please enter a value for key initiative in the initial questions section\n";
- }
+ if ($('#sow_vendor_mozilla_systems').val() == 'Yes') {
+ $('#sow_vendor_mozilla_systems_explain_row').show();
+ if ($(e.target).attr('id') == 'sow_vendor_mozilla_systems')
+ $('#sow_vendor_mozilla_systems_explain').focus();
+ }
+ else {
+ $('#sow_vendor_mozilla_systems_explain_row').hide();
}
- if (MPR.fieldValue('separate_party') == '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 ($('#sow_vendor_onsite').val() == 'Yes') {
+ $('#sow_vendor_onsite_where_row').show();
+ if ($(e.target).attr('id') == 'sow_vendor_onsite')
+ $('#sow_vendor_onsite_where').focus();
+ }
+ else {
+ $('#sow_vendor_onsite_where_row').hide();
}
+ }
- if (MPR.fieldValue('vendor_cost') == '<= $25,000'
- && MPR.fieldValue('po_needed') == '')
- {
- alert_text += "Please select whether a PO is needed or not\n";
+ function validateAndSubmit(e) {
+ var alert_text = '',
+ section = '',
+ field = '';
+ for (section in required_fields) {
+ if ($('#' + section).is(':visible')) {
+ for (field in required_fields[section]) {
+ if (!isFilledOut(field)) {
+ alert_text += required_fields[section][field] + "\n";
+ }
+ }
+ }
}
if (alert_text) {
@@ -237,16 +236,53 @@ var MPR = {
return false;
}
+ $('#short_desc').val('Contract for ' +
+ $('#contract_type').val() +
+ ' with ' +
+ $('#other_party').val());
+
+ var component_map = {
+ "Engaging a new vendor company,": "Vendor/Services",
+ "Adding a new SOW with a vendor": "Vendor/Services",
+ "Extending a SOW or renewing a contract": "Vendor/Services",
+ "Purchasing hardware": "Vendor/Services",
+ "Other": "Vendor/Services",
+ "Engaging an individual (independent contractor, temp agency worker, incorporated)": "Independent Contractor Agreement",
+ "An agreement with a partner": "Firefox Distribution or Other Partner Agreement",
+ "Purchasing software": "License Review",
+ "Signing up for an online service" : "License Review"
+ }
+
+ var contract_type = $('#contract_type').val();
+ if (component_map[contract_type]) {
+ $('#component').val(component_map[contract_type]);
+ }
+
return true;
- },
+ }
//Takes a DOM element id and makes sure that it is filled out
- isFilledOut: function (elem_id) {
- var str = MPR.fieldValue(elem_id);
- return str.length > 0 ? true : false;
+ function isFilledOut(id) {
+ if (!id) return false;
+ var str = $('#' + id).val();
+ if (!str || str.length == 0) return false;
+ return true;
}
-};
-Event.onDOMReady(function () {
- MPR.init();
+ // date pickers
+ $('.date-field').datetimepicker({
+ format: 'Y-m-d',
+ datepicker: true,
+ timepicker: false,
+ scrollInput: false,
+ lazyInit: false,
+ closeOnDateSelect: true
+ });
+ $('.date-field-img')
+ .click(function(event) {
+ var id = $(event.target).attr('id').replace(/-img$/, '');
+ $('#' + id).datetimepicker('show');
+ })
+
+ init();
});
diff --git a/extensions/MozProjectReview/web/style/moz_project_review.css b/extensions/MozProjectReview/web/style/moz_project_review.css
index cf1c3a8b8..fb6d73845 100644
--- a/extensions/MozProjectReview/web/style/moz_project_review.css
+++ b/extensions/MozProjectReview/web/style/moz_project_review.css
@@ -39,10 +39,10 @@
color: rgb(102, 100, 88);
}
-span.required:before {
+.required:before {
content: "* ";
}
-span.required:before, span.required_star {
+.required:before, .required_star {
color: red;
}