-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContact Us.html
248 lines (237 loc) · 10.7 KB
/
Contact Us.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mzamomtsha Primary School | Contact Us</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script src="path/to/validation.js"></script>
<style>
/* Styling for the popup */
.popup {
display: none;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color:#fff(0, 0, 0, 0.5);
z-index: 9999;
}
.popup-content {
background-color: #fff;
width: 300px; /* Increase the width as desired */
height: 200px; /* Increase the height as desired */
padding: 20px;
text-align: center;
position: absolute;
top: calc(50% - 100px); /*This changes whether it goes up or down */
left: calc(50% - 360px); /*This changes where it goes left or right*/
transform: translate(-50%, -50%);
border: 2px solid #968e18;
border-radius: 8px;
}
/* Styling of the button */
.close-button {
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
font-size: 16px;
color: #968e18; /*The color of the button */
background-color: #FFFFFF;
margin-top: auto;
margin-left: auto;
margin-right: auto;
width: 100px;
height: 40px;
border-radius: 4px;
border: none; /* This show the font inside the popup */
font-family: Arial, sans-serif;
}
</style>
</head>
<body>
<!--Nav Bar Starts-->
<header>
<nav class="navbar navbar-expand-lg">
<div class="container-fluid" >
<!--Logo for the pages-->
<div class="logo-foot">
<img src="images/badge.png" alt="logo" width="210px" height="160x">
</div>
<a class="navbar-brand"><h3>Mzamomtsha Primary School</h3> </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample05" aria-controls="navbarsExample05" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!--Navbar links to the different pages-->
<div class="collapse navbar-collapse" id="navbarsExample05">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="Home.html"><h5>Home</h5></a>
</li>
<li class="nav-item">
<a class="nav-link" href="About Us.html"><h5>About Us</h5></a>
</li>
<li class="nav-item">
<a class="nav-link" href="Events.html"><h5>Events</h5></a>
</li>
<li class="nav-item">
<a class="nav-link" href="FAQ.html"><h5>FAQ</h5></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" aria-expanded="false">Get In Touch</a>
<ul class="dropdown-menu"> <!--This code allows you too open the web page in a new window--> <!--target="openWindow"-->
<li><a class="dropdown-item" href="Contact Us.html" target="openWindow">Contact Us</a></li>
<li><a class="dropdown-item" href="Enroll.html" target="openWindow">Enroll with Us</a></li>
<li><a class="dropdown-item" href="Apply.html" target="openWindow">Apply for a Job</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="Games.html"><h5>Games</h5></a>
</li>
</ul>
</div>
</nav>
</header>
<!--Nav Bar Ends-->
<!--Main Content Starts-->
<!--form contact us-->
<main>
<div class="container d-flex justify-content-between">
<section class="mr-9"> <!-- This will change the height and width of the form-->
<form id="contactForm" action="#" method="POST" class="d-flex flex-column" style="width: 560px; height: 700px;">
<br>
<h3>Contact Us</h3>
<br>
<div class="form-group">
<label for="inputName">First Name:</label>
<input type="text" name="firstName" class="form-control" id="inputName" required oninput="validateName(this)">
</div>
<br>
<div class="form-group">
<label for="inputSurname">Last Name:</label>
<input type="text" name="lastName" class="form-control" id="inputSurname" required oninput="validateName(this)">
</div>
<br>
<div class="form-group">
<label for="inputNum">Contact Number:</label>
<input type="text" name="contactNum" class="form-control" id="inputNum" required pattern="[0-9]{10}">
</div>
<br>
<div class="form-group">
<label for="inputEmail">Email Address:</label>
<input type="email" name="email" class="form-control" id="inputEmail" required>
</div>
<br>
<div class="form-group">
<label for="inputEnquiry">Enquiry:</label>
<textarea name="comment" class="form-control" id="inputEnquiry" rows="2" required></textarea>
</div>
<br>
<button type="submit" class="btn" style="background-color: #968e18;">Submit</button>
</form>
</section>
<section>
<!-- Address Map --> <!--the 'width' and 'height' changes how big or small-->
<div class="col mb-3">
<div class="nav flex-column">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3307.584488452341!2d18.649100117443847!3d-34.003205!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x1dcc4f10cf4365ab%3A0xd92f401a274f3b2a!2s49%20Valangentabo%20St%2C%20Mfuleni%2C%20Cape%20Town%2C%207100!5e0!3m2!1sen!2sza!4v1686124266276!5m2!1sen!2sza"
width="521"
height="700"
style="border:0;"
allowfullscreen=""
loading="lazy"
referrerpolicy="no-referrer-when-downgrade">
</iframe>
</div>
</div>
</section>
</div>
</main>
<!--New Popup..Which will work, once all the details have been submitted-->
<!-- Contact Form Popup -->
<div id="popup" class="popup">
<div class="popup-content">
<h3>Thank you!</h3>
<p>Your form has been submitted.</p>
<div style="text-align: center;"> <!--Image Popup--> <!--Styled as well-->
<img src="images/checkmark.png" alt="Popup Image" style="max-width: 20%; height: auto;">
</div> <!--The code for the button-->
<button class="close-button" onclick="closePopup()">Close</button>
</div>
</div>
<!---->
<!--Footer Starts-->
<div class="container">
<footer class="row row-cols-1 row-cols-sm-2 row-cols-md-5 py-5 my-5">
<!--Logo with Name and Copyright-->
<div class="col mb-3 logo-foot">
<img src="images/badge.png" alt="logo" width="210px" height="160x">
<h3>Mzamomtsha Primary School</h3><br>
<h6 style="color:gray;"> © COPYRIGHT - CODE SLAYERS</h6>
</div>
<div class="col mb-3">
</div>
<!--Page Links-->
<div class="col mb-3">
<ul class="nav flex-column">
<li class="nav-item mb-2"><a href="Home.html" class="nav-link p-0 text-body-secondary navcolor">Home</a></li>
<li class="nav-item mb-2"><a href="About Us.html" class="nav-link p-0 text-body-secondary navcolor">About us</a></li>
<li class="nav-item mb-2"><a href="Events.html" class="nav-link p-0 text-body-secondary navcolor">Events</a></li>
<li class="nav-item mb-2"><a href="Contact Us.html" class="nav-link p-0 text-body-secondary navcolor">Contact Us</a></li>
<li class="nav-item mb-2"><a href="FAQ.html" class="nav-link p-0 text-body-secondary navcolor">FAQ</a></li>
</ul>
</div>
<!--Address Information-->
<div class="col mb-3">
<ul class="nav flex-column">
<li class="nav-item mb-2">Address:<br> </li>
<li class="nav-item mb-2">Visit us at:<br></li>
<li class="nav-item mb-2">49 Valangentambo Street <br></li>
<li class="nav-item mb-2">Driftsands, Eersterivier<br></li>
<li class="nav-item mb-2">South Africa<br></li>
</ul>
</div>
<!--Contact Infomration-->
<div class="col mb-3">
<ul class="nav flex-column">
<li class="nav-item mb-2">Contact Number: (+27)219010008<br></li>
<li class="nav-item mb-2">Email: [email protected]<br></li>
<li class="nav-item mb-2">Post Office Box Address:Po Box 40034,Elonwabeni, City Of Cape Town, 7100</li><br>
</ul>
</div>
</footer>
</div>
<!--Footer Ends-->
<!--JavaScript links-->
<script src="script.js">
isValidName();
isValidSurame();
isValidEmail();
isValidPhone();
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="script.js"></script>
<script>
//JavaScript Popup:
// JavaScript code for the contact form
//Took out the reset function and put it in the js form
function closePopup() {
var popup = document.getElementById("popup");
popup.style.display = "none";
}
//Gets the information from the Contact form:\\
document.getElementById("contactForm").addEventListener("submit", function(event) {
event.preventDefault(); // Prevent form submission
// Show the popup
var popup = document.getElementById("popup");
popup.style.display = "block";
// Reset the form
document.getElementById("contactForm").reset();
});
</script>
</body>
</html>