-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdonate.html
271 lines (255 loc) · 8.09 KB
/
donate.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400,500&family=Ruda:wght@500&display=swap"
rel="stylesheet"
/>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="css/donate.css" />
<title>Balika - Donate</title>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/email.min.js"
></script>
</head>
<body>
<!-- navbar section -->
<div id="nav-placeholder"></div>
<!-- banner image -->
<!-- <div class="hero-Img"> -->
<!-- <div class="header-container"> -->
<!-- <h1><span> Donate </span></h1> -->
<!-- </div> -->
<!-- </div> -->
<div
class="container-fluid donate-wrapper d-flex justify-content-center align-items-end"
>
<h1 class="text-center text-white mt-5 py-5">Sponsor a Balika</h1>
</div>
<!-- donate form -->
<div class="container donate-form-wrapper my-5 p-5">
<form id="donate-form" method="post" name="google-sheet">
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputFirstName" class="balika-blue">First Name</label>
<input
type="text"
class="form-control"
id="inputFirstName"
name="first_name"
placeholder="John"
/>
</div>
<div class="form-group col-md-6">
<label for="inputLastName" class="balika-blue">Last Name</label>
<input
type="text"
class="form-control"
id="inputLastName"
name="last_name"
placeholder="Doe"
/>
</div>
</div>
<div class="form-group">
<label for="inputAmount">Amount</label>
<input
type="number"
class="form-control"
id="inputAmount"
name="donation_amount"
placeholder="$24,000"
/>
</div>
<div class="form-group">
<label for="inputEmail">Email</label>
<input
type="email"
class="form-control"
id="inputEmail"
name="user_email"
placeholder="[email protected]"
/>
</div>
<div class="form-group">
<label for="inputAddress">Address</label>
<input
type="text"
class="form-control"
id="inputAddress"
name="user_address"
placeholder="Malwani, Mumbai"
/>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputCountry">Country</label>
<input
type="text"
class="form-control"
name="user_country"
id="inputCountry"
/>
</div>
<div class="form-group col-md-6">
<label for="inputState">State</label>
<input
type="text"
class="form-control"
name="user_state"
id="inputState"
/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputCity">City</label>
<input
type="text"
class="form-control"
name="user_city"
id="inputCity"
/>
</div>
<div class="form-group col-md-6">
<label for="inputPostal">Postal Code</label>
<input
type="number"
class="form-control"
name="user_postal_code"
id="inputPostal"
/>
</div>
</div>
<div class="form-group">
<label for="inputPhoneNumber">Phone Number</label>
<input
type="text"
class="form-control"
name="user_phone_number"
id="inputPhoneNumber"
/>
</div>
<label for="">Do you require 80G (tax exemption): </label>
<div class="form-check form-check-inline">
<input
class="form-check-input"
type="radio"
name="user_80g_exemption_bool"
id="inlineRadio1"
value="YES"
/>
<label class="form-check-label" for="inlineRadio1">Yes</label>
</div>
<div class="form-check form-check-inline">
<input
class="form-check-input"
type="radio"
name="user_80g_exemption_bool"
id="inlineRadio2"
value="NO"
checked
/>
<label class="form-check-label" for="inlineRadio2">No</label>
</div>
<div class="form-group my-3">
<div class="container w-100">
<div class="form-check text-center">
<input
class="form-check-input"
type="checkbox"
id="gridCheck"
name="check"
value="T&C agreed!"
/>
<label
class="form-check-label privacy-label"
for="gridCheck"
value="Yes"
>
I have read through the website's privacy policy and agree to
make a donation*
</label>
</div>
</div>
</div>
<div class="container text-center">
<button
type="submit"
id="submit_button"
class="btn btn-primary text-white px-5 py-3 submit submit-final"
disabled
>
Submit
</button>
</div>
</form>
</div>
<!-- footer section -->
<div id="footer-placeholder"></div>
<!-- rough work -->
<script>
// document.querySelector("#gridCheck").addEventListener("")
</script>
<!-- rough work -->
<!-- Optional JavaScript -->
<script>
// TO SUBMIT FORM DATA TO SHEET
const scriptURL =
"https://script.google.com/macros/s/AKfycbw4j3NwzcLtxCf3FCT_TOp9bUq-Yok9SzhES-ZFApS-ltbbe9RzcuM0/exec";
const form = document.forms["google-sheet"];
form.addEventListener("submit", (e) => {
e.preventDefault();
fetch(scriptURL, { method: "POST", body: new FormData(form) })
.then((response) =>
alert("Thank You For Your Interest. We Will Contact You Soon.")
)
.catch((error) => console.error("Error! Please Try Again", error.message));
});
//TO TOGGLE SUMBIT BUTTON.
var checkbox = document.querySelector("#gridCheck");
var submitBtn = document.querySelector("#submit_button");
checkbox.addEventListener("change", function () {
if (this.checked) {
submitBtn.disabled = false;
} else {
submitBtn.disabled = true;
}
});
</script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
crossorigin="anonymous"
></script>
<script>
$(function () {
$("#nav-placeholder").load("snippets/navbar.html");
});
$(function () {
$("#footer-placeholder").load("snippets/footer.html");
});
</script>
</body>
</html>