-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
394 lines (346 loc) · 18.2 KB
/
index.html
File metadata and controls
394 lines (346 loc) · 18.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Charset -->
<meta charset="UTF-8" />
<!-- Viewport for Responsive Design -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Page Title -->
<title>Join the Code Institute Community | Online Coding Courses</title>
<!-- SEO Meta Tags -->
<meta name="description" content="Sign up to Code Institute's full-stack development or data analytics courses. Get hands-on learning, career support, and access to our student community." />
<meta name="keywords" content="Code Institute, coding bootcamp, learn to code, web development course, data analytics course, software development, online coding course" />
<meta name="author" content="Code Institute" />
<title>Join the Code Institute Community</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css"
rel="stylesheet"
/>
<!-- Autocomplete functinoality for Country dropdown menu using Select2 -->
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
</head>
<body>
<div class="container my-5">
<div class="row align-items-start ">
<!-- Left: Image + Text -->
<div class="col-lg-5 mb-4 mb-lg-0">
<a href="https://codeinstitute.net" target="_blank" rel="noopener noreferrer">
<img src="https://fitefuaite.com/wp-content/uploads/2020/05/code-institute.png"
alt="Join the Code Institute Community"
class="img-fluid rounded mb-3 w-25" />
</a>
<h2 class="h4">Join the Code Institute Community</h2>
<p class="text-muted">
Get access to exclusive learning resources, industry insights, and career support.
Whether you're starting your tech journey or growing your skills, we're here to help you succeed.
</p>
<img src="https://d3m1rm8xuevz4q.cloudfront.net/wp-content/uploads/2024/09/Code-Instsitite-Portraits-Groups-17_websize-1.webp" alt="Code Institute Community" class="img-fluid rounded w-100 border border-4" />
</div>
<div class="col-lg-7 ">
<form id="ciForm" action="https://formdump.codeinstitute.net" method="post" novalidate>
<fieldset class="border rounded p-3 mb-4">
<legend class="w-auto px-2">Personal Information</legend>
<!-- Title -->
<div class="mb-3">
<label for="title" class="form-label">Title</label>
<select class="form-select" id="title" name="title" required>
<option selected disabled value="">Choose...</option>
<option>Mr</option>
<option>Ms</option>
<option>Mrs</option>
<option>Dr</option>
</select>
<div class="invalid-feedback">Your Title is required.</div>
</div>
<!-- First Name -->
<div class="mb-3">
<label for="firstName" class="form-label">First name</label>
<input type="text" class="form-control" id="firstName" name="firstName" required />
<div class="invalid-feedback">Your First name is required.</div>
</div>
<!-- Last Name -->
<div class="mb-3">
<label for="lastName" class="form-label">Last name</label>
<input type="text" class="form-control" id="lastName" name="lastName" required />
<div class="invalid-feedback">Your Last name is required.</div>
</div>
<!-- Birthdate with Tooltip -->
<div class="mb-3 position-relative">
<label for="birthdate" class="form-label">
Birthdate
<span
class="ms-1"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="You must be at least 18 years old to access Code Institute’s career support services."
>
<i class="bi bi-info-circle" style="cursor: pointer"></i>
</span>
</label>
<input
type="date"
class="form-control"
id="birthdate"
name="birthdate"
required
/>
<div class="invalid-feedback">Please enter your birthdate.</div>
</div>
</fieldset>
<fieldset class="border rounded p-3 mb-4">
<legend class="w-auto px-2">Location</legend>
<!-- House Address (Optional) -->
<div class="mb-3">
<label for="address" class="form-label">House address <span class="text-muted">(Optional)</span></label>
<input type="text" class="form-control" id="address" name="address" />
</div>
<!-- Street Address (Optional) -->
<div class="mb-3">
<label for="street-address" class="form-label">Street address <span class="text-muted">(Optional)</span></label>
<input type="text" class="form-control" id="street-address" name="street-address" />
<div class="invalid-feedback">Your Street address is required.</div>
</div>
<!-- City (Required) -->
<div class="mb-3">
<label for="city" class="form-label">City</label>
<input type="text" class="form-control" id="city" name="city" required />
<div class="invalid-feedback">Your City is required.</div>
</div>
<!-- Country -->
<div class="mb-3">
<label for="country" class="form-label">Country</label>
<select class="form-select" id="country" name="country" required>
<option selected disabled value="">Select your country</option>
<optgroup label="EU Member States">
<option>Austria</option>
<option>Belgium</option>
<option>Bulgaria</option>
<option>Croatia</option>
<option>Cyprus</option>
<option>Czech Republic</option>
<option>Denmark</option>
<option>Estonia</option>
<option>Finland</option>
<option>France</option>
<option>Germany</option>
<option>Greece</option>
<option>Hungary</option>
<option>Ireland</option>
<option>Italy</option>
<option>Latvia</option>
<option>Lithuania</option>
<option>Luxembourg</option>
<option>Malta</option>
<option>Netherlands</option>
<option>Poland</option>
<option>Portugal</option>
<option>Romania</option>
<option>Slovakia</option>
<option>Slovenia</option>
<option>Spain</option>
<option>Sweden</option>
</optgroup>
<optgroup label="Non-EU European Countries">
<option>Albania</option>
<option>Andorra</option>
<option>Armenia</option>
<option>Azerbaijan</option>
<option>Belarus</option>
<option>Bosnia and Herzegovina</option>
<option>Georgia</option>
<option>Iceland</option>
<option>Kazakhstan</option>
<option>Kosovo</option>
<option>Liechtenstein</option>
<option>Moldova</option>
<option>Monaco</option>
<option>Montenegro</option>
<option>North Macedonia</option>
<option>Norway</option>
<option>Russia</option>
<option>San Marino</option>
<option>Serbia</option>
<option>Switzerland</option>
<option>Turkey</option>
<option>Ukraine</option>
<option>United Kingdom</option>
<option>Vatican City</option>
</optgroup>
</select>
<div class="invalid-feedback">Please select your country.</div>
</div>
<!-- Postcode (Optional) -->
<div class="mb-3">
<label for="postcode" class="form-label">Postcode <span class="text-muted">(Optional)</span></label>
<input type="text" class="form-control" id="postcode" name="postcode" />
<div class="invalid-feedback">Your Postcode is required.</div>
<div class="form-text">
<a href="https://finder.eircode.ie/#/" target="_blank" rel="noopener noreferrer"
>Click here to find your Irish postcode</a
>
</div>
</div>
</fieldset>
<!-- Learning Path & Contact Info -->
<fieldset class="border rounded p-3 mb-4">
<legend class="w-auto px-2">Learning Preferences & Contact</legend>
<!-- Preferred Learning Path -->
<div class="mb-3">
<label for="learningPath" class="form-label">Preferred Learning Path</label>
<select class="form-select" id="learningPath" name="learningPath" required>
<option selected disabled value="">Choose your Learning Path</option>
<option>Full-Stack Software Development</option>
<option>Data Analytics</option>
<option>eCommerce</option>
<option>Cybersecurity</option>
</select>
</div>
<!-- Phone Number -->
<div class="mb-3">
<label for="phone" class="form-label">Mobile phone number (Optional)</label>
<input
type="tel"
class="form-control"
id="phone"
placeholder="+353"
pattern="^\+?\d{7,15}$"
name="phone"
/>
<div class="invalid-feedback">
Please enter a valid phone number (e.g. +353123456789).
</div>
</div>
<!-- Email -->
<div class="mb-3">
<label for="email" class="form-label">Email address</label>
<input type="email" class="form-control" id="email" name="email" required />
<div class="form-text">You'll receive a confirmation email.</div>
<div class="invalid-feedback">A valid email is required.</div>
</div>
</fieldset>
<!-- Account Setup -->
<fieldset class="border rounded p-3 mb-4">
<legend class="w-auto px-2">Account Setup & Agreement</legend>
<!-- Password -->
<div class="mb-3">
<label for="password" class="form-label">Create a password</label>
<input
type="password"
class="form-control"
id="password"
required
minlength="8"
name="password"
/>
<div class="form-text">
Your password must contain:<br />
- 8+ characters<br />
- 1 uppercase letter<br />
- 1 lowercase letter<br />
- 1 number or special character<br />
- No more than 2 repeated characters in a row
</div>
<div class="invalid-feedback">
Password is required and must meet the criteria.
</div>
</div>
<!-- Terms and Conditions -->
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" id="terms" name="terms" required />
<label class="form-check-label" for="terms">
I agree to the <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a>.
</label>
<div class="invalid-feedback">You must agree before submitting.</div>
</div>
<!-- Submit -->
<div class="d-grid">
<button type="submit" class="btn btn-primary btn-lg">Continue</button>
</div>
</fieldset>
</form>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Enable Bootstrap tooltips
const tooltipTriggerList = document.querySelectorAll(
'[data-bs-toggle="tooltip"]'
);
tooltipTriggerList.forEach((el) => new bootstrap.Tooltip(el));
const form = document.getElementById("ciForm");
// Manual validation on blur
form.querySelectorAll("input, select").forEach((field) => {
field.addEventListener("blur", () => {
if (!field.checkValidity()) {
field.classList.add("is-invalid");
} else {
field.classList.remove("is-invalid");
}
});
});
// Custom validation on submit
form.addEventListener("submit", function (event) {
if (!form.checkValidity()) {
event.preventDefault();
event.stopPropagation();
}
// Loop through fields without using Bootstrap's auto classes
form.querySelectorAll("input, select").forEach((field) => {
if (!field.checkValidity()) {
field.classList.add("is-invalid");
} else {
field.classList.remove("is-invalid");
}
});
});
const passwordField = document.getElementById("password");
function validatePassword(value) {
const lengthOK = value.length >= 8;
const hasUpper = /[A-Z]/.test(value);
const hasLower = /[a-z]/.test(value);
const hasDigitOrSpecial = /[\d\W]/.test(value);
const noTripleRepeat = !/(.)\1\1/.test(value); // no three of the same char in a row
return (
lengthOK &&
hasUpper &&
hasLower &&
hasDigitOrSpecial &&
noTripleRepeat
);
}
// On blur (field loses focus)
passwordField.addEventListener("blur", () => {
const value = passwordField.value.trim();
if (!validatePassword(value)) {
passwordField.classList.add("is-invalid");
} else {
passwordField.classList.remove("is-invalid");
}
});
// Also apply this during form submission
form.addEventListener("submit", function (event) {
const value = passwordField.value.trim();
if (!validatePassword(value)) {
passwordField.classList.add("is-invalid");
} else {
passwordField.classList.remove("is-invalid");
}
});
// Autocomplete functinoality for Country dropdown menu using Select2
$(document).ready(function() {
$('#country').select2({
placeholder: "Select your country",
allowClear: true,
width: '100%'
});
});
</script>
<!-- Autocomplete functinoality for Country dropdown menu using Select2 -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
</body>
</html>