Portfolio Name and Defense Component read only on TOs that are started from existing portfolios

This commit is contained in:
Montana
2019-02-28 11:18:09 -05:00
parent 6720b60bc4
commit 68a1ffde8b
3 changed files with 17 additions and 5 deletions

View File

@@ -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)