mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-14 21:44:08 +02:00
add focus on error
This commit is contained in:
parent
1d8742237d
commit
09289769b8
2 changed files with 5 additions and 8 deletions
|
@ -372,11 +372,6 @@ export function initFormsetsForms() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newForm) {
|
|
||||||
// announce("new form added")
|
|
||||||
newForm.focus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
<div id="form-errors">
|
<div id="form-errors">
|
||||||
{% for error in form.non_field_errors %}
|
{% for error in form.non_field_errors %}
|
||||||
<div class="usa-alert usa-alert--error usa-alert--slim margin-bottom-2" role="alert">
|
<div class="usa-alert usa-alert--error usa-alert--slim margin-bottom-2" role="alert" tabindex="0">
|
||||||
<div class="usa-alert__body">
|
<div class="usa-alert__body">
|
||||||
|
<span class="usa-sr-only">Error:</span>
|
||||||
{{ error|escape }}
|
{{ error|escape }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
{% for error in field.errors %}
|
{% for error in field.errors %}
|
||||||
<div class="usa-alert usa-alert--error usa-alert--slim margin-bottom-2">
|
<div class="usa-alert usa-alert--error usa-alert--slim margin-bottom-2" tabindex="0">
|
||||||
<div class="usa-alert__body">
|
<div class="usa-alert__body">
|
||||||
|
<span class="usa-sr-only">Error:</span>
|
||||||
{{ error|escape }}
|
{{ error|escape }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue