39 lines
2.0 KiB
HTML
39 lines
2.0 KiB
HTML
<!doctype html>
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
|
<head><meta charset="utf-8"><title>Create account</title></head>
|
|
<body>
|
|
<main>
|
|
<h1>Create account</h1>
|
|
<p th:if="${smtpRestricted}" role="alert">This is a restricted installation until tested SMTP is active.</p>
|
|
<p th:if="${param.created}" role="status">Account created and activation email sent.</p>
|
|
<p th:if="${param.deliveryFailed}" role="alert">Account created, but activation delivery failed.</p>
|
|
<form method="post" th:action="@{/admin/accounts}" th:object="${accountForm}">
|
|
<div th:if="${#fields.hasGlobalErrors()}" role="alert">
|
|
<p th:each="error : ${#fields.globalErrors()}" th:text="${error}"></p>
|
|
</div>
|
|
<label>Email <input th:field="*{email}" type="email" required autocomplete="off"></label>
|
|
<p th:if="${#fields.hasErrors('email')}" th:errors="*{email}" role="alert"></p>
|
|
<label>Display name <input th:field="*{displayName}" required autocomplete="off"></label>
|
|
<p th:if="${#fields.hasErrors('displayName')}" th:errors="*{displayName}" role="alert"></p>
|
|
<label>Role
|
|
<select th:field="*{role}" required>
|
|
<option value="ADMIN">Admin</option>
|
|
<option value="MENTOR">Mentor</option>
|
|
<option value="INTERN">Intern</option>
|
|
</select>
|
|
</label>
|
|
<p th:if="${#fields.hasErrors('role')}" th:errors="*{role}" role="alert"></p>
|
|
<fieldset>
|
|
<legend>Intern details</legend>
|
|
<label>Student code <input th:field="*{studentCode}" autocomplete="off"></label>
|
|
<p th:if="${#fields.hasErrors('studentCode')}" th:errors="*{studentCode}" role="alert"></p>
|
|
<label>Internship start <input th:field="*{internshipStart}" type="date"></label>
|
|
<label>Internship end <input th:field="*{internshipEnd}" type="date"></label>
|
|
</fieldset>
|
|
<p th:if="${#fields.hasErrors('internDetailsValid')}" th:errors="*{internDetailsValid}" role="alert"></p>
|
|
<button type="submit">Create account</button>
|
|
</form>
|
|
</main>
|
|
</body>
|
|
</html>
|