Portfolio Name and Defense Component read only on TOs that are started from existing portfolios
This commit is contained in:
parent
6720b60bc4
commit
68a1ffde8b
@ -237,6 +237,11 @@ def new(screen, task_order_id=None, portfolio_id=None):
|
|||||||
task_order_id=task_order_id,
|
task_order_id=task_order_id,
|
||||||
)
|
)
|
||||||
url_args["next"] = template_args["next"]
|
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)
|
template_args["action_url"] = url_for("task_orders.update", **url_args)
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
<div class="portfolio-funding">
|
<div class="portfolio-funding">
|
||||||
|
|
||||||
<div class='portfolio-funding__header row'>
|
<div class='portfolio-funding__header row'>
|
||||||
<a href="{{ url_for("task_orders.new", screen=1, portfolio_id=portfolio.id) }}" class="usa-button">Start a New Task Order</a>
|
<a href="{{ url_for("task_orders.new", screen=1, portfolio_id=portfolio.id, new_to_on_portfolio=True) }}" class="usa-button">Start a New Task Order</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% for task_order in pending_task_orders %}
|
{% for task_order in pending_task_orders %}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
{% from "components/options_input.html" import OptionsInput %}
|
{% from "components/options_input.html" import OptionsInput %}
|
||||||
{% from "components/date_input.html" import DateInput %}
|
{% from "components/date_input.html" import DateInput %}
|
||||||
{% from "components/multi_checkbox_input.html" import MultiCheckboxInput %}
|
{% from "components/multi_checkbox_input.html" import MultiCheckboxInput %}
|
||||||
|
{% from "components/review_field.html" import ReviewField %}
|
||||||
|
|
||||||
{% block heading %}
|
{% block heading %}
|
||||||
{{ "task_orders.new.app_info.section_title"| translate }}
|
{{ "task_orders.new.app_info.section_title"| translate }}
|
||||||
@ -14,11 +15,17 @@
|
|||||||
|
|
||||||
<!-- App Info Section -->
|
<!-- App Info Section -->
|
||||||
<h3 class="task-order-form__heading subheading">{{ "task_orders.new.app_info.basic_info_title"| translate }}</h3>
|
<h3 class="task-order-form__heading subheading">{{ "task_orders.new.app_info.basic_info_title"| translate }}</h3>
|
||||||
{{ TextInput(form.portfolio_name, placeholder="The name of your office or organization", validation="portfolioName") }}
|
|
||||||
{{ TextInput(form.scope, paragraph=True) }}
|
{% if new_to_on_portfolio %}
|
||||||
<p><i>{{ "task_orders.new.app_info.sample_scope" | translate | safe }}</i></p>
|
{{ 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) }}
|
||||||
|
<p><i>{{ "task_orders.new.app_info.sample_scope" | translate | safe }}</i></p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="subheading--black">
|
<div class="subheading--black">
|
||||||
{{ OptionsInput(form.defense_component) }}
|
{{ ReviewField(heading="forms.task_order.defense_component_label" | translate, field=defense_component) if new_to_on_portfolio else OptionsInput(form.defense_component) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user