swt23w23/src/main/resources/templates/edit-staff.html
2023-11-21 18:06:12 +01:00

28 lines
1.1 KiB
HTML

<!DOCTYPE html>
<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='Personal bearbeiten')}">
<head>
</head>
<body>
<div layout:fragment="content">
<form th:object="${staff}" method="post">
<input type="hidden" th:field="*{id}" />
<div class="mb-3">
<label class="form-label" for="name">Name:</label>
<input class="form-control" type="text" th:field="*{name}" required />
</div>
<div class="mb-3">
<label class="form-label" for="job">Beruf:</label>
<select name="job" class="form-select">
<option th:each="type : ${T(catering.staff.JobType).values()}" th:value="${type}" th:selected="${type.name() == staff.job.name()}" th:text="${type}" required></option>
</select>
</div>
<button class="btn btn-primary" type="submit">Speichern</button>
<a th:href="@{/staff}"><button type="button" class="btn btn-danger">Abbrechen</button></a>
</form>
</div>
</body>
</html>