Split the registration form into three sections based on the type of user.
This commit is contained in:
parent
ee7026d59d
commit
153df56a89
|
@ -12,58 +12,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<form th:action="@{/register}" method="post" th:object="${newUserRegistration}">
|
<h3>I am a ...</h3>
|
||||||
<div class="form-row">
|
</div>
|
||||||
<div class="col">
|
|
||||||
<label for="first_name_input">First Name</label>
|
|
||||||
<input id="first_name_input" class="form-control" type="text" th:field="*{firstName}" required/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<label for="last_name_input">Last Name</label>
|
|
||||||
<input id="last_name_input" class="form-control" type="text" th:field="*{lastName}" required/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="row justify-content-center">
|
||||||
<div class="col">
|
<div class="col text-center">
|
||||||
<label for="email_input">Email</label>
|
<a class="btn btn-primary" th:href="@{/register/student}">Student</a>
|
||||||
<input id="email_input" class="form-control" type="text" th:field="*{emailAddress}" required/>
|
</div>
|
||||||
</div>
|
<div class="col text-center">
|
||||||
</div>
|
<a class="btn btn-primary" th:href="@{/register/teaching_assistant}">Teaching Assistant</a>
|
||||||
|
</div>
|
||||||
<div class="form-row">
|
<div class="col text-center">
|
||||||
<div class="col">
|
<a class="btn btn-primary" th:href="@{/register/administrator}">Administrator</a>
|
||||||
<label for="username_input">Username</label>
|
</div>
|
||||||
<input id="username_input" class="form-control" type="text" th:field="*{username}" required/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row">
|
|
||||||
<div class="col">
|
|
||||||
<label for="role_select">I am a</label>
|
|
||||||
<select id="role_select" class="form-control" th:field="*{selectedPersonType}">
|
|
||||||
<option th:each="personType: ${newUserRegistration.getAvailablePersonTypes()}" th:text="${personType}" th:value="${personType}"></option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row">
|
|
||||||
<div class="col">
|
|
||||||
<label for="password_input">Password</label>
|
|
||||||
<input id="password_input" class="form-control" type="password" th:field="*{password}" required/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<label for="password_confirm_input">Confirm Password</label>
|
|
||||||
<input id="password_confirm_input" class="form-control" type="password" th:field="*{passwordConfirm}" required/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row mt-1">
|
|
||||||
<div class="col">
|
|
||||||
<input class="btn btn-primary" type="submit" value="Submit"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue