From b4d57a7e6b4e8f1dc540d6b0ed651f990e5c3213 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 11 Dec 2012 18:48:00 -0800 Subject: Bug 819022 - Project Kickoff Form: Add "Vendor" and "Line Item in Budget?" in the Finance portion --- .../comment-moz-project-review-finance.txt.tmpl | 7 +++- .../bug/create/create-moz-project-review.html.tmpl | 38 +++++++++++++++------- .../MozProjectReview/web/js/moz_project_review.js | 6 ++++ 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl index 1fc72de6f..99691c287 100644 --- a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl @@ -13,6 +13,12 @@ Finance Questions: +Vendor: [% cgi.param('finance_purchase_vendor') %] +Is this line item in budget?: [% cgi.param('finance_purchase_inbudget') %] +[% IF cgi.param('finance_purchase_inbudget') == 'No' %] +Not In Budget Why: +[%+ cgi.param('finance_purchase_notinbudget_why') %] +[% END %] What is the purchase for?: [%+ cgi.param('finance_purchase_what') %] Why is the purchase needed?: @@ -21,6 +27,5 @@ What is the risk if not purchased?: [%+ cgi.param('finance_purchase_risk') %] What is the alternative?: [%+ cgi.param('finance_purchase_alternative') %] -Is this line item in budget?: [% cgi.param('finance_purchase_inbudget') %] What is the urgency?: [% cgi.param('finance_purchase_urgency') %] Total Cost: [% cgi.param('finance_purchase_cost') %] 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 a84bbe743..db06d0c24 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 @@ -507,6 +507,33 @@
Finance
+
+ Vendor: + + + +
+ +
+ Is this line item in budget?: + + + +
+ +
+ Not In Budget Why: + + Please include additional description for this out of budget line item
+ +
+
+
What is the purchase for?: @@ -535,17 +562,6 @@
-
- Is this line item in budget?: - - - -
-
When do the items need to be ordered by?: diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js index 8aea8796b..29e765ad2 100644 --- a/extensions/MozProjectReview/web/js/moz_project_review.js +++ b/extensions/MozProjectReview/web/js/moz_project_review.js @@ -23,6 +23,7 @@ MPR.required_fields = { "separate_party": "Please select a value for separate party in the initial questions section" }, "finance_questions": { + "finance_purchase_vendor": "Please enter a value for vendor in the finance questions section", "finance_purchase_what": "Please enter a value for what in the finance questions section", "finance_purchase_why": "Please enter a value for why in the finance questions section", "finance_purchase_risk": "Please enter a value for risk in the finance questions section", @@ -121,6 +122,11 @@ MPR.validateAndSubmit = function () { if (!MPR.isFilledOut('vendor_cost')) alert_text += "Please select a value for vendor cost\n"; } + if (Dom.get('finance_purchase_inbudget').value == 'No') { + if (!MPR.isFilledOut('finance_purchase_notinbudget_why')) + alert_text += "Please include additional description for the out of budget line item\n"; + } + if (alert_text) { alert(alert_text); return false; -- cgit v1.2.3-24-g4f1b