mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
fixed e2e
This commit is contained in:
@@ -13,11 +13,17 @@
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
$submitButton.data('clicked', 'true');
|
$submitButton.data('clicked', 'true');
|
||||||
$submitButton.prop('disabled', true);
|
|
||||||
setTimeout(renableSubmitButton($submitButton), 10000);
|
|
||||||
|
|
||||||
|
if ($submitButton.is('[name="Send"], [name="Schedule"]')) {
|
||||||
|
$submitButton.prop('disabled', true);
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
renableSubmitButton($submitButton);
|
||||||
|
}, 10000);
|
||||||
|
} else {
|
||||||
|
setTimeout(renableSubmitButton($submitButton), 1500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let renableSubmitButton = $submitButton => () => {
|
let renableSubmitButton = $submitButton => () => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
{#- Define common attributes we can use for both button and input types #}
|
{#- Define common attributes we can use for both button and input types #}
|
||||||
|
|
||||||
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name }}"{% endif %} type="{{ params.type if params.type else 'submit' }}"{% if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}{% if params.preventDoubleClick %} data-prevent-double-click="true"{% endif %}{% endset %}
|
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name | trim }}"{% endif %} type="{{ params.type if params.type else 'submit' }}"{% if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}{% if params.preventDoubleClick %} data-prevent-double-click="true"{% endif %}{% endset %}
|
||||||
|
|
||||||
{#- Actually create a button... or a link! #}
|
{#- Actually create a button... or a link! #}
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,9 @@
|
|||||||
{% set button_text %}
|
{% set button_text %}
|
||||||
{{ "Schedule" if scheduled_for else 'Send'}}
|
{{ "Schedule" if scheduled_for else 'Send'}}
|
||||||
{% endset %}
|
{% endset %}
|
||||||
{{ usaButton({ "text": button_text }) }}
|
{{ usaButton({
|
||||||
|
"text": button_text,
|
||||||
|
"name": button_text
|
||||||
|
}) }}
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -83,8 +83,7 @@
|
|||||||
{% endset %}
|
{% endset %}
|
||||||
{{ usaButton({
|
{{ usaButton({
|
||||||
"text": button_text,
|
"text": button_text,
|
||||||
"type": submit,
|
"name": button_text
|
||||||
"preventDoubleClick": True,
|
|
||||||
}) }}
|
}) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user