diff options
4 files changed, 29 insertions, 6 deletions
diff --git a/extensions/MozProjectReview/Extension.pm b/extensions/MozProjectReview/Extension.pm index 83d351b62..b3da765d5 100644 --- a/extensions/MozProjectReview/Extension.pm +++ b/extensions/MozProjectReview/Extension.pm @@ -77,7 +77,10 @@ sub post_bug_after_creation { $do_privacy_vendor = 1; } - if ($params->{vendor_cost} eq '> $25,000') { + if ($params->{vendor_cost} eq '> $25,000' + || ($params->{vendor_cost} eq '<= $25,000' + && $params->{po_needed} eq 'Yes')) + { $do_finance = 1; } 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 66ab024fe..6a88aadd8 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 @@ -28,7 +28,7 @@ New or Change: [% cgi.param('new_or_change') %] Mozilla Project: [% cgi.param('mozilla_project') %] Mozilla Related: [% cgi.param('mozilla_related') %] Separate Party: [% cgi.param('separate_party') %] -[% IF cgi.param('separate_part') == 'Yes' %] +[% 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') %] 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 df8966bbb..2225abf18 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 @@ -300,11 +300,25 @@ <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" - onchange="MPR.toggleVisibleById(this,'> $25,000','finance_questions');"> + onchange="MPR.toggleVisibleById(this,'> $25,000','finance_questions'); + MPR.toggleVisibleById(this,'<= $25,000','po_needed_row'); + if (Dom.get('po_needed').value == 'Yes') Dom.removeClass('finance_questions','bz_default_hidden');"> <option value="">Select One</option> <option value="N/A">N/A</option> - <option value="<= $25,000"><= $25,000</option> - <option value="> $25,000">> $25,000</option> + <option value="<= $25,000"><= $25,000</option> + <option value="> $25,000">> $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" + onchange="MPR.toggleVisibleById(this,'Yes','finance_questions');"> + <option value="">Select One</option> + <option value="Yes">Yes</option> + <option value="No">No</option> </select> </span> </div> @@ -591,7 +605,7 @@ </div> <div id="finance_purchase_urgency_row" class="field_row"> - <span class="field_label required">When do the items need to be ordered by?:</span> + <span class="field_label required">When do the items need<br>to be ordered by?:</span> <span class="field_data"> <select name="finance_purchase_urgency" id="finance_purchase_urgency"> <option value="within 24 hours">within 24 hours</option> diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js index 028666fcc..b5cdc3e38 100644 --- a/extensions/MozProjectReview/web/js/moz_project_review.js +++ b/extensions/MozProjectReview/web/js/moz_project_review.js @@ -142,6 +142,12 @@ MPR.validateAndSubmit = function () { alert_text += "Please include additional description for the out of budget line item\n"; } + if (Dom.get('vendor_cost').value == '<= $25,000' + && Dom.get('po_needed').value == '') + { + alert_text += "Please select whether a PO is needed or not\n"; + } + if (alert_text) { alert(alert_text); return false; |