Skip to content

Commit

Permalink
Fix issue with not being able to remove user from group (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals authored Nov 13, 2024
1 parent f909e4a commit f242747
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions app/src/main/resources/templates/common/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@
</small>
</th:block>

<th:block th:fragment="textInputWithClassName(field, label, className)"
th:assert="${field != null}">
<label th:if="${label != null}"
th:for="${field}"
th:text="${label}">
</label>
<input th:class="${className}"
type="text"
th:field="*{__${field}__}"
th:attr="aria-invalid=${#fields.hasErrors(field) ? 'true' : null},
aria-describedby=${#fields.hasErrors(field) ? field : null}"
/>
<small th:id="${field}" th:if="${#fields.hasErrors(field)}" th:errors="*{__${field}__}">
</small>
</th:block>

<th:block th:fragment="distantTextInput(name, label, errorMessage, value, form)"
th:assert="${name != null}">
<label th:if="${label != null}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</small>
</div>
<div>
<div th:replace="~{common/input :: textInput2(field='members[__${memberStat.index}__].unofficialPostName', label='Unofficial post name')}"></div>
<div th:replace="~{common/input :: textInputWithClassName(field='members[__${memberStat.index}__].unofficialPostName', label='Unofficial post name', className='unofficialPostName')}"></div>
</div>
<button class="outline contrast" _="on click remove closest .member-row then call updateNames('members', '.userId', '.postId', '.unofficialPostName')"
type="button">Delete
Expand Down

0 comments on commit f242747

Please sign in to comment.