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 e4a9df0e00
commit a467062fe1

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 %}