-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
83 lines (79 loc) · 3.55 KB
/
index.html
File metadata and controls
83 lines (79 loc) · 3.55 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
{% extends "_base.html" %}
{% load static %}
{% block head_title %}Home{% endblock %}
{% block content %}
<div class="w-full max-w-xs mx-auto">
<form class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 border border-blue-300"
method="POST">
{% csrf_token %}
<h1 class="font-bold text-xl mb-2 text-center">Reward Me!</h1>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="id_login">
Mobile Number
</label>
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:ring"
type="tel"
name="username"
id="id_login"
pattern="[6789][0-9]{9}"
maxlength="10"
type="text"
placeholder="Mobile Number" required autofocus
oninvalid="this.setCustomValidity('Please enter valid phone number')"
onchange="try{setCustomValidity('')}catch(e){}"
{% if mobile %}
value="{{ mobile }}"
{% endif %}
>
<br><br>
{% include "specific_field.html" with field=form.product_type %}
{% include "specific_field.html" with field=form.invoice_amount %}
</div>
<label class="text-gray-700 text-sm font-bold mb-2" for="redeem_points">
<input
class="ml-3"
type="checkbox"
id="redeem_points"
name="redeem_points"
value="redeem_points"
{% if redeem_points %}
checked
{% endif %}
>
Redeem Points
</label>
<br><br>
{% if otp_enabled %}
{% if submit_otp %}
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2" for="id_otp">
OTP
</label>
<label for="id_otp"></label>
<input
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:ring"
type="text" name="otp" minlength="6" maxlength="6" id="id_otp" placeholder="OTP" required
oninvalid="this.setCustomValidity('Please enter valid OTP')"
onchange="try{setCustomValidity('')}catch(e){}"
>
</div>
{% if form.errors %}
{% for error in form.non_field_errors %}
<p class="text-red-500 text-xs italic mt-8">{{ error }}</p>
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
<div class="flex justify-center items-center">
<button class="bg-blue-700 hover:bg-blue-500 text-white font-bold py-2 px-4 mt-3 rounded focus:outline-none focus:ring"
type="submit">
{% if submit_otp and otp_enabled %}
Submit OTP
{% else %}
Submit
{% endif %}
</button>
</div>
</form>
</div>
{% endblock %}