source: src/main/resources/templates/register.html@ 8b875e6

Last change on this file since 8b875e6 was 8b875e6, checked in by ppaunovski <paunovskipavel@…>, 7 months ago

Added roles to Users and some minor changes

  • Property mode set to 100644
File size: 2.2 KB
Line 
1<div xmlns:th="http://www.thymeleaf.org">
2
3 <div class="container mb-4">
4 <form class="form-signin mt-xl-5" method="post" action="/register">
5 <h2 class="form-signin-heading">Register</h2>
6 <p>
7 <label for="username" class="sr-only">Email</label>
8 <input type="text" id="username" name="email" class="form-control" placeholder="Email" required="" autofocus="">
9 </p>
10 <p>
11 <label for="password" class="sr-only">Password</label>
12 <input type="password" id="password" name="password" class="form-control" placeholder="Password" required="">
13 </p>
14 <p>
15 <label for="repeatedPassword" class="sr-only">Repeat Password</label>
16 <input type="password" id="repeatedPassword" name="confirmPassword" class="form-control" placeholder="Repeat Password" required="">
17 </p>
18 <p>
19 <label for="name" class="sr-only">Name</label>
20 <input type="text" id="name" name="name" class="form-control" placeholder="Name" required="" autofocus="">
21 </p>
22 <p>
23 <label for="surname" class="sr-only">Address</label>
24 <input type="text" id="surname" name="address" class="form-control" placeholder="Address" required="" autofocus="">
25 </p>
26 <p>
27 <label for="phone" class="sr-only">Phone</label>
28 <input type="text" id="phone" name="phone" class="form-control" placeholder="Phone" required="" autofocus="">
29 </p>
30
31<!-- <p sec:authorize="hasRole('ROLE_ADMIN')">-->
32 <label for="role" class="sr-only">Role</label>
33 <select name="role" id="role">
34 <option th:each="role : ${roles}"
35 th:text="${role.name()}"
36 th:value="${role}" ></option>
37 </select>
38<!-- </p>-->
39
40 <p sec:authorize="hasRole('ROLE_ADMIN')">
41 <label for="salary" class="sr-only">Salary</label>
42 <input type="number" id="salary" name="salary">
43 </p>
44
45
46
47
48 <th:block th:if="${hasError}">
49 <div th:text="${error}" class="text-danger"></div>
50 </th:block>
51
52 <button class="btn btn-lg btn-primary btn-block" type="submit">Sign up</button>
53 </form>
54 <a href="/login" class="btn btn-block btn-light">Already have an account? Login here!</a>
55 </div>
56
57</div>
Note: See TracBrowser for help on using the repository browser.