X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e24e657ebf536f55c1bde66bd41563fae30a98b0..8885fd14f5f040eb3aa69f1d705856f99a1fa572:/src/wolnelektury/templates/forms/form_sent.html diff --git a/src/wolnelektury/templates/forms/form_sent.html b/src/wolnelektury/templates/forms/form_sent.html index f34383da8..2212da6e3 100644 --- a/src/wolnelektury/templates/forms/form_sent.html +++ b/src/wolnelektury/templates/forms/form_sent.html @@ -17,5 +17,18 @@ {% block body %} <h1>{{ form.title }}</h1> - <p>{{ form.response }}</p> + <p id="form-response">{{ form.response|safe }}</p> +{% endblock %} + +{% block extrabody %} + <script type="text/javascript"> + (function() { + let $a = $("#form-response a"); + if ($a.length) { + setTimeout(() => { + window.location.href = $a.attr('href'); + }, 5000); + } + })(); + </script> {% endblock %}