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:
@@ -14,10 +14,10 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
</noscript>
|
||||
<link rel="icon" type="image/svg+xml" th:href="@{/favicon.svg(v='36')}">
|
||||
<!-- v=35: сброс кэша стилей после изменения геометрии; при изменении css поднимать версию -->
|
||||
<!-- v=37: сброс кэша стилей после изменения геометрии; при изменении css поднимать версию -->
|
||||
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/bootstrap-icons.min.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/app.css(v='36')}">
|
||||
<link rel="stylesheet" th:href="@{/css/app.css(v='37')}">
|
||||
<link id="hljs-light" rel="stylesheet" th:href="@{/css/hljs-github.css(v='36')}">
|
||||
<link id="hljs-dark" rel="stylesheet" th:href="@{/css/hljs-github-dark.css(v='36')}" disabled>
|
||||
<script th:src="@{/js/highlight.min.js(v='36')}" defer></script>
|
||||
@@ -27,6 +27,7 @@
|
||||
<script th:src="@{/js/theme-init.js(v='36')}"></script>
|
||||
<script th:src="@{/js/app.js(v='36')}" defer></script>
|
||||
<script th:src="@{/js/ui-state.js(v='36')}" defer></script>
|
||||
<script th:src="@{/js/form-feedback.js(v='37')}" defer></script>
|
||||
<script th:src="@{/js/md-content.js(v='36')}" defer></script>
|
||||
<script th:src="@{/js/submit-guard.js(v='36')}" defer></script>
|
||||
</head>
|
||||
@@ -77,6 +78,7 @@
|
||||
LMS v1.1.0
|
||||
</footer>
|
||||
</div>
|
||||
<div id="form-feedback" hidden th:if="${formFeedbackJson != null}" th:attr="data-feedback=${formFeedbackJson}"></div>
|
||||
<div class="toast-host" id="toast-host" aria-live="polite">
|
||||
<div th:if="${notice}" class="toast-item toast-success" data-toast>
|
||||
<span class="toast-text" th:text="${notice}">…</span>
|
||||
|
||||
Reference in New Issue
Block a user