-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalp-form.html
More file actions
709 lines (639 loc) · 33.8 KB
/
alp-form.html
File metadata and controls
709 lines (639 loc) · 33.8 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
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description"
content="Ready to dive into the future of finance? Join ACC Academy and start your Web3 journey today with our expert-led courses and vibrant community. .">
<meta name="robots" content="index, follow">
<title>ACC Learn Program Registration | Arewa Crypto Community</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link
href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@300;400;500;600;700&display=swap"
rel="stylesheet">
<link rel="icon" href="imgs/favicon.png" type="image/png">
<link rel="stylesheet" href="css/registrationform.css">
<!-- <script src="js/registrationform.js"></script> -->
</head>
<body>
<!-- Quantum Grid Background -->
<div class="quantum-grid"></div>
<!-- Header -->
<header>
<div class="nav-container">
<a href="index.html" class="logo">
<img src="imgs/favicon.png" alt="ACC Logo" class="logo-img">
<span>A.</span>C.C <span></span>
</a>
<button class="mobile-menu-btn" id="mobileMenuBtn">
<i class="fas fa-bars"></i>
</button>
<ul class="nav-links" id="navLinks">
<li><a href="index.html#home">HOME</a></li>
<li><a href="index.html#mission">MISSION</a></li>
<li><a href="index.html#features">FEATURES</a></li>
<li><a href="index.html#events">EVENTS</a></li>
<li><a href="index.html#join">JOIN</a></li>
<li><a href="pfp-maker.html">PFP MAKER</a></li>
</ul>
</div>
</header>
<!-- Registration Section -->
<section class="registration">
<div class="registration-container">
<div class="registration-header">
<h2 class="section-title">ACC LEARN PROGRAM (Batch - 3)</h2>
<p class="section-subtitle">Join our Web3 education program and kickstart your journey into blockchain
technology</p>
</div>
<div class="registration-card">
<form id="academyForm">
<!-- Email Address -->
<div class="form-group">
<label for="email">FULL NAME <b style="color: red;">*</b></label>
<input type="fname" id="fname" class="form-control" required placeholder="Your Full Name">
</div>
<!-- Email Address -->
<div class="form-group">
<label for="email">EMAIL ADDRESS <b style="color: red;">*</b></label>
<input type="email" id="email" class="form-control" required placeholder="your@email.com">
</div>
<!-- State of Residence -->
<div class="form-group">
<label for="state">STATE OF RESIDENCE <b style="color: red;">*</b></label>
<select id="state" class="form-control" required>
<option value="" disabled selected>Select your state</option>
<option value="Abia">Abia</option>
<option value="Adamawa">Adamawa</option>
<option value="Akwa Ibom">Akwa Ibom</option>
<option value="Anambra">Anambra</option>
<option value="Bauchi">Bauchi</option>
<option value="Bayelsa">Bayelsa</option>
<option value="Benue">Benue</option>
<option value="Borno">Borno</option>
<option value="Cross River">Cross River</option>
<option value="Delta">Delta</option>
<option value="Ebonyi">Ebonyi</option>
<option value="Edo">Edo</option>
<option value="Ekiti">Ekiti</option>
<option value="Enugu">Enugu</option>
<option value="Gombe">Gombe</option>
<option value="Imo">Imo</option>
<option value="Jigawa">Jigawa</option>
<option value="Kaduna">Kaduna</option>
<option value="Kano">Kano</option>
<option value="Katsina">Katsina</option>
<option value="Kebbi">Kebbi</option>
<option value="Kogi">Kogi</option>
<option value="Kwara">Kwara</option>
<option value="Lagos">Lagos</option>
<option value="Nasarawa">Nasarawa</option>
<option value="Niger">Niger</option>
<option value="Ogun">Ogun</option>
<option value="Ondo">Ondo</option>
<option value="Osun">Osun</option>
<option value="Oyo">Oyo</option>
<option value="Plateau">Plateau</option>
<option value="Rivers">Rivers</option>
<option value="Sokoto">Sokoto</option>
<option value="Taraba">Taraba</option>
<option value="Yobe">Yobe</option>
<option value="Zamfara">Zamfara</option>
<option value="FCT">FCT Abuja</option>
</select>
</div>
<!-- Device Availability -->
<div class="form-group">
<label>DEVICE AVAILABILITY <b style="color: red;">*</b></label>
<div class="checkbox-group">
<label class="checkbox-label">
<input type="checkbox" name="device" value="android" onclick=" checkdevices()">
Mobile
</label>
<label class="checkbox-label">
<input type="checkbox" name="device" value="pc" onclick=" checkdevices()">
PC/Laptop
</label>
</div>
</div>
<!-- Preferred Course -->
<div class="form-group">
<label for="course">PREFERRED COURSE <b style="color: red;">*</b></label>
<select id="course" class="form-control" required>
<option value="" disabled selected>Select Device before Course</option>
<!-- <option value="course1">Course 1: Introduction to Blockchain</option>
<option value="course2">Course 2: Bitcoin Fundamentals</option>
<option value="course3">Course 3: Ethereum & Smart Contracts</option>
<option value="course4">Course 4: DeFi Mastery</option>
<option value="course5">Course 5: NFT Creation & Trading</option>
<option value="course6">Course 6: Crypto Trading Strategies</option>
<option value="course7">Course 7: Web3 Development Basics</option>
<option value="course8">Course 8: Blockchain Security</option> -->
</select>
</div>
<!-- Social Handles -->
<div class="form-group">
<label>SOCIAL HANDLES</label>
<div class="social-handles">
<div class="social-handle twitter">
<i class="fa"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
fill="currentColor" class="bi bi-twitter-x" viewBox="0 0 16 16">
<path
d="M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z" />
</svg></i> <b style="color: red;">*</b> <input type="text" class="form-control"
placeholder="Twitter username" required>
</div>
<div class="social-handle facebook">
<i class="fab fa-facebook"></i> <span
style="color: #888; font-size: 12px;">(optional)</span>
<input type="text" class="form-control" placeholder="Facebook username">
</div>
<div class="social-handle telegram">
<i class="fab fa-telegram"></i> <b style="color: red;">*</b>
<input type="text" class="form-control" placeholder="Telegram username" required>
</div>
<div class="social-handle discord">
<i class="fab fa-discord"></i> <span
style="color: #888; font-size: 12px;">(optional)</span>
<input type="text" class="form-control" placeholder="Discord username">
</div>
</div>
</div>
<!-- WhatsApp Number -->
<div class="form-group">
<label for="whatsapp">WHATSAPP NUMBER <b style="color: red;">*</b></label>
<input type="tel" id="whatsapp" class="form-control" required placeholder="+2348012345678">
</div>
<div class="terms-checkbox">
<label class="terms-label">
<input type="checkbox" id="termsCheckbox" required>
I agree to the <span class="terms-link" id="termsLink">Terms and Conditions</span>
</label>
</div>
<!-- Terms and Conditions Modal -->
<div class="terms-modal" id="termsModal">
<div class="terms-container">
<button class="terms-close" id="termsClose">×</button>
<h2 class="terms-title">TERMS AND CONDITIONS</h2>
<div class="terms-content">
<h3>Acceptance of Terms</h3>
<p>By joining the ACC Learn Program, you agree to be bound by these Terms and
Conditions. If
you do not agree with any part of these terms, you must not participate in the
program.</p>
<h3>Introduction</h3>
<p>All admitted students are expected to read and abide by the following rules and
regulations
throughout the duration of the program</p>
<h3>1. Attendance and Punctuality</h3>
<p>• Students are required to attend all classes regularly.
<br>
• A minimum of 70% attendance is required to remain enrolled in the program. Falling
below this threshold will result in disqualification and dismissal.
<br>
• Students must maintain at least 60% punctuality (i.e., being on time). Consistent
lateness below this threshold will also lead to disqualification and dismissal.
<br>
• Notify the management in advance if you anticipate being late or absent for any
reason
</p>
<h3>2. Respect and Behavior</h3>
<p>• Show respect to teachers, fellow students, and all ACC Learn property.
<br>
• Bullying, teasing, or the use of inappropriate language is strictly prohibited.
<br>
• Listen attentively when others are speaking.
<br>
• Raise your hand to speak or ask questions.
<br>
• Actively engage in class discussions, group work, and learning activities.
<br>
• Complete all assessments and projects on time and with diligence.
</p>
<h3>3. Academic Integrity</h3>
<p>• Cheating, plagiarism, and unauthorized copying are strictly forbidden.
<br>
• Submit only your own original work, unless the task is a designated group project.
<br>
• Properly cite any sources or references used in assignments or projects.
<br>
• Include relevant hashtags such as #ACC, #ACC_Learn, #Your_Teacher, etc., on all
assessments and project submissions, as instructed
</p>
</div>
<button class="terms-accept-btn" id="termsAccept">I Accept</button>
</div>
</div>
<!-- Social Media Links -->
<div class="social-connect">
<div class="social-header">
<i class="fas fa-bell"></i>
<h3>Stay Connected & Enable Notifications</h3>
</div>
<p class="social-subtext">Join our community channels to get the latest updates and
announcements</p>
<div class="btn-group">
<a href="https://t.me/acccommunitychannel" target="_blank" class="btn btn-telegram">
<i class="fab fa-telegram"></i> Telegram
</a>
<a href="https://discord.gg/3pJxBJVWZ4" target="_blank" class="btn btn-discord">
<i class="fab fa-discord"></i> Discord
</a>
<a href="https://x.com/acc_community" target="_blank" class="btn btn-twitter">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
viewBox="0 0 16 16">
<path
d="M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z" />
</svg>
Twitter/X
</a>
</div>
</div>
<!-- Submit Button -->
<div class="form-group">
<button type="submit" class="btn btn-primary" style="width: 100%;">
<i class="fa fa-user-plus" aria-hidden="true"></i> SUBMIT</button>
</div>
<div class="form-footer">
<p>We'll contact you via Email after reviewing your application</p>
</div>
</form>
</div>
</div>
</section>
<!-- Add this to your HTML (right before closing </body>) -->
<div class="acc-popup-overlay" id="formPopup">
<div class="acc-popup-container">
<div class="acc-popup-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#0fff9d">
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" />
</svg>
</div>
<div class="acc-popup-content">
<h3>Application Submitted Successfully!</h3>
<p>Thank you for joining ACC Learn Program. We've received your application and sent confirmation
details to your email.</p>
</div>
<button class="acc-popup-button" id="popupClose">
<span>Close</span>
</button>
</div>
</div>
<!-- Footer -->
<footer>
<div class="footer-container">
<div class="footer-col">
<div class="footer-logo">
<span>A</span>CC
</div>
<p class="footer-about">
The Arewa Crypto Community is empowering Northern Nigeria through blockchain education and
innovation, creating opportunities in the Web3 economy.
</p>
<div class="footer-social">
<a href="https://discord.gg/3pJxBJVWZ4" target="_blank" class="footer-social-link"><i
class="fab fa-discord"></i></a>
<a href="https://t.me/acccommunitychannel" target="_blank" class="footer-social-link"><i
class="fab fa-telegram"></i></a>
<a href="https://x.com/acc_community" target="_blank" class="footer-social-link"><i
class="fab fa-twitter"></i></a>
</div>
</div>
<div class="footer-col">
<h3 class="footer-title">QUICK LINKS</h3>
<ul class="footer-links">
<li><a href="index.html#home">Home</a></li>
<li><a href="index.html#mission">Our Mission</a></li>
<li><a href="index.html#features">Features</a></li>
<li><a href="index.html#events">Events</a></li>
<li><a href="index.html#join">Join Us</a></li>
</ul>
</div>
<div class="footer-col">
<h3 class="footer-title">RESOURCES</h3>
<ul class="footer-links">
<li><a href="pfp-maker.html">PFP Maker</a></li>
<li><a href="#">ACC Learn Program</a></li>
</ul>
</div>
<div class="footer-col">
<h3 class="footer-title">CONTACT US</h3>
<ul class="footer-links">
<li><a href="https://x.com/acc_community" target="_blank">Twitter</a></li>
<li><a href="https://t.me/acccommunitychannel" target="_blank">Telegram</a></li>
<li><a href="https://discord.gg/3pJxBJVWZ4" target="_blank">Discord</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>© 2025 AREWA CRYPTO COMMUNITY. ALL RIGHTS RESERVED.</p>
</div>
</footer>
<script>
checkdevices();
function checkdevices() {
const devices = document.querySelectorAll('input[name="device"]:checked');
const selectedDevices = Array.from(devices).map(d => d.value);
console.log('Selected devices:', selectedDevices);
if (selectedDevices.includes('android') && selectedDevices.includes('pc')) {
document.getElementById('course').innerHTML = `
<option value="" disabled selected>Select your course</option>
<option value="DEX Trading (Degen)">DEX Trading (Degen)</option>
<option value="Telegram Mini-App Development">Telegram Mini-App Development</option>
<option value="Graphics Design">Graphics Design</option>
<option value="Content Creation">Content Creation</option>
<option value="Web3 Job Skills">Web3 Job Skills</option>
<option value="Airdrop Hunting">Airdrop Hunting</option>
<option value="Crypto Trading">Crypto Trading</option>
`;
}
else if (selectedDevices.includes('android')) {
document.getElementById('course').innerHTML = `
<option value="" disabled selected>Select your course</option>
<option value="DEX Trading (Degen)">DEX Trading (Degen)</option>
<option value="Graphics Design">Graphics Design</option>
<option value="Content Creation">Content Creation</option>
<option value="Web3 Job Skills">Web3 Job Skills</option>
<option value="Airdrop Hunting">Airdrop Hunting</option>
<option value="Crypto Trading">Crypto Trading</option>
`;
}
else if (selectedDevices.includes('pc')) {
document.getElementById('course').innerHTML = `
<option value="" disabled selected>Select your course</option>
<option value="DEX Trading (Degen)">DEX Trading (Degen)</option>
<option value="Telegram Mini-App Development">Telegram Mini-App Development</option>
<option value="Graphics Design">Graphics Design</option>
<option value="Content Creation">Content Creation</option>
<option value="Web3 Job Skills">Web3 Job Skills</option>
<option value="Airdrop Hunting">Airdrop Hunting</option>
<option value="Crypto Trading">Crypto Trading</option>
`;
}
else {
document.getElementById('course').innerHTML = `
<option value="" disabled selected>Select Device before Course</option>
`;
}
return true;
}
// Mobile Menu Toggle
const mobileMenuBtn = document.getElementById('mobileMenuBtn');
const navLinks = document.getElementById('navLinks');
mobileMenuBtn.addEventListener('click', () => {
navLinks.classList.toggle('active');
mobileMenuBtn.innerHTML = navLinks.classList.contains('active') ?
'<i class="fas fa-times"></i>' : '<i class="fas fa-bars"></i>';
});
function submitToGoogleSheets(formData) {
return new Promise((resolve, reject) => {
const callbackName = 'jsonp_callback_' + Date.now();
const scriptUrl = buildScriptUrl(formData, callbackName);
// Create temporary callback function
window[callbackName] = function (response) {
cleanup(callbackName);
if (response.success) {
resolve(response);
} else {
reject(new Error(response.error || 'Submission failed'));
}
};
// Create and inject script tag
const script = document.createElement('script');
script.src = scriptUrl;
script.onerror = () => {
cleanup(callbackName);
reject(new Error('Network error'));
};
document.body.appendChild(script);
// Cleanup function
function cleanup(callback) {
delete window[callback];
document.body.removeChild(script);
}
});
}
function buildScriptUrl(data, callback) {
const baseUrl = 'https://script.google.com/macros/s/AKfycbxplCjPQDZdxia5jJQW_TmSUImjIf2XDhsR2CWUwfOeKGwXX0bNH2XWZPugIlz-7Advfg/exec';
const params = new URLSearchParams();
// Add callback parameter
params.append('callback', callback);
// Add form data
for (const key in data) {
if (Array.isArray(data[key])) {
params.append(key, data[key].join(','));
} else {
params.append(key, data[key]);
}
}
return `${baseUrl}?${params.toString()}`;
}
// Form submission
document.getElementById('academyForm').addEventListener('submit', async function (e) {
e.preventDefault();
// Disable all submit buttons and show loading state
const submitButtons = document.querySelectorAll('button[type="submit"]');
setButtonsLoadingState(submitButtons, true);
try {
// Validate form
if (!validateForm()) {
setButtonsLoadingState(submitButtons, false);
return;
}
// Collect form data
const formData = collectFormData();
// Show loader
const loader = showLoader();
try {
// Submit to Google Sheets first
await submitToGoogleSheets(formData);
// If successful, send email
const emailResponse = await sendFormEmail(formData);
if (emailResponse.success) {
showSuccessPopup();
this.reset();
} else {
const errMsg = typeof emailResponse.error === 'object'
? JSON.stringify(emailResponse.error)
: (emailResponse.error || 'Email submission failed');
throw new Error(errMsg);
}
} finally {
loader.remove();
}
} catch (error) {
showErrorPopup(error.message || 'An error occurred while submitting the form');
console.error('Submission error:', error);
} finally {
setButtonsLoadingState(submitButtons, false);
}
});
// Helper functions
function setButtonsLoadingState(buttons, isLoading) {
buttons.forEach(btn => {
btn.innerHTML = isLoading
? '<i class="fa fa-spinner fa-spin"></i> SUBMITTING...'
: '<i class="fa fa-user-plus" aria-hidden="true"></i> SUBMIT';
btn.disabled = isLoading;
});
}
function validateForm() {
const termsCheckbox = document.getElementById('termsCheckbox');
const email = document.getElementById('email').value;
const state = document.getElementById('state').value;
const course = document.getElementById('course').value;
const devices = Array.from(document.querySelectorAll('input[name="device"]:checked')).map(el => el.value);
const whatsapp = document.getElementById('whatsapp').value;
if (!email || !state || !course || devices.length === 0 || !whatsapp || !termsCheckbox.checked) {
alert('Please fill all required fields and accept the Terms and Conditions');
return false;
}
return true;
}
function collectFormData() {
const name = document.getElementById('fname').value;
const email = document.getElementById('email').value;
const state = document.getElementById('state').value;
const course = document.getElementById('course').value;
const devices = Array.from(document.querySelectorAll('input[name="device"]:checked')).map(el => el.value);
const whatsapp = document.getElementById('whatsapp').value;
const socialHandles = Array.from(document.querySelectorAll(".social-handles input"))
.map(el => `${el.placeholder}: ${el.value}`);
return {
name,
email,
state,
course,
devices,
twitter: document.querySelector('.social-handle.twitter input').value,
facebook: document.querySelector('.social-handle.facebook input').value || '',
telegram: document.querySelector('.social-handle.telegram input').value,
discord: document.querySelector('.social-handle.discord input').value,
whatsapp,
social: socialHandles
};
}
async function sendFormEmail(formData) {
const res = await fetch("api/send-email", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
name: formData.name,
email: formData.email,
state: formData.state,
devices: formData.devices,
course: formData.course,
social: formData.social,
whatsapp: formData.whatsapp
}),
});
return await res.json();
}
// These functions should be defined elsewhere in your code
// function showLoader() { ... }
// function showSuccessPopup() { ... }
// function showErrorPopup(message) { ... }
// async function submitToGoogleSheets(formData) { ... }
// Add country code helper for WhatsApp field
document.getElementById('whatsapp').addEventListener('focus', function () {
if (!this.value.startsWith('+')) {
this.value = '+234';
}
});
// Terms and Conditions Modal Functionality
const termsModal = document.getElementById('termsModal');
const termsLink = document.getElementById('termsLink');
const termsClose = document.getElementById('termsClose');
const termsAccept = document.getElementById('termsAccept');
const termsCheckbox = document.getElementById('termsCheckbox');
// Open modal when terms link is clicked
termsLink.addEventListener('click', function (e) {
e.preventDefault();
termsModal.classList.add('active');
});
// Close modal when X is clicked
termsClose.addEventListener('click', function () {
termsModal.classList.remove('active');
});
// Accept terms and close modal
termsAccept.addEventListener('click', function (e) {
termsModal.classList.remove('active');
termsCheckbox.checked = true;
e.preventDefault();
});
// Close modal when clicking outside
termsModal.addEventListener('click', function (e) {
if (e.target === termsModal) {
termsModal.classList.remove('active');
}
});
// Form validation
// document.getElementById('academyForm').addEventListener('submit', function (e) {
// if (!termsCheckbox.checked) {
// e.preventDefault();
// alert('You must accept the Terms and Conditions to submit your application');
// termsLink.scrollIntoView({ behavior: 'smooth' });
// termsLink.style.animation = 'glow 0.5s 3';
// }
// });
function showErrorPopup(message) {
const popup = document.createElement('div');
popup.className = 'acc-popup-overlay active';
popup.innerHTML = `
<div class="acc-popup-container">
<div class="acc-popup-icon error" style="color: red;">
<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>
</div>
<div class="acc-popup-content">
<h3>Error</h3>
<p>${message}</p>
</div>
<button class="acc-popup-button" onclick="this.closest('.acc-popup-overlay').remove()">
Try Again
</button>
</div>
`;
document.body.appendChild(popup);
}
function showSuccessPopup() {
const popup = document.getElementById('formPopup');
const closeBtn = document.getElementById('popupClose');
// Show popup
popup.classList.add('active');
// Close functionality
closeBtn.addEventListener('click', () => {
popup.classList.remove('active');
});
// Close when clicking outside
popup.addEventListener('click', (e) => {
if (e.target === popup) {
popup.classList.remove('active');
}
});
}
function showLoader() {
const loader = document.createElement('div');
loader.className = 'acc-loader';
loader.innerHTML = `
<div class="acc-loader-content">
<div class="acc-loader-spinner"></div>
<p>Processing...</p>
</div>
`;
document.body.appendChild(loader);
return loader;
}
// Add glow animation for emphasis
const style = document.createElement('style');
style.textContent = `
@keyframes glow {
0% { text-shadow: none; }
50% { text-shadow: 0 0 10px var(--neon-green); }
100% { text-shadow: none; }
}
`;
document.head.appendChild(style);
</script>
</body>
</html>