From b061ce481380dfd01f85ea84ef700eb7589433e3 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 5 Dec 2012 00:20:54 +0800 Subject: Bug 817157: Project Kickoff Form: Change "Current Goal" to drop down list --- .../bug/create/comment-moz-project-review.txt.tmpl | 4 ++- .../bug/create/create-moz-project-review.html.tmpl | 31 +++++++++++++++++++--- .../MozProjectReview/web/js/moz_project_review.js | 8 ++++-- 3 files changed, 36 insertions(+), 7 deletions(-) (limited to 'extensions') 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 16bdcb568..66ab024fe 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 @@ -18,7 +18,9 @@ Description: Additional Information: [%+ cgi.param('additional') %] Urgency: [% cgi.param('urgency') %] -Current Goal: [% cgi.param('goal') %] +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') %] 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 2db1f225f..a84bbe743 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 @@ -104,11 +104,34 @@ -
- Current Goal: +
+ Key Initiative: -
Does it support a current Mozilla goal (if so, which one)?
- +
Which key initiative does this support?
+ +
+
+ +
+   + +
diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js index 36a8232bd..8aea8796b 100644 --- a/extensions/MozProjectReview/web/js/moz_project_review.js +++ b/extensions/MozProjectReview/web/js/moz_project_review.js @@ -16,6 +16,7 @@ MPR.required_fields = { "short_desc": "Please enter a value for project or feature name in the initial questions section", "cc": "Please enter a value for points of contact in the initial questions section", "urgency": "Please enter a value for urgency in the initial questions section", + "key_initiative": "Please select a value for key initiative in the initial questions section", "project_status": "Please select a value for project status in the initial questions section", "mozilla_data": "Please select a value for mozilla data in the initial questions section", "new_or_change": "Please select a value for new or change to existing project in the initial questions section", @@ -99,11 +100,9 @@ MPR.validateAndSubmit = function () { var alert_text = ''; var section = ''; for (section in MPR.required_fields) { - console.log("section: " + section); if (!Dom.hasClass(section, 'bz_default_hidden')) { var field = ''; for (field in MPR.required_fields[section]) { - console.log("field: " + field); if (!MPR.isFilledOut(field)) { alert_text += MPR.required_fields[section][field] + "\n"; } @@ -111,6 +110,11 @@ MPR.validateAndSubmit = function () { } } + if (Dom.get('key_initiative').value == 'Other') { + if (!MPR.isFilledOut('key_initiative_other')) + alert_text += "Please enter a value for key initiative in the initial questions section\n"; + } + if (Dom.get('separate_party').value == 'Yes') { if (!MPR.isFilledOut('relationship_type')) alert_text += "Please select a value for type of relationship\n"; if (!MPR.isFilledOut('data_access')) alert_text += "Please select a value for data access\n"; -- cgit v1.2.3-24-g4f1b