summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-12-04 17:20:54 +0100
committerByron Jones <bjones@mozilla.com>2012-12-04 17:20:54 +0100
commitb061ce481380dfd01f85ea84ef700eb7589433e3 (patch)
treee4d2129bca00e4177920b4072507552481334a50
parent658988096fae00807553645adc1e1976b2586471 (diff)
downloadbugzilla-b061ce481380dfd01f85ea84ef700eb7589433e3.tar.gz
bugzilla-b061ce481380dfd01f85ea84ef700eb7589433e3.tar.xz
Bug 817157: Project Kickoff Form: Change "Current Goal" to drop down list
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl4
-rw-r--r--extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl31
-rw-r--r--extensions/MozProjectReview/web/js/moz_project_review.js8
3 files changed, 36 insertions, 7 deletions
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 @@
</span>
</div>
- <div id="goal_row" class="field_row">
- <span class="field_label">Current Goal:</span>
+ <div id="key_initiative_row" class="field_row">
+ <span class="field_label required">Key Initiative:</span>
<span class="field_data">
- <div class="field_description">Does it support a current Mozilla goal (if so, which one)?</div>
- <input type="text" name="goal" id="goal" size="60">
+ <div class="field_description">Which key initiative does this support?</div>
+ <select name="key_initiative" id="key_initiative"
+ onchange="MPR.toggleVisibleById(this,'Other','key_initiative_other_row');">
+ <option value="">Select One</option>
+ <option value="Firefox Desktop">Firefox Desktop</option>
+ <option value="Firefox Mobile">Firefox Mobile</option>
+ <option value="Firefox OS">Firefox OS</option>
+ <option value="Firefox Platform">Firefox Platform</option>
+ <option value="Marketplace / Apps">Marketplace / Apps</option>
+ <option value="Services: Persona">Services: Persona</option>
+ <option value="Services: WebRTC">Services: WebRTC</option>
+ <option value="Services: UP">Services: UP</option>
+ <option value="Services: Social API">Services: Social API</option>
+ <option value="Labs / Research / H3">Labs / Research / H3</option>
+ <option value="Product Support">Product Support</option>
+ <option value="Corp Support">Corp Support</option>
+ <option value="Other">Other</option>
+ </select>
+ </span>
+ </div>
+
+ <div id="key_initiative_other_row" class="field_row bz_default_hidden">
+ <span class="field_label">&nbsp;</span>
+ <span class="field_data">
+ <input type="text" name="key_initiative_other" id="key_initiative_other" size="60">
</span>
</div>
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";