feat: preserve form values and show field errors on submit

- keep submitted values and API field violations across redirects
- reopen the failed modal and highlight invalid fields
- show inline HTML5 validation messages instead of browser bubbles
- keep content-admin errors on the originating page
This commit is contained in:
2026-10-22 22:41:35 +03:00
parent 3827955909
commit d287dd3119
20 changed files with 636 additions and 66 deletions

View File

@@ -93,6 +93,7 @@
<input type="hidden" name="_csrf" th:value="${csrfToken}">
<input type="hidden" name="labId" th:value="${lab.id}">
<input class="input w-260" name="code" placeholder="6-значный код" maxlength="6" pattern="[0-9]{6}"
data-error-pattern="Введите 6 цифр"
inputmode="numeric" autocomplete="one-time-code" required>
<button class="btn btn-primary" type="submit">Приступить</button>
</form>