-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
512 lines (406 loc) · 22.5 KB
/
index.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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>APL 2019 Registeration Form</title>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<!-- Font Icon -->
<link rel="stylesheet" href="fonts/material-icon/css/material-design-iconic-font.min.css">
<link rel="stylesheet" href="vendor/nouislider/nouislider.min.css">
<!-- Main css -->
<link rel="stylesheet" href="css/style.css">
<script>
const getBaseUrl = async () => {
const getBase64 = file => {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
};
try {
const file = document.querySelector('input[type="file"]').files[0];
const fileName = file.name;
const fileExt = fileName.split('.').pop();
const data = (await getBase64(file)).split(",")[1];
console.log(data);
document.getElementById('base64Image').value = data + "." + fileExt;
} catch (error) {
console.log(error);
alert("Invalid image. Please select a valid image");
}
}
</script>
</head>
<body>
<!-- LOADER STARTS-->
<div class="ng-scope" id="loader">
<div class="lds-ball">
<div>
</div>
</div>
</div>
<!--LOADER ENDS-->
<style>
.readonly {
background-color: #EBEBEB;
}
</style>
<div class="main">
<div class="container">
<div class="signup-content">
<div class="signup-img">
<img style="box-shadow: 10px 0px 30px gray;" src="images/form-img1.jpg" alt="">
<div class="signup-img-content">
<h2>Register now </h2>
<p>while seats are available!</p>
</div>
</div>
<div class="signup-form">
<center>
<img class="img-responsive" style="margin: 15px 15px" src="images/apl_logo.png" class="img"
width="10%">
<h1 style="color: #f45a00"><i>WELCOME TO <U style="color:#D04D01;">#APL2019</U> REGISTRATIONS!</i></h1>
<h3>(Hindu Gujarati Cricket Tournament)</h3>
</center>
<!--
<div class="form-group">
<div class="form-input" style="padding: 9px 10px 9px 10px">
<label class="form-link" style="text-align: justify;"><u style="color: red;">Please note:</u>
The ratings provided by you are considered to be the exact level at which you consider your
gameplay. Captains during the auction will bid for you based on the ratings you provide. So
please make sure the ratings are done seriously in order to enjoy the tournament. Also
please provide a picture where the face is clearly visible. Thank you for your
understanding.</label>
</div>
</div>
-->
<form method="POST" class="register-form" id="register-form">
<div class="form-row">
<div class="form-group">
<div class="form-input">
<label for="first_name" class="required">First name</label>
<input type="text" name="first_name" id="first_name" autocomplete="off" required/>
</div>
<div class="form-input">
<label for="last_name" class="required">Last name</label>
<input type="text" name="last_name" id="last_name" autocomplete="off" required/>
</div>
<div class="form-input">
<label for="email" class="required">Email</label>
<input type="email" name="email" id="email" autocomplete="off" required/>
</div>
<div class="form-input">
<label for="phone_number" class="required">Phone number</label>
<input type="text" name="phone_number" id="phone_number" maxlength="12" required
placeholder="xxx-xxx-xxxx" autocomplete="off" required>
</div>
<div id="locationField">
<div class="form-input">
<label for="address" class="required">Enter your address</label>
<input type="text" name="address" onFocus="geolocate()" id="autocomplete"
placeholder="Enter your address" autocomplete="off" required>
</div>
</div>
</div>
<div class="form-group">
<!-- start -->
<div class="form-input">
Street address
<input class="field readonly" id="street_number" disabled="true" required readonly/>
<input class="field readonly" id="route" required readonly/><br>
City
<input class="field readonly" id="locality" required readonly/><br>
State
<input class="field readonly" id="administrative_area_level_1" required readonly/><br>
Zip code
<input class="field readonly" id="postal_code" required readonly/>
Country
<input class="field readonly" id="country" required readonly/><br>
<!-- end -->
</div>
</div>
</div>
<a class="form-link" style="color: red; text-align: justify;">THE RATINGS PROVIDED BY YOU ARE
CONSIDERED TO BE THE EXACT LEVEL AT WHICH YOU CONSIDER YOUR GAMEPLAY. CAPTAINS DURING THE
AUCTION WILL BID FOR YOU BASED ON THE RATINGS YOU PROVIDE. SO PLEASE MAKE SURE THE RATINGS ARE
DONE SERIOUSLY IN ORDER TO ENJOY THE TOURNAMENT. THANK YOU FOR YOUR UNDERSTANDING.</a>
<br><br>
<label class="form-link" style="color: red; text-align: justify;">Ratings 0 to 3 -> Beginner</label>
<label class="form-link" style="color: red; text-align: justify;">Ratings 4 to 5 -> Intermediate</label>
<label class="form-link" style="color: red; text-align: justify;">Ratings 6 to 8 -> Advanced</label>
<label class="form-link" style="color: red; text-align: justify;">Ratings 9 to 10 -> Expert</label>
<div class="batting">
<label class="required">Tell us about your batting skills</label>
<div class="skill_slider ui-slider ui-slider-horizontal">
<div id="slider-margin"></div>
<span class="donate-value" id="batting_value"></span>
</div>
<br>
<input type="text" class="required" name="battingComments" id="battingComments" maxlength="150"
placeholder="Please describe your Batting skills" autocomplete="off" required>
</div>
<div class="batting">
<label class="required">Tell us about your bowling skills</label>
<div class="skill_slider ui-slider ui-slider-horizontal">
<div id="slider-margin1"></div>
<span class="donate-value1" id="bowling_value"></span>
</div>
<br>
<input type="text" class="required" name="bowlingComments" id="bowlingComments" maxlength="150"
placeholder="Please describe your Bowling skills" autocomplete="off" required>
</div>
<div class="batting">
<label class="required">Tell us about your fielding skills</label>
<div class="skill_slider ui-slider ui-slider-horizontal">
<div id="slider-margin2"></div>
<span class="donate-value2" id="fielding_value"></span>
</div>
<br>
<input type="text" class="required" name="fieldingComments" id="fieldingComments"
maxlength="150" placeholder="Please describe your Fielding skills" autocomplete="off"
required>
</div>
<div class="form-row">
<div class="form-group">
<div class="form-input">
<label for="chequeno" class="required">Jersey Number (0 to 99)</label>
<a class="form-link" style="color: red">Select your desired number on your jersey.</a>
<input type="number" name="chequeno" id="chequeno" maxlength=2 min="0" max="99"
onInput="if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
required/>
</div>
</div>
<div class="form-group">
<div class="form-input">
<div class="form-select">
<div class="label-flex">
<label for="jerseySize" class="required">Jersey Size</label>
</div>
<a class="form-link" style="color: red">Select the size carefully because it won't
change later.</a>
<div class="select-list" class="required">
<select name="jerseySize" id="jerseySize" class="required">
<option value="selectSize">Select Final Size</option>
<option value="small" id="small" selected="selected">Small</option>
<option value="medium" id="medium">Medium</option>
<option value="large" id="large">Large</option>
<option value="xlarge" id="xlarge">XLarge</option>
<option value="2xlarge" id="2xlarge">2XLarge</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-radio">
<div class="label-flex">
<label for="payment" class="required">I am sending <b style="color: red;"><u>$40</u></b>
APL Seva to</label>
</div>
<div class="form-radio-group">
<div class="form-radio-item">
<input type="radio" name="payment" id="cash2"
onclick="onClick('#p2', 'saralpatel21@gmail.com')">
<label for="cash2">saralpatel21@gmail.com</label>
<p id="p2">saralpatel21@gmail.com</p>
<span class="check"></span>
</div>
<div class="form-radio-item">
<input type="radio" name="payment" id="cash3"
onclick="onClick('#p3', 'saurabhjain3699@gmail.com')">
<label for="cash3">saurabhjain3699@gmail.com</label>
<p id="p3">saurabhjain3699@gmail.com</p>
<span class="check"></span>
</div>
</div>
</div>
<script>
const onClick = (elementId, emailId) => {
copyToClipboard(elementId);
document.getElementById("sevaCollectorEmail").value = emailId;
};
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
alert("You have successfully copied the Email for Interac. You can open your Bank App and paste it there.");
}
</script>
</div>
<div class="form-group">
<div class="form-input">
<label for="refName" class="required">Reference Name:</label>
<input type="text" name="refName" placeholder="Who referred you for APL?" id="refName" maxlength="25" autocomplete="off" required/>
</div>
</div>
<div class="form-group">
<label class="required">Select your profile picture:</label>
<input type="file" name="myImage" accept="image/*" onchange="getBaseUrl();"/>
<br>
<div class="form-submit">
<input type="submit" value="Submit" class="submitReset" id="submit" name="submit"/>
<input type="reset" value="Reset" class="submitReset" id="reset" name="reset"/>
</div>
</div>
<input type="text" id="base64Image" style="display: none;">
<input type="text" id="sevaCollectorEmail" style="display: none;">
</form>
<!-- MODAL -->
<!-- Success Modal -->
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2 style="color:green;">Thank you for Registering!</h2>
<h4>
<div id="successModalMessage">You have 10 days to send the seva amount in order to confirm
your registration, or else it would be transferred to the first person in the waiting
list.
<br>
Jai Swaminarayan! :)
</div>
</h4>
</div>
</div>
<!-- Fail Modal -->
<div id="myModal1" class="modal">
<div class="modal-content">
<span class="close1">×</span>
<h2 style="color:red;">Please try again!</h2>
<h4>
<div id="failModalMessage"></div>
</h4>
</div>
</div>
<script>
let modal = document.getElementById('myModal');
let span = document.getElementsByClassName("close")[0];
span.onclick = function () {
closeModal();
};
window.onclick = function (event) {
if (event.target === modal) {
closeModal();
}
};
const closeModal = () => {
modal.style.display = "none";
document.getElementById("reset").click();
};
let modal1 = document.getElementById('myModal1');
let span1 = document.getElementsByClassName("close1")[0];
span1.onclick = function () {
modal1.style.display = "none";
};
window.onclick = function (event) {
if (event.target === modal1) {
modal1.style.display = "none";
}
};
</script>
</div>
</div>
</div>
</div>
<!-- JS -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/nouislider/nouislider.min.js"></script>
<script src="vendor/wnumb/wNumb.js"></script>
<script src="vendor/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="vendor/jquery-validation/dist/additional-methods.min.js"></script>
<script src="js/main.js"></script>
<!-- Phone Number -->
<script>
$(function () {
$('#phone_number').keydown(function (e) {
var key = e.charCode || e.keyCode || 0;
$text = $(this);
if (key !== 8 && key !== 9) {
if ($text.val().length === 3) {
$text.val($text.val() + '-');
}
if ($text.val().length === 7) {
$text.val($text.val() + '-');
}
}
return (key === 8 || key === 9 || key === 46 || (key >= 48 && key <= 57) || (key >= 96 && key <= 105));
})
});
</script>
<!-- Phone Number End -->
<!-- Google Address -->
<script>
// This sample uses the Autocomplete widget to help the user select a
// place, then it retrieves the address components associated with that
// place, and then it populates the form fields with those details.
// This sample requires the Places library. Include the libraries=places
// parameter when you first load the API. For example:
// <script
// src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places">
$("input, select, textarea").attr("autocomplete", "disable");
var placeSearch, autocomplete;
var componentForm = {
street_number: 'short_name',
route: 'long_name',
locality: 'long_name',
administrative_area_level_1: 'short_name',
country: 'long_name',
postal_code: 'short_name'
};
function initAutocomplete() {
// Create the autocomplete object, restricting the search predictions to
// geographical location types.
autocomplete = new google.maps.places.Autocomplete(
document.getElementById('autocomplete'), {types: ['geocode']});
// Avoid paying for data that you don't need by restricting the set of
// place fields that are returned to just the address components.
autocomplete.setFields('address_components');
// When the user selects an address from the drop-down, populate the
// address fields in the form.
autocomplete.addListener('place_changed', fillInAddress);
}
function fillInAddress() {
// Get the place details from the autocomplete object.
var place = autocomplete.getPlace();
for (var component in componentForm) {
document.getElementById(component).value = '';
document.getElementById(component).disabled = false;
}
// Get each component of the address from the place details,
// and then fill-in the corresponding field on the form.
for (var i = 0; i < place.address_components.length; i++) {
var addressType = place.address_components[i].types[0];
if (componentForm[addressType]) {
var val = place.address_components[i][componentForm[addressType]];
document.getElementById(addressType).value = val;
}
}
}
// Bias the autocomplete object to the user's geographical location,
// as supplied by the browser's 'navigator.geolocation' object.
function geolocate() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
var geolocation = {
lat: position.coords.latitude,
lng: position.coords.longitude
};
var circle = new google.maps.Circle(
{center: geolocation, radius: position.coords.accuracy});
autocomplete.setBounds(circle.getBounds());
});
}
}
</script>
<!-- Google Address ends -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCF87lwnuKE1D2GbIEV2n7NRe4BUyxU8WE&libraries=places&callback=initAutocomplete"
async defer></script>
</body>
</html>