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

@@ -93,7 +93,7 @@
<div class="portfolio-funding">
<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>
{% for task_order in pending_task_orders %}

View File

@@ -4,6 +4,7 @@
{% from "components/options_input.html" import OptionsInput %}
{% from "components/date_input.html" import DateInput %}
{% from "components/multi_checkbox_input.html" import MultiCheckboxInput %}
{% from "components/review_field.html" import ReviewField %}
{% block heading %}
{{ "task_orders.new.app_info.section_title"| translate }}
@@ -14,11 +15,17 @@
<!-- App Info Section -->
<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) }}
<p><i>{{ "task_orders.new.app_info.sample_scope" | translate | safe }}</i></p>
{% 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) }}
<p><i>{{ "task_orders.new.app_info.sample_scope" | translate | safe }}</i></p>
{% endif %}
<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>
<hr>