summaryrefslogtreecommitdiffstats
path: root/extensions/MozProjectReview/web/js
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 /extensions/MozProjectReview/web/js
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"
Diffstat (limited to 'extensions/MozProjectReview/web/js')
-rw-r--r--extensions/MozProjectReview/web/js/moz_project_review.js24
1 files changed, 23 insertions, 1 deletions
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');
+});