{% load l10n %}
{% spaceless %}{% with delay=proceed_delay|default:500 %}{% localize off %}
{% if proceed_with == 'RELOAD_PAGE' %}
	do(disable()).then(create()).then(showOK()).then(delay({{ delay }})).then(reloadPage()).catch(showFail()).then(delay({{ delay }})).finally(restore())
{% elif proceed_with != 'DO_NOTHING' %}
	do(disable()).then(create()).then(showOK()).then(delay({{ delay }})).then(redirectTo('{{ proceed_with }}')).catch(showFail()).then(delay({{ delay }})).finally(restore())
{% else %}
	do(disable()).then(create()).then(showOK()).then(delay({{ delay }})).catch(showFail()).then(delay({{ delay }})).finally(restore())
{% endif %}
{% endlocalize %}{% endwith %}{% endspaceless %}
