-
Notifications
You must be signed in to change notification settings - Fork 0
/
details.html
108 lines (92 loc) · 3.14 KB
/
details.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>EasyKey</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="assets/manifest.json" />
<link rel="stylesheet" href="assets/bootstrap.min.css">
</head>
<body>
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand" href="#">EasyKey - Add Details</a>
</nav>
<br><br>
<div class="container">
<div class="form-group">
<label for="aadhar">Aadhar</label>
<input type="number" class="form-control" id="aadhar" placeholder="Aadhar Number">
</div>
<div class="form-group">
<label for="pan">PAN</label>
<input type="text" class="form-control" id="pan" placeholder="Pan Number">
</div>
<div class="form-group">
<label for="upi">UPI VPA</label>
<input type="text" class="form-control" id="upi" placeholder="abhinav@okaxis">
</div>
<br>
<button class="btn btn-success btn-block btn-lg" id="next">Next</button>
</div>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
}
</script>
<script src="https://www.gstatic.com/firebasejs/5.9.4/firebase.js"></script>
<script src="https://code.jquery.com/jquery-3.4.0.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyAc9SAym94EeJbciccRESpgNm4WISzl-GM",
authDomain: "easykey-53a02.firebaseapp.com",
databaseURL: "https://easykey-53a02.firebaseio.com",
projectId: "easykey-53a02",
storageBucket: "",
messagingSenderId: "1096893639801"
};
firebase.initializeApp(config);
var db = firebase.database();
</script>
<script src="assets/main.js"></script>
<script>
function validate(){
var aadhar = $("#aadhar").val();
var pan = $("#pan").val();
var upi = $("#upi").val();
if (aadhar.length != 12){
alert("Aadhar should have 12 digits");
$("#aadhar").focus();
return false;
}
if (pan.length!=10){
alert("PAN should have 10 digits");
$("#pan").focus();
return false;
}
if (upi.indexOf("@") < 0){
alert("Please enter valid UPI ID");
$("#upi").focus();
return false;
}
return true;
}
$("#next").click(function(){
var username = localStorage.getItem("signup_username");
var aadhar = $("#aadhar").val();
var pan = $("#pan").val();
var upi = $("#upi").val();
if (validate()==true){
db.ref("users/" + username).update({
"aadhar" : aadhar,
"pan" : pan,
"upi" : upi
});
window.location.href = "address.html";
}
});
</script>
</body>
</html>