1 | <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
|
---|
2 | <head>
|
---|
3 | <meta charset="UTF-8"/>
|
---|
4 | <meta name="viewport" content="width=device-width, initial-scale=1"/>
|
---|
5 | <title>Register</title>
|
---|
6 | <!-- Bootstrap core CSS -->
|
---|
7 | <link href="css/bootstrap.min.css" rel="stylesheet"/>
|
---|
8 | <link href="css/login.css" rel="stylesheet"/>
|
---|
9 | <meta name="theme-color" content="#7952b3"/>
|
---|
10 | </head>
|
---|
11 | <body class="text-center">
|
---|
12 | <header th:replace="common/navbar :: navbar"></header>
|
---|
13 | <main class="form-signin">
|
---|
14 | <form th:action="@{/register}" method="post">
|
---|
15 | <h1 class="h3 mb-3 fw-normal">Register</h1>
|
---|
16 |
|
---|
17 | <div class="form-floating">
|
---|
18 | <input type="text" class="form-control" th:classappend="${nameError} ? is-invalid" id="floatingFirstName" placeholder="First Name" name="firstName" required>
|
---|
19 | <label for="floatingFirstName">First Name</label>
|
---|
20 | </div>
|
---|
21 | <div class="form-floating">
|
---|
22 | <input type="text" class="form-control" th:classappend="${nameError} ? is-invalid" id="floatingLastName" placeholder="Last Name" name="lastName" required>
|
---|
23 | <label for="floatingLastName">Last Name</label>
|
---|
24 | <div class="invalid-feedback">
|
---|
25 | Firstname and lastname are required
|
---|
26 | </div>
|
---|
27 | </div>
|
---|
28 | <div class="form-floating">
|
---|
29 | <input type="email" class="form-control" th:classappend="${emailError} ? is-invalid" id="floatingInput" placeholder="name@example.com" name="email" required>
|
---|
30 | <label for="floatingInput">Email address</label>
|
---|
31 | <div class="invalid-feedback">
|
---|
32 | Email not valid.
|
---|
33 | </div>
|
---|
34 | </div>
|
---|
35 | <div class="form-floating">
|
---|
36 | <input type="password" class="form-control" th:classappend="${passwordError} ? is-invalid" id="floatingPassword" placeholder="Password" name="password" required>
|
---|
37 | <label for="floatingPassword">Password</label>
|
---|
38 | </div>
|
---|
39 | <div class="form-floating">
|
---|
40 | <input type="password" class="form-control" th:classappend="${passwordError} ? is-invalid" id="floatingConfirmPassword" placeholder="Confirm Password" name="confirmPassword" required>
|
---|
41 | <label for="floatingConfirmPassword">Confirm Password</label>
|
---|
42 | <div class="invalid-feedback">
|
---|
43 | Password does not match
|
---|
44 | </div>
|
---|
45 | </div>
|
---|
46 |
|
---|
47 | <button class="w-100 btn btn-lg btn-primary" type="submit">Register</button>
|
---|
48 | </form>
|
---|
49 | <p th:if="${userExists}" class="text-danger">User already exists</p>
|
---|
50 | <div th:if="${success}" class="text-success">
|
---|
51 | <p>Registration successful</p>
|
---|
52 | <p>Please check your registered email for email verification</p>
|
---|
53 | </div>
|
---|
54 | </main>
|
---|
55 | <script src="/js/bootstrap.min.js"></script>
|
---|
56 | </body>
|
---|
57 | </html> |
---|