Merge pull request #565 from dod-ccpo/start-to-from-any-page
Require First TO Screen to be filled out
This commit is contained in:
commit
c16c5501cc
@ -108,6 +108,14 @@ class ShowTaskOrderWorkflow:
|
|||||||
|
|
||||||
return screen_info
|
return screen_info
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_complete(self):
|
||||||
|
if self.task_order:
|
||||||
|
if TaskOrders.all_sections_complete(self.task_order):
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class UpdateTaskOrderWorkflow(ShowTaskOrderWorkflow):
|
class UpdateTaskOrderWorkflow(ShowTaskOrderWorkflow):
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -254,6 +262,7 @@ def new(screen, task_order_id=None, portfolio_id=None):
|
|||||||
portfolio_id=portfolio_id,
|
portfolio_id=portfolio_id,
|
||||||
screens=workflow.display_screens,
|
screens=workflow.display_screens,
|
||||||
form=workflow.form,
|
form=workflow.form,
|
||||||
|
complete=workflow.is_complete,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,6 +50,12 @@
|
|||||||
|
|
||||||
a.active {
|
a.active {
|
||||||
color: $color-blue;
|
color: $color-blue;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.disabled{
|
||||||
|
color: $color-gray-light;
|
||||||
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,8 +10,17 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li class="progress-menu__item progress-menu__item--{{ step_indicator }}">
|
<li class="progress-menu__item progress-menu__item--{{ step_indicator }}">
|
||||||
<a href="{{ url_for('task_orders.new', screen=loop.index, task_order_id=task_order_id) }}"
|
<a
|
||||||
{% if g.matchesPath(url_for('task_orders.new', screen=loop.index)) %}class="active"{% endif %}
|
{% set class='' %}
|
||||||
|
{% if task_order_id %}
|
||||||
|
href="{{ url_for('task_orders.new', screen=loop.index, task_order_id=task_order_id) }}"
|
||||||
|
{% else %}
|
||||||
|
{% set class="disabled"%}
|
||||||
|
{% endif %}
|
||||||
|
{% if g.matchesPath(url_for('task_orders.new', screen=loop.index)) %}
|
||||||
|
{% set class="active" %}
|
||||||
|
{% endif %}
|
||||||
|
class={{class}}
|
||||||
>
|
>
|
||||||
{{ s['title'] }}
|
{{ s['title'] }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -194,7 +194,8 @@
|
|||||||
|
|
||||||
{% block next %}
|
{% block next %}
|
||||||
<div class='action-group'>
|
<div class='action-group'>
|
||||||
<input type='submit' class='usa-button usa-button-primary' value='Done' />
|
<input type='submit' class='usa-button usa-button-primary' value='Done'
|
||||||
|
{% if not complete %}disabled{% endif %}/>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user