{% macro RequiredLabel() -%}
  <span class='label label--error'>Response Required</span>
{%- endmacro %}

{% extends 'requests/_new.html' %}

{% from "components/alert.html" import Alert %}
{% from "components/text_input.html" import TextInput %}
{% from "components/icon.html" import Icon %}

{% block heading %}
  Review &amp; Submit
{% endblock %}


{% block form_action %}
<form method='POST' action="{{ url_for('requests.requests_submit', request_id=request_id) }}" autocomplete="off">
{% endblock %}

  {% block form %}

  <p>Before you can submit your request, please take a moment to review the information entered in the form. You may make changes by clicking the edit link on each section. When all information looks right, go ahead and submit.</p>

  {% if f.errors or not can_submit %}
    {{ Alert('Please complete all sections',
      message="<p>In order to submit your JEDI Cloud request, you'll need to complete all required sections of this form without error. Missing or invalid fields are noted below.</p>",
      level='error'
    ) }}
  {% endif %}

  {% with editable=True %}
    {% include "requests/_review.html" %}
  {% endwith %}


{% endblock %}

{% block next %}

<div class='action-group'>
  <input type='submit' class='usa-button usa-button-primary' value='Submit' {{ "disabled" if not can_submit else "" }} />
</div>

</form>

{% endblock %}
