<th:block th:fragment="inputsubmit(el)" xmlns:th="http://www.thymeleaf.org"><input th:if="${el.value().code() != null}" type="submit" th:value="${#strings.defaultString(#messages.msgOrNull(el.value().code()),el.value().defaultMessage())}" class="btn btn-primary"/><input th:unless="${el.value().code() != null}" type="submit" th:value="${el.value().defaultMessage()}" class="btn btn-primary"/></th:block>