Form now jumps to first error (if any) when it reloads

even if on a different tab.
This commit is contained in:
Naomi 2018-09-20 12:59:47 +01:00
parent 03d2791fb3
commit 4a0e1a491e

View File

@ -568,5 +568,13 @@ function initDrafts() {
initDrafts()
</script>
<script>
<!-- Jump to error -->
$(function() {
if ($('.has-error')) {
location.href = '#' + $('.has-error:first').attr('id');
}
});
</script>
{% endblock %}