spring-petclinic/src/main/resources/templates/fragments/selectField.html
Patrick Baumgartner af8645561b Cleanup HTML files
- Fixed broken paging and aligned vetList and OwnersList
- Adding Doctype for consistency
- Removed html5shim and respond for IE < 9
- Reformatting HTML

Signed-off-by: Patrick Baumgartner <contact@patbaumgartner.com>
2025-06-05 12:18:10 +01:00

27 lines
No EOL
980 B
HTML

<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org">
<body>
<form>
<th:block th:fragment="select (label, name, items)">
<div th:with="valid=${!#fields.hasErrors(name)}" th:class="${'form-group' + (valid ? '' : ' has-error')}"
class="form-group">
<label th:for="${name}" class="col-sm-2 control-label" th:text="${label}">Label</label>
<div class="col-sm-10">
<select th:field="*{__${name}__}">
<option th:each="item : ${items}" th:value="${item}" th:text="${item}">dog</option>
</select>
<span th:if="${valid}" class="fa fa-ok form-control-feedback" aria-hidden="true"></span>
<th:block th:if="${!valid}">
<span class="fa fa-remove form-control-feedback" aria-hidden="true"></span>
<span class="help-inline" th:errors="*{__${name}__}" th:text="#{error}">Error</span>
</th:block>
</div>
</div>
</th:block>
</form>
</body>
</html>