forked from icp049/GoogleWallet_php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
95 lines (93 loc) · 3.08 KB
/
index.html
File metadata and controls
95 lines (93 loc) · 3.08 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
<!DOCTYPE html>
<html>
<head>
<title>Google Wallet</title>
<meta charset="UTF-8">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script>
window.addEventListener('load', function() {
document.getElementById('form').addEventListener('submit', function(e) {
e.preventDefault();
const formData = new FormData(this);
try {
fetch('wallet.php', {
method: 'POST',
body: formData
}).then(function(res) {
if (!res.ok) {
console.error('Network response was not ok:', res.statusText);
}
return res.text();
}).then(function(saveUrl) {
window.location.href = saveUrl;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:', error);
});
} catch (e) {
window.setTimeout(() => window.location.reload(), 1000);
}
});
});
</script>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
.container {
max-width: 600px;
margin: auto;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"] {
width: 100%;
padding: 8px;
box-sizing: border-box;
}
button {
padding: 10px 15px;
background-color: #007BFF;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.entries {
margin-top: 20px;
}
</style>
<meta name="google-signin-client_id" content="">
</head>
<body>
<div id="content">
<div class="container">
<h1>create a wallet card.</h1>
<form id="form" action="wallet.php" method="post">
<div class="form-group">
<label for="form_firstName">firstname:</label>
<input type="text" id="form_firstName" name="form_firstName">
</div>
<div class="form-group">
<label for="form_lastName">lastname:</label>
<input type="text" id="form_lastName" name="form_lastName">
</div>
<div class="form-group">
<label for="form_school">school:</label>
<input type="text" id="form_school" name="form_school">
</div>
<div class="form-group">
<input type="image" src="config/wallet-button.png" alt="Create pass" id="submitImage" style="width: 200px; cursor: pointer;">
</div>
</form>
</div>
</div>
</body>
</html>