mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 01:28:24 -04:00
Stop AJAX when success or failure and show form on failure
AJAX requests stop on success or failure, as the waiting page does not have to referesh any longer. Also on failure a form that allows user to try again is shown.
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{% from "components/banner.html" import banner, banner_wrapper %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/checkbox.html" import checkbox %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
<div class="ajax-block-container">
|
||||
{% if verification_status == "pending" %}
|
||||
@@ -29,6 +34,26 @@
|
||||
You can try again, or use a different address.
|
||||
</p>
|
||||
{% endcall %}
|
||||
<a href={{ url_for('main.service_add_email_reply_to', service_id=service_id) }}>Try again</a>
|
||||
<p>
|
||||
Let recipients send replies to a shared inbox that’s managed by your team.
|
||||
</p>
|
||||
<p>
|
||||
Do not use your own email address for replies.
|
||||
</p>
|
||||
{% call form_wrapper(
|
||||
action = url_for('.service_add_email_reply_to', service_id=service_id)
|
||||
) %}
|
||||
{{ textbox(
|
||||
form.email_address,
|
||||
width='2-3',
|
||||
safe_error_message=True
|
||||
) }}
|
||||
{% if not first_email_address %}
|
||||
<div class="form-group">
|
||||
{{ checkbox(form.is_default) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ page_footer('Try again') }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
) }}
|
||||
{{ ajax_block(
|
||||
partials,
|
||||
url_for('main.service_verify_reply_to_address_updates', service_id=service_id, notification_id=notification_id),
|
||||
url_for('main.service_verify_reply_to_address_updates', service_id=service_id, notification_id=notification_id) + request_args,
|
||||
'status',
|
||||
finished=finished
|
||||
) }}
|
||||
|
||||
Reference in New Issue
Block a user