<th:block th:fragment="label(id, el)" xmlns:th="http://www.thymeleaf.org"><label th:if="${el.code()}" th:for="${id != null ? id : null}" th:text="${#strings.defaultString(#messages.msgOrNull(el.code()),el.defaultMessage())}" class="form-label"></label><label th:unless="${el.code()}" th:for="${id != null ? id : null}" th:text="${el.defaultMessage()}" class="form-label"></label></th:block>