Add in alert for when user isn't found

This commit is contained in:
leigh-mil 2019-08-07 16:37:15 -04:00
parent 811a498bf4
commit 9f54501df4

View File

@ -4,32 +4,45 @@
{% from "components/text_input.html" import TextInput %} {% from "components/text_input.html" import TextInput %}
{% block content %} {% block content %}
{% set ccpo_user_form = "add-ccpo-user-form" %} {% if new_user %}
{% set ccpo_user_form = "add-ccpo-user-form" %}
{% call Alert('Confirm new CCPO user') %} {% call Alert('Confirm new CCPO user') %}
<form id="{{ ccpo_user_form }}" action="{{ url_for('atst.confirm_new_ccpo_user') }}" method="POST"> <form id="{{ ccpo_user_form }}" action="{{ url_for('atst.confirm_new_ccpo_user') }}" method="POST">
{{ form.csrf_token }} {{ form.csrf_token }}
<input type="hidden" name="dod_id" value="{{ form.dod_id.data }}"> <input type="hidden" name="dod_id" value="{{ form.dod_id.data }}">
<div>
<p>
Please confirm that the user details below match the user being given CCPO permissions.
</p>
<p>
{{ new_user.full_name }}
</p>
<p>
{{ new_user.email }}
</p>
</div>
<div class='action-group'>
<input
type='submit'
v-bind:disabled="invalid"
class='action-group__action usa-button'
value='Confirm and Add User'>
<a class='action-group__action icon-link icon-link--default' href="{{ url_for('atst.ccpo_users') }}">{{ "common.cancel" | translate }}</a>
</div>
</form>
{% endcall %}
{% else %}
{% call Alert('User not found') %}
<div> <div>
<p> To add someone as a CCPO user, they must already have an ATAT account.
Please confirm that the user details below match the user being given CCPO permissions. <div class='action-group'>
</p> <a class='action-group__action icon-link icon-link--default' href="{{ url_for('atst.ccpo_users') }}">
<p> Return to list of CCPO users
{{ new_user.full_name }} </a>
</p> </div>
<p>
{{ new_user.email }}
</p>
</div> </div>
<div class='action-group'> {% endcall %}
<input {% endif %}
type='submit'
v-bind:disabled="invalid"
class='action-group__action usa-button'
value='Confirm and Add User'>
<a class='action-group__action icon-link icon-link--default' href="{{ url_for('atst.ccpo_users') }}">{{ "common.cancel" | translate }}</a>
</div>
</form>
{% endcall %}
{% endblock %} {% endblock %}