summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-12-14 01:30:10 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-12-14 01:30:10 +0100
commitc74561474c4cff83539420bde57306c1b9a384a7 (patch)
tree4ae10a8737c9b772574b9c893a7deb3b9e5a3fd1
parent51541b9d82089f1beb1e2dbe2c4bf42041d62759 (diff)
downloadbugzilla-c74561474c4cff83539420bde57306c1b9a384a7.tar.gz
bugzilla-c74561474c4cff83539420bde57306c1b9a384a7.tar.xz
Bug 820646 - Project Kickoff Form: New Legal Question to be Added
Bug 821183 - Project Kickoff Form: Legal and Finance Bugs Questions Not Filed Bug 820644 - Project Kickoff Form: Legal Questions Should be Displayed When "Yes" Selected for "Separate Party"
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl8
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl38
-rw-r--r--extensions/MozProjectReview/web/js/moz_project_review.js24
3 files changed, 64 insertions, 6 deletions
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
index 345557743..9f3f98328 100644
--- 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
@@ -18,5 +18,13 @@ Other Party: [% cgi.param('legal_other_party') %]
Business Objective: [% cgi.param('legal_business_objective') %]
URL: [% cgi.param('legal_url') %]
SOW Details: [% cgi.param('legal_sow_details') %]
+[% 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 %]
Description:
[%+ cgi.param('legal_description') %]
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 db06d0c24..df8966bbb 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
@@ -233,10 +233,15 @@
</div>
<select name="separate_party" id="separate_party"
onchange="MPR.toggleVisibleById(this,'Yes','initial_separate_party_questions');
- if (this.value == 'No')
+ if (this.value == 'No') {
Dom.addClass('finance_questions','bz_default_hidden');
- if (this.value == 'Yes')
- MPR.toggleVisibleById('relationship_type','Hardware Purchase','finance_questions');">
+ if (Dom.get('mozilla_data').value != 'Yes')
+ Dom.addClass('legal_questions', 'bz_default_hidden');
+ }
+ else {
+ Dom.removeClass('legal_questions', 'bz_default_hidden');
+ MPR.toggleVisibleById('relationship_type','Hardware Purchase','finance_questions');
+ }">
<option value="">Select One</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
@@ -250,8 +255,12 @@
<span class="field_data">
<div class="field_description">What type of relationship?</div>
<select name="relationship_type" id="relationship_type"
- onchange="MPR.toggleVisibleById(this,'Vendor/Services','legal_sow_details_row');
- MPR.toggleVisibleById(this,'Hardware Purchase','finance_questions');">
+ onchange="MPR.toggleVisibleById(this, 'Vendor/Services', 'legal_sow_details_row');
+ MPR.toggleVisibleById(this, 'Vendor/Services', 'legal_vendor_services_where_row');
+ MPR.toggleVisibleById(this, 'Hardware Purchase', 'finance_questions');
+ if (this.value == 'Hardware Purchase') Dom.addClass('legal_questions', 'bz_default_hidden');
+ else if (Dom.get('separate_party').value == 'Yes' || Dom.get('mozilla_data').value == 'Yes')
+ Dom.removeClass('legal_questions', 'bz_default_hidden');">
<option value="">Select One</option>
<option value="Vendor/Services">Vendor/Services</option>
<option value="Distribution/Bundling">Distribution/Bundling</option>
@@ -502,6 +511,25 @@
<textarea name="legal_sow_details" id="legal_sow_details" rows="10" cols="80"></textarea>
</span>
</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">
diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js
index 29e765ad2..028666fcc 100644
--- a/extensions/MozProjectReview/web/js/moz_project_review.js
+++ b/extensions/MozProjectReview/web/js/moz_project_review.js
@@ -10,6 +10,7 @@ YAHOO.namespace('MozProjectReview');
var MPR = YAHOO.MozProjectReview;
var Dom = YAHOO.util.Dom;
+var Event = YAHOO.util.Event;
MPR.required_fields = {
"initial_questions": {
@@ -49,7 +50,8 @@ MPR.toggleSpecialSections = function () {
Dom.removeClass('sec_review_questions', 'bz_default_hidden');
}
else {
- Dom.addClass('legal_questions', 'bz_default_hidden');
+ if (Dom.get('separate_party').value != 'Yes')
+ Dom.addClass('legal_questions', 'bz_default_hidden');
Dom.addClass('privacy_policy_project_questions', 'bz_default_hidden');
Dom.addClass('data_safety_questions', 'bz_default_hidden');
Dom.addClass('sec_review_questions', 'bz_default_hidden');
@@ -111,6 +113,19 @@ MPR.validateAndSubmit = function () {
}
}
+ 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";
@@ -156,3 +171,10 @@ MPR.isFilledOut = function (elem_id) {
var str = Dom.get(elem_id).value;
return str.length > 0 ? true : false;
}
+
+Event.addListener('legal_vendor_services_where', 'change', function(e) {
+ if (this.value == 'A single country')
+ Dom.removeClass('legal_vendor_single_country', 'bz_default_hidden');
+ else
+ Dom.addClass('legal_vendor_single_country', 'bz_default_hidden');
+});