From c91ad961a2829c3ea545398d4c50598da85f500c Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Tue, 18 Jun 2019 13:39:18 -0400 Subject: [PATCH 1/2] Cancel button always goes to portfolio funding page --- atst/routes/task_orders/new.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/atst/routes/task_orders/new.py b/atst/routes/task_orders/new.py index 1c1bec1d..e73bc5e6 100644 --- a/atst/routes/task_orders/new.py +++ b/atst/routes/task_orders/new.py @@ -20,10 +20,8 @@ def render_task_orders_edit(portfolio_id=None, task_order_id=None, form=None): else: render_args["form"] = form or TaskOrderForm() - render_args["cancel_url"] = ( - http_request.referrer - if http_request.referrer - else url_for("task_orders.portfolio_funding", portfolio_id=portfolio_id) + render_args["cancel_url"] = url_for( + "task_orders.portfolio_funding", portfolio_id=portfolio_id ) return render_template("task_orders/edit.html", **render_args) From f1b2825ab550ee95fb34bb4c7335caf3471c47f1 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Tue, 18 Jun 2019 13:57:00 -0400 Subject: [PATCH 2/2] Update Totals box text and use translations --- templates/components/totals_box.html | 8 ++++---- templates/task_orders/edit.html | 16 ++++++++-------- translations.yaml | 5 +++++ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/templates/components/totals_box.html b/templates/components/totals_box.html index 3e6875a6..fc16884f 100644 --- a/templates/components/totals_box.html +++ b/templates/components/totals_box.html @@ -6,15 +6,15 @@ {% set contract_amount = task_order.total_contract_amount %} {% endif %} -
Total obligated funds
+
{{ 'components.totals_box.obligated_funds' | translate }}
{{ obligated_funds | dollars }}
-
This is the funding allocated to cloud services. It may be 100% or a portion of the total task order budget.
+
{{ 'components.totals_box.obligated_text' | translate }}

-
Total contract amount
+
{{ 'components.totals_box.total_amount' | translate }}
{{ contract_amount | dollars }}
-
This is the value of all funds obligated for this contract, including -- but not limited to -- funds obligated for the cloud.
+
{{ 'components.totals_box.total_text' | translate }}
diff --git a/templates/task_orders/edit.html b/templates/task_orders/edit.html index b2c9137a..133f06b0 100644 --- a/templates/task_orders/edit.html +++ b/templates/task_orders/edit.html @@ -411,20 +411,20 @@ + inline-template + v-bind:obligated='obligated' + v-bind:contract-amount='total' + >
-
Total obligated funds
+
{{ 'components.totals_box.obligated_funds' | translate }}
-
This is the funding allocated to cloud services. It may be 100% or a portion of the total task order budget.
+
{{ 'components.totals_box.obligated_text' | translate }}

-
Total contract amount
+
{{ 'components.totals_box.total_amount' | translate }}
-
This is the value of all funds obligated for this contract, including -- but not limited to -- funds obligated for the cloud.
+
{{ 'components.totals_box.total_text' | translate }}
diff --git a/translations.yaml b/translations.yaml index 2e59ac5e..2044a381 100644 --- a/translations.yaml +++ b/translations.yaml @@ -50,6 +50,11 @@ components: modal: destructive_message: You will no longer be able to access this {resource} destructive_title: Warning! This action is permanent + totals_box: + obligated_funds: Funds obligated for cloud + obligated_text: This is the funding allocated to cloud services. It may be 100% or a portion of the total task order budget. + total_amount: Total contract amount + total_text: This is the value of all funds obligated for this contract, including -- but not limited to -- funds obligated for the cloud. usa_header: flag_image_alt: U.S. Flag official_message: An official website of the United States government