login.pt
10.8 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<!DOCTYPE html>
<html lang="en" tal:define="home request.home;">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link
rel="icon"
type="image/svg+xml"
href="${home}/static/landing/favicon.svg"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="${home}/static/landing/css/style.css" />
<!-- <title>Masuk - Pajak Online - Kota Tangerang Selatan</title> -->
<title tal:content="request.title" />
</head>
<body
class="font-urbanist m-0 min-h-screen min-w-[320px] bg-[#ffffff] text-lg text-[#213547]"
>
<section class="flex min-h-screen items-center justify-center bg-gray-50">
<!-- login container -->
<div
class="flex max-w-3xl items-center rounded-2xl bg-gray-100 p-2 shadow-lg"
>
<!-- form -->
<div class="px-6 py-5 md:w-1/2 md:px-8">
<a href="/"
><img
src="${home}/static/landing/img/logo-text.png"
alt="logo"
class="mb-10 flex h-12"
/></a>
<h2 class="text-2xl font-bold text-[#002D74]">Masuk</h2>
<p class="mt-4 text-sm text-[#002D74]">
Silahkan masuk dengan username dan password akun Anda.
</p>
<form
id="deform"
method="POST"
enctype="multipart/form-data"
accept-charset="utf-8"
class="flex flex-col gap-4"
>
<input type="hidden" name="_charset_" />
<input type="hidden" name="__formid__" value="deform" />
<div tal:condition="request.session.peek_flash()">
<div
class="bg-green-200 text-green-800 px-4 py-3 rounded relative"
tal:repeat="message request.session.pop_flash()"
>
<i class="fa fa-fw fa-lg fa-check-circle"></i> ${message}
</div>
</div>
<div tal:condition="request.session.peek_flash('error')">
<div
class="bg-red-200 text-red-800 px-4 py-3 rounded relative"
tal:repeat="message request.session.pop_flash('error')"
>
<i class="fa fa-fw fa-lg fa-times-circle"></i> ${message}
</div>
</div>
<input
class="mt-8 rounded-sm border p-2 text-base"
type="text"
name="username"
id="username"
placeholder="Username"
/>
<div class="relative">
<input
class="w-full rounded-md border p-2 text-base"
type="password"
name="password"
placeholder="Password"
id="password"
/>
<div>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="gray"
class="bi bi-eye absolute top-1/2 right-3 -translate-y-1/2 cursor-pointer"
viewBox="0 0 16 16"
id="show_password"
onclick="javascript:changeInputType()"
>
<path
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"
/>
<path
d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"
/>
</svg>
</div>
<div>
<svg
viewBox="0 0 24 24"
width="16"
height="16"
xmlns="http://www.w3.org/2000/svg"
class="hidden bi bi-eye-close absolute top-1/2 right-3 -translate-y-1/2 cursor-pointer"
id="hide_password"
onclick="javascript:changeInputType()"
>
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g
id="SVGRepo_tracerCarrier"
stroke-linecap="round"
stroke-linejoin="round"
></g>
<g id="SVGRepo_iconCarrier">
<path
stroke="#666666"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M3 10a13.358 13.358 0 0 0 3 2.685M21 10a13.358 13.358 0 0 1-3 2.685m-8 1.624L9.5 16.5m.5-2.19a10.59 10.59 0 0 0 4 0m-4 0a11.275 11.275 0 0 1-4-1.625m8 1.624.5 2.191m-.5-2.19a11.275 11.275 0 0 0 4-1.625m0 0 1.5 1.815M6 12.685 4.5 14.5"
></path>
</g>
</svg>
</div>
</div>
<section tal:condition="'captcha' in form">
<div tal:define="field form['captcha']">
${structure:field.serialize()}
</div>
</section>
<section tal:condition="'csrf_token' in form">
<div tal:define="field form['csrf_token']" style="display: none">
${structure:field.serialize()}
</div>
</section>
<button
type="submit"
id="login-btn"
name="login"
class="button rounded-md bg-[#002D74] py-2 text-white duration-300 hover:scale-105"
>
Masuk
</button>
<section>
<input
id="provider_name"
type="hidden"
name="provider_name"
class="form-control"
/>
<input
id="id_token"
type="hidden"
name="id_token"
class="form-control"
/>
<input type="hidden" name="next" value="${home}" />
</section>
</form>
<div class="mt-6 grid grid-cols-3 items-center text-gray-400">
<hr class="border-gray-400" />
<p class="text-center text-sm">ATAU</p>
<hr class="border-gray-400" />
</div>
<button
class="mt-5 flex w-full items-center justify-center rounded-md border bg-white py-2 text-sm text-[#002D74] duration-300 hover:scale-105"
>
<svg
class="mr-3"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 48 48"
width="25px"
>
<path
fill="#FFC107"
d="M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"
/>
<path
fill="#FF3D00"
d="M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"
/>
<path
fill="#4CAF50"
d="M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"
/>
<path
fill="#1976D2"
d="M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"
/>
</svg>
Masuk dengan akun Google
</button>
<div
class="mt-5 flex items-center justify-between border-b border-[#002D74] py-4 text-sm text-[#002D74]"
>
<p>Lupa password?</p>
<a
href="${home}/reset-password"
class="rounded-full border bg-white px-5 py-1 duration-300 hover:scale-110"
>Reset Password</a
>
</div>
<div
class="mt-3 flex items-center justify-between text-sm text-[#002D74]"
>
<p>Belum punya akun?</p>
<a
href="${home}/register"
class="rounded-full border bg-white px-5 py-1 duration-300 hover:scale-110"
>
Daftar
</a>
</div>
</div>
<!-- image -->
<div
class="hidden w-1/2 items-center justify-center rounded-2xl bg-radial-[at_75%_25%] from-[#0184b0] to-[#faaf18] to-75% md:block"
>
<img
class="rounded-2xl"
src="${home}/static/landing/img/login-hero.png"
/>
</div>
</div>
</section>
<script
type="text/javascript"
src="${home}/deform_static/scripts/jquery-2.0.3.min.js"
></script>
<script
type="text/javascript"
src="${home}/deform_static/scripts/bootstrap.min.js"
></script>
<script
type="text/javascript"
src="${home}/deform_static/scripts/deform.js"
></script>
<script
tal:condition="request.google_signin_client_id"
src="https://accounts.google.com/gsi/client"
async
defer
></script>
<script tal:condition="request.google_signin_client_id">
window.onload = function (e) {
const value = document.cookie;
const parts = value.split(`g_state=`);
if (parts.length === 2) {
document.cookie = document.cookie + ";max-age=0";
}
};
function onSignIn(googleUser) {
document.getElementById("provider_name").value = "google";
document.getElementById("id_token").value = JSON.stringify(googleUser);
document.getElementById("deform").submit();
}
const form = document.querySelector("form");
form.addEventListener("keydown", (event) => {
if (event.key === "Enter") {
event.preventDefault();
form.submit();
}
});
</script>
<script>
function changeInputType() {
const inputElement = document.getElementById("password");
if (inputElement.type === "password") {
inputElement.type = "text";
document.getElementById("hide_password").classList.remove("hidden");
document.getElementById("show_password").classList.add("hidden");
} else {
inputElement.type = "password";
document.getElementById("hide_password").classList.add("hidden");
document.getElementById("show_password").classList.remove("hidden");
}
}
</script>
</body>
</html>