diff --git a/atst/routes/task_orders/new.py b/atst/routes/task_orders/new.py index 77cb0c63..235e5384 100644 --- a/atst/routes/task_orders/new.py +++ b/atst/routes/task_orders/new.py @@ -237,6 +237,11 @@ def new(screen, task_order_id=None, portfolio_id=None): task_order_id=task_order_id, ) url_args["next"] = template_args["next"] + elif http_request.args.get("new_to_on_portfolio"): + portfolio = Portfolios.get(g.current_user, portfolio_id) + template_args["portfolio_name"] = portfolio.name + template_args["defense_component"] = portfolio.defense_component + template_args["new_to_on_portfolio"] = True template_args["action_url"] = url_for("task_orders.update", **url_args) diff --git a/templates/portfolios/task_orders/index.html b/templates/portfolios/task_orders/index.html index c26bd969..002111be 100644 --- a/templates/portfolios/task_orders/index.html +++ b/templates/portfolios/task_orders/index.html @@ -93,7 +93,7 @@
{{ "task_orders.new.app_info.sample_scope" | translate | safe }}
+ +{% if new_to_on_portfolio %} + {{ ReviewField(heading="forms.portfolio.name_label" | translate, field=portfolio_name) }} +{% else %} + {{ TextInput(form.portfolio_name, placeholder="The name of your office or organization", validation="portfolioName") }} + {{ TextInput(form.scope, paragraph=True) }} +{{ "task_orders.new.app_info.sample_scope" | translate | safe }}
+{% endif %} +