mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-08-13 07:01:13 +00:00
Highlighting inputs with errors
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
color: red;
|
||||
}
|
||||
|
||||
div.invalid input {
|
||||
border-color: red !important;
|
||||
}
|
||||
|
||||
.separator-light {
|
||||
opacity: 25%;
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@
|
||||
type="text"
|
||||
th:value="${value}"
|
||||
th:name="${name}"
|
||||
class="form-control " th:id="|__id_${field.getName()}|"
|
||||
class="form-control" th:id="|__id_${field.getName()}|"
|
||||
th:classAppend="|${(field.isPrimaryKey() && object != null) ||
|
||||
(field.isReadOnly() && !create) ? 'disable' : ''}|"
|
||||
|
||||
|
@@ -30,7 +30,8 @@
|
||||
<h3 class="fw-bold mb-4" th:text="${create ? schema.getJavaClass().getSimpleName() : object.getDisplayName()}"></h3>
|
||||
<form class="form" enctype="multipart/form-data" method="post" th:action="|/${dbadmin_baseUrl}/model/${className}/create|">
|
||||
<input type="hidden" name="__dbadmin_create" th:value="${create}">
|
||||
<div th:each="field : ${schema.getSortedFields(false)}" class="mt-2">
|
||||
<div th:each="field : ${schema.getSortedFields(false)}" class="mt-2"
|
||||
th:classAppend="|${validationErrors != null && validationErrors.hasErrors(field.getJavaName()) ? 'invalid' : ''}|">
|
||||
<label th:for="|__id_${field.getName()}|" class="mb-1 fw-bold">
|
||||
<span th:if="${!field.isNullable() && !field.isPrimaryKey()}">
|
||||
*
|
||||
|
Reference in New Issue
Block a user