diff options
Diffstat (limited to 'src/main/resources')
| -rw-r--r-- | src/main/resources/static/style.css | 12 | ||||
| -rw-r--r-- | src/main/resources/templates/configs/userroles.html | 7 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index 0dd5820..a746832 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -449,7 +449,7 @@ td.clipboard.clipped { } .btn.btn-red:hover, .btn.btn-red:active { - background: darkred !important; + background: darkred; } .btn.btn-blue { @@ -458,7 +458,7 @@ td.clipboard.clipped { } .btn.btn-blue:hover, .btn.btn-blue:active { - background: darkslategray !important; + background: darkslategray; } .btn.btn-delete:before { @@ -466,6 +466,14 @@ td.clipboard.clipped { padding: .2rem; } +button:disabled, +.btn:disabled { + background: slategray !important; + color: lightgray; + filter: none; + cursor: default; +} + input.inline { border: none; font-size: 1.1rem; diff --git a/src/main/resources/templates/configs/userroles.html b/src/main/resources/templates/configs/userroles.html index 23cc5f2..f5e4586 100644 --- a/src/main/resources/templates/configs/userroles.html +++ b/src/main/resources/templates/configs/userroles.html @@ -21,16 +21,17 @@ <td> <div class="userrole-form"> <form th:hx-put="@{/configs/userroles/{id}(id=${userRole.id})}" hx-target="#userroles"> - <select name="role"> + <select name="role" th:disabled="${#authorization.authentication.getName() == userRole.username}"> <option th:selected="${userRole.role.value == 'guest'}" value="GUEST">Gast</option> <option th:selected="${userRole.role.value == 'user'}" value="USER">Benutzer</option> + <option th:selected="${userRole.role.value == 'admin'}" value="ADMIN">Administrator</option> </select> - <button class="btn btn-blue">Übernehmen</button> + <button class="btn btn-blue" th:disabled="${#authorization.authentication.getName() == userRole.username}">Übernehmen</button> </form> </div> </td> <td> - <button class="btn btn-red" th:hx-delete="@{/configs/userroles/{id}(id=${userRole.id})}" hx-target="#userroles">Löschen</button> + <button class="btn btn-red" th:hx-delete="@{/configs/userroles/{id}(id=${userRole.id})}" hx-target="#userroles" th:disabled="${#authorization.authentication.getName() == userRole.username}">Löschen</button> </td> </tr> </tbody> |
