Use new edit route
This commit is contained in:
parent
ce6b526da1
commit
136b97b23f
@ -15,7 +15,7 @@ def review_task_order(task_order_id):
|
||||
task_order = TaskOrders.get(task_order_id)
|
||||
if task_order.is_draft:
|
||||
return redirect(
|
||||
url_for("task_orders.form_step_one_add_pdf", task_order_id=task_order.id)
|
||||
url_for("task_orders.edit", task_order_id=task_order.id)
|
||||
)
|
||||
else:
|
||||
signature_form = SignatureForm()
|
||||
|
@ -60,7 +60,7 @@ def update_task_order(
|
||||
def edit(task_order_id):
|
||||
task_order = TaskOrders.get(task_order_id)
|
||||
|
||||
if task_order.number is None:
|
||||
if not task_order.number:
|
||||
return redirect(
|
||||
url_for("task_orders.form_step_two_add_number", task_order_id=task_order_id)
|
||||
)
|
||||
|
@ -13,7 +13,7 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro TaskOrderEditButton(task_order, text="Edit", secondary=False) %}
|
||||
<a href="{{ url_for('task_orders.form_step_one_add_pdf', task_order_id=task_order.id) }}" class="usa-button {{ 'usa-button-secondary' if secondary else '' }}">
|
||||
<a href="{{ url_for('task_orders.edit', task_order_id=task_order.id) }}" class="usa-button {{ 'usa-button-secondary' if secondary else '' }}">
|
||||
{{ text }}
|
||||
</a>
|
||||
{% endmacro %}
|
||||
|
@ -5,7 +5,7 @@
|
||||
{% block portfolio_content %}
|
||||
|
||||
{% call StickyCTA(text="Task order details") %}
|
||||
<a href="{{ url_for('task_orders.form_step_one_add_pdf', task_order_id=task_order.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a>
|
||||
<a href="{{ url_for('task_orders.edit', task_order_id=task_order.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a>
|
||||
{% endcall %}
|
||||
|
||||
{% include "fragments/task_order_review.html" %}
|
||||
|
@ -307,7 +307,7 @@ def test_task_orders_submit_task_order(client, user_session, task_order):
|
||||
@pytest.mark.parametrize(
|
||||
"to_factory_args,expected_step",
|
||||
[
|
||||
({"number": None, "clins": []}, "step_2"),
|
||||
({"number": "", "clins": []}, "step_2"),
|
||||
({"number": "1234567890123", "clins": []}, "step_3"),
|
||||
({"number": "1234567890123", "create_clins": [1]}, "step_4"),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user