swt23w23/src/main/resources/templates/profile.html

43 lines
1.5 KiB
HTML
Raw Normal View History

2023-11-01 12:32:54 +01:00
<!DOCTYPE html>
2023-11-13 20:09:39 +01:00
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout.html(title='Profil')}">
2023-11-01 12:32:54 +01:00
<head>
</head>
<body>
2023-11-15 17:27:04 +01:00
<div layout:fragment="content">
<div class="mb-4">
<form th:action="@{/profile}" method="post">
<h2 th:text="#{profile.authentification}"></h2>
<div class="mb-3">
<label class="form-label" for="username" th:text="#{profile.username}"></label>
<input class="form-control" name="username" th:value="${user.username}" type="text">
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
<div class="mb-3">
<label class="form-label" for="password" th:text="#{profile.password}"></label>
<input class="form-control" name="password" type="password">
</div>
<h2 th:text="#{profile.userinformation}"></h2>
<div class="mb-3">
<label class="form-label" for="address" th:text="#{profile.address}"></label>
<input class="form-control" name="address" th:value="${user.address}" type="text">
</div>
<button class="btn btn-primary" th:text="#{profile.edit}" type="submit"></button>
</form>
</div>
<div th:if="${user.hasRole('CUSTOMER')}" class="card">
<div class="card-header text-danger" th:text="#{profile.danger_zone}"></div>
<div class="card-body">
<a th:href="@{/profile/disable}">
<button class="btn btn-danger" th:text="#{profile.delete}" type="button"></button>
</a>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
</div>
</div>
2023-11-01 12:32:54 +01:00
</body>
</html>