summaryrefslogtreecommitdiffhomepage
path: root/backend/src/main/resources/templates/auth/register.html
blob: 89153e25acad9bc1a1c7f435c9068125e4f226d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="https://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout}"
>
<body layout:fragment="content">

<div class="flex justify-center bg-white p-12">
    <div th:if="${param.fail}" class="text-xl p-4 bg-black text-red-500">Username or Email already exists</div>
    <form th:action="@{/register/save}" th:object="${user}" role="form" method="post" class="w-full max-w-lg">
        <div class="flex flex-wrap -mx-3 mb-6">
            <div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
                <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2"
                       for="username">
                    Title
                </label>
                <input class="appearance-none block w-full bg-gray-200 text-gray-700 border rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white"
                       id="username"
                       type="text"
                       name="username"
                       th:field="*{username}"
                       placeholder="Ted">
                <p th:if="${#fields.hasErrors('username')}" th:errors="*{username}" class="text-red-500 text-xs italic">
                    Please fill out this field.</p>
            </div>
            <div class="w-full md:w-1/2 px-3">
                <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2"
                       for="email">
                    Email
                </label>
                <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
                       id="email"
                       type="text"
                       name="email"
                       th:field="*{email}"
                       placeholder="[email protected]">
                <p th:if="${#fields.hasErrors('email')}" th:errors="*{email}" class="text-red-500 text-xs italic">Please
                    fill out this field.</p>
            </div>
        </div>
        <div class="flex flex-wrap -mx-3 mb-6">
            <div class="w-full px-3">
                <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2"
                       for="password">
                    Password
                </label>
                <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
                       id="password"
                       type="password"
                       name="password"
                       th:field="*{password}"
                       placeholder="Doe">
                <p th:if="${#fields.hasErrors('password')}" th:errors="*{password}" class="text-red-500 text-xs italic">
                    Please fill out this field.</p>
            </div>
        </div>
        <div class="flex flex-wrap mb-2">
        </div>
        <button th:href="@{/register}" type="submit"
                class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Register
        </button>

    </form>
</div>

</body>
</html>