-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add disabled attribute to checkbox and radio (#745)
* Add disabled attribute to checkbox and radio Closes #708 * Add some builder assertions for checkboxes
- Loading branch information
Showing
9 changed files
with
128 additions
and
30 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
test-suite-thymeleaf-fieldset/src/test/resources/views/fieldset/inputcheckbox.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<th:block th:fragment="inputcheckbox(el)" xmlns:th="http://www.thymeleaf.org"><th:block th:if="${el.label()}"><label th:replace="~{fieldset/label :: label(null, ${el.label()})}"></label></th:block><div class="form-check" th:each="checkbox : ${el.checkboxes()}"><input type="checkbox" th:name="${checkbox.name()}" th:value="${checkbox.value()}" th:id="${checkbox.id()}" class="form-check-input" th:required="${checkbox.required()}" th:checked="${checkbox.checked()}" th:classappend="${el.hasErrors() ? 'is-invalid' : ''}"/><label th:replace="~{fieldset/label :: label(${checkbox.id()}, ${checkbox.label()})}"></label></div></th:block> | ||
<th:block th:fragment="inputcheckbox(el)" xmlns:th="http://www.thymeleaf.org"><th:block th:if="${el.label()}"><label th:replace="~{fieldset/label :: label(null, ${el.label()})}"></label></th:block><div class="form-check" th:each="checkbox : ${el.checkboxes()}"><input type="checkbox" th:name="${checkbox.name()}" th:value="${checkbox.value()}" th:id="${checkbox.id()}" class="form-check-input" th:required="${checkbox.required()}" th:disabled="${checkbox.disabled()}" th:checked="${checkbox.checked()}" th:classappend="${el.hasErrors() ? 'is-invalid' : ''}"/><label th:replace="~{fieldset/label :: label(${checkbox.id()}, ${checkbox.label()})}"></label></div></th:block> |
2 changes: 1 addition & 1 deletion
2
test-suite-thymeleaf-fieldset/src/test/resources/views/fieldset/inputradio.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<input th:fragment="inputradio(el,radio)" xmlns:th="http://www.thymeleaf.org" type="radio" th:name="${el.name()}" th:value="${radio.value()}" th:id="${radio.id()}" class="form-check-input" th:required="${el.required()}" th:checked="${radio.checked()}"/> | ||
<input th:fragment="inputradio(el,radio)" xmlns:th="http://www.thymeleaf.org" type="radio" th:name="${el.name()}" th:value="${radio.value()}" th:id="${radio.id()}" class="form-check-input" th:required="${el.required()}" th:disabled="${radio.disabled()}" th:checked="${radio.checked()}"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters