Add route and template for signature confirmation
This commit is contained in:
parent
68e0d261f6
commit
b9e14f8719
@ -3,7 +3,7 @@ from flask import g, redirect, render_template, request as http_request, url_for
|
||||
from . import task_orders_bp
|
||||
from atst.domain.authz.decorator import user_can_access_decorator as user_can
|
||||
from atst.domain.task_orders import TaskOrders
|
||||
from atst.forms.task_order import TaskOrderForm
|
||||
from atst.forms.task_order import TaskOrderForm, SignatureForm
|
||||
from atst.models.permissions import Permissions
|
||||
from atst.utils.flash import formatted_flash as flash
|
||||
|
||||
@ -131,6 +131,14 @@ def review(task_order_id):
|
||||
)
|
||||
|
||||
|
||||
@task_orders_bp.route("/task_orders/<task_order_id>/step_5")
|
||||
@user_can(Permissions.CREATE_TASK_ORDER, message="view new task order form")
|
||||
def confirm_signature(task_order_id):
|
||||
return render_task_orders_edit(
|
||||
"task_orders/step_5.html", task_order_id=task_order_id, form=SignatureForm()
|
||||
)
|
||||
|
||||
|
||||
@task_orders_bp.route("/portfolios/<portfolio_id>/task_orders/new")
|
||||
@task_orders_bp.route("/task_orders/<task_order_id>/edit")
|
||||
@user_can(Permissions.CREATE_TASK_ORDER, message="view new task order form")
|
||||
|
@ -8,13 +8,13 @@
|
||||
{% block portfolio_content %}
|
||||
{% set action = url_for("task_orders.update_number", task_order_id=task_order_id) %}
|
||||
|
||||
<div id="upload-to-pdf" action='{{ action }}' method="POST" autocomplete="off" enctype="multipart/form-data">
|
||||
<div id="upload-to-pdf">
|
||||
{{ form.csrf_token }}
|
||||
|
||||
{% call StickyCTA(text=('task_orders.form.sticky_header_text' | translate )) %}
|
||||
<span class="action-group">
|
||||
<a
|
||||
href="{{ url_for('task_orders.add_pdf', task_order_id=task_order_id)}}"
|
||||
href="{{ url_for('task_orders.confirm_signature', task_order_id=task_order_id)}}"
|
||||
class="usa-button usa-button-primary">
|
||||
Next: Submit Task Order
|
||||
</a>
|
||||
|
50
templates/task_orders/step_5.html
Normal file
50
templates/task_orders/step_5.html
Normal file
@ -0,0 +1,50 @@
|
||||
{% extends "portfolios/base.html" %}
|
||||
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/checkbox_input.html" import CheckboxInput %}
|
||||
{% from "components/sticky_cta.html" import StickyCTA %}
|
||||
|
||||
{% block portfolio_content %}
|
||||
{% set action = url_for("task_orders.submit_task_order", task_order_id=task_order_id) %}
|
||||
|
||||
<base-form inline-template>
|
||||
<form id="upload-to-pdf" action='{{ action }}' method="POST" autocomplete="off" enctype="multipart/form-data">
|
||||
{{ form.csrf_token }}
|
||||
|
||||
{% call StickyCTA(text=('task_orders.form.sticky_header_text' | translate )) %}
|
||||
<span class="action-group">
|
||||
<input
|
||||
type="submit"
|
||||
formaction="{{ action }}"
|
||||
tabindex="0"
|
||||
:disabled="!changed"
|
||||
value="Next: Confirm & Submit"
|
||||
form="upload-to-pdf"
|
||||
class="usa-button usa-button-primary">
|
||||
<input
|
||||
type="button"
|
||||
class="usa-button usa-button-secondary"
|
||||
tabindex="0"
|
||||
value="Previous"
|
||||
form="upload-to-pdf"/>
|
||||
<a
|
||||
href="{{ cancel_url }}"
|
||||
class="action-group__action icon-link">
|
||||
{{ "common.cancel" | translate }}
|
||||
</a>
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
<div>
|
||||
<h1>Signature confirmation: <em>Task Order #{{task_order.number}}</em></h1>
|
||||
</div>
|
||||
|
||||
{% call Alert('',
|
||||
message="All task orders require a Contracting Officer signature."
|
||||
) %}
|
||||
|
||||
{{ CheckboxInput(form.signature) }}
|
||||
{% endcall %}
|
||||
</form>
|
||||
</base-form>
|
||||
{% endblock %}
|
@ -107,6 +107,14 @@ def test_task_orders_review(client, user_session, task_order):
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_task_orders_confirm_signature(client, user_session, task_order):
|
||||
user_session(task_order.creator)
|
||||
response = client.get(
|
||||
url_for("task_orders.confirm_signature", task_order_id=task_order.id)
|
||||
)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_task_orders_new_flow():
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user