Refactor task order route to check for request args instead of request.referrer

This commit is contained in:
Montana
2019-02-21 10:59:33 -05:00
parent 6628a1441e
commit 12706c3d45
5 changed files with 29 additions and 55 deletions

View File

@@ -9,7 +9,7 @@
{% include "fragments/flash.html" %}
{% block form_action %}
{% if from_ko_review %}
{% if ko_edit %}
<form method='POST' action="{{ url_for('task_orders.update', screen=current, task_order_id=task_order_id, next=next) }}" autocomplete="off" enctype="multipart/form-data">
{% endif %}
@@ -43,7 +43,7 @@
{% block next %}
<div class='action-group'>
<input type='submit' class='usa-button usa-button-primary' value='{{ "Save" if from_ko_review else "Save & Continue" }}' />
<input type='submit' class='usa-button usa-button-primary' value='{{ "Save" if ko_edit else "Save & Continue" }}' />
</div>
{% endblock %}

View File

@@ -1,6 +1,6 @@
{% extends 'task_orders/_new.html' %}
{% from "components/to_edit_link.html" import TOEditLink %}
{% from "components/edit_link.html" import EditLink %}
{% from "components/required_label.html" import RequiredLabel %}
{% from "components/icon.html" import Icon %}
{% from "components/review_field.html" import ReviewField %}
@@ -11,11 +11,12 @@
{% block form %}
<h3 class="subheading">{{ "task_orders.new.review.app_info"| translate }} {{ TOEditLink(task_order=task_order, screen=1) }}</h3>
<h3 class="subheading">{{ "task_orders.new.review.app_info"| translate }} {{ EditLink(url_for("task_orders.new", screen=1, task_order_id=task_order.id)) }}
</h3>
{% include "fragments/task_order_review/app_info.html" %}
<hr>
<h3 class="subheading">{{ "task_orders.new.review.reporting"| translate }} {{ TOEditLink(task_order=task_order, screen=1, anchor="reporting") }}</h3>
<h3 class="subheading">{{ "task_orders.new.review.reporting"| translate }} {{ EditLink(url_for("task_orders.new", screen=1, task_order_id=task_order.id, anchor="reporting")) }}</h3>
<div class="row">
{{
@@ -83,11 +84,11 @@
<hr>
<h3 class="subheading">{{ "task_orders.new.review.funding"| translate }} {{ TOEditLink(task_order=task_order, screen=2) }}</h3>
<h3 class="subheading">{{ "task_orders.new.review.funding"| translate }} {{ EditLink(url_for("task_orders.new", screen=2, task_order_id=task_order.id)) }}</h3>
{% include "fragments/task_order_review/funding.html" %}
<hr>
<h3 class="subheading">{{ "task_orders.new.review.oversight"| translate }} {{ TOEditLink(task_order=task_order, screen=3) }}</h3>
<h3 class="subheading">{{ "task_orders.new.review.oversight"| translate }} {{ EditLink(url_for("task_orders.new", screen=3, task_order_id=task_order.id)) }}</h3>
{% include "fragments/task_order_review/oversight.html" %}
{% endblock %}