-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathowner_registration.html
More file actions
363 lines (310 loc) · 11.6 KB
/
Copy pathowner_registration.html
File metadata and controls
363 lines (310 loc) · 11.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Owner Registration</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
<script src="theme.js" defer></script>
<style>
/* General body styling */
body {
font-family: 'Poppins', Arial, sans-serif;
background-color: #1e2a3a;
color: #fff;
margin: 0;
padding: 0;
}
/* Container */
.container {
max-width: 320px;
margin: 40px auto;
padding: 20px;
background-color: #26374D;
border: 1px solid #1e2a3a;
border-radius: 15px;
box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}
/* Heading */
h1 {
text-align: center;
color: #d0a933;
margin-bottom: 20px;
}
/* Labels */
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}
/* Text inputs */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
width: 95%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #1e1e2e;
border-radius: 8px;
background-color: hsl(120, 1%, 70%);
outline: none;
transition: border-color 0.3s ease;
}
input[type="text"]:focus, input[type="email"]:focus,
input[type="tel"]:focus, input[type="password"]:focus {
border-color: #4CAF50;
}
/* File Upload Wrapper */
.file-upload-wrapper {
margin-bottom: 20px;
}
.custom-file-label {
display: block;
background-color: hsl(120, 1%, 70%);
color: #2c2c2c;
padding: 10px;
border-radius: 8px;
text-align: center;
cursor: pointer;
transition: background-color 0.3s ease;
}
.custom-file-label:hover {
background-color: #fbfbfb;
}
/* Hide default file input */
input[type="file"] {
display: none;
}
/* Submit button */
button[type="submit"] {
margin-top: 10%;
margin-left: 25%;
width: 50%;
padding: 10px;
background-color: #d0a933;
color: #fff;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 15px;
transition: background-color 0.3s ease;
}
button[type="submit"]:hover {
background-color: #af8d28;
}
/* Already have account */
.already-account {
text-align: center;
margin-top: 10px;
}
a {
text-decoration: none;
color: #e3b93c;
}
a:hover {
color: #d0a933;
}
.light-theme {
font-family: 'Poppins', Arial, sans-serif;
background-color: #fff;
color: #000;
margin: 0;
padding: 0;
}
/* Container */
.light-theme .container {
max-width: 320px;
margin: 40px auto;
padding: 20px;
background-color: #AECCE4;
border-radius: 15px;
box-shadow: 0 0 50px rgb(250, 249, 249);
}
/* Heading */
.light-theme h1 {
text-align: center;
color: #2575fc;
margin-bottom: 20px;
}
/* Labels */
.light-theme label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}
/* Text inputs */
.light-theme input[type="text"], .light-theme input[type="email"], .light-theme input[type="tel"], .light-theme input[type="password"] {
width: 95%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #1e1e2e;
border-radius: 8px;
background-color: hsl(120, 8%, 97%);
outline: none;
transition: border-color 0.3s ease;
}
.light-theme input[type="text"]:focus, input[type="email"]:focus,
.light-theme input[type="tel"]:focus, input[type="password"]:focus {
border-color: #2575fc;
}
/* File Upload Wrapper */
.light-theme .file-upload-wrapper {
margin-bottom: 20px;
}
.light-theme .custom-file-label {
display: block;
background-color: hsl(120, 8%, 97%);
color: #000;
padding: 10px;
border-radius: 8px;
text-align: center;
cursor: pointer;
transition: background-color 0.3s ease;
}
.light-theme .custom-file-label:hover {
background-color: #000;
}
/* Hide default file input */
.light-theme input[type="file"] {
display: none;
}
/* Submit button */
.light-theme button[type="submit"] {
margin-top: 10%;
margin-left: 25%;
width: 50%;
padding: 10px;
background-color: #2575fc;
color: #000;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 15px;
transition: background-color 0.3s ease;
}
.light-theme button[type="submit"]:hover {
background-color: #1c5cc9;
}
/* Already have account */
.light-theme .already-account {
text-align: center;
margin-top: 10px;
}
.light-theme a {
text-decoration: none;
color: #2575fc;
}
.light-theme a:hover {
color: #1c5cc9;
}
/* Media query for larger screens (laptops/desktops) */
@media (min-width: 768px) {
.container {
max-width: 400px; /* Slightly larger width for bigger screens */
margin: 60px auto;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
width: 95%; /* Stretch inputs for wider layout */
}
button[type="submit"] {
margin-left: 25%;
width: 50%; /* Center button for larger screens */
}
}
/* Media query for ultra-wide screens */
@media (min-width: 1200px) {
.container {
max-width: 500px; /* Larger width for very wide screens */
}
}
@media (min-width: 768px) {
.light-theme .container {
max-width: 400px; /* Slightly larger width for bigger screens */
margin: 60px auto;
}
.light-theme input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
width: 95%; /* Stretch inputs for wider layout */
}
.light-theme button[type="submit"] {
margin-left: 25%;
width: 50%; /* Center button for larger screens */
}
}
/* Media query for ultra-wide screens */
@media (min-width: 1200px) {
.light-theme .container {
max-width: 500px; /* Larger width for very wide screens */
}
}
</style>
</head>
<body>
<div class="container">
<h1>Registration</h1>
<form action="owner_register.php" method="POST" enctype="multipart/form-data">
<!-- Owner Name -->
<label for="owner-name">Owner Name</label>
<input type="text" id="owner-name" name="owner-name" placeholder="Enter your name" required>
<!-- Email -->
<label for="email">Email ID</label>
<input type="email" id="email" name="email" placeholder="Enter your email" required>
<!-- Phone Number -->
<label for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone" placeholder="Enter your phone number" required>
<!-- Password -->
<label for="password">Password</label>
<input type="password" id="password" name="password" placeholder="Create a password" required>
<!-- Car Model -->
<label for="car-model">Car Model</label>
<input type="text" id="car-model" name="car-model" placeholder="Enter your car model" required>
<!-- Car Photo -->
<label for="car-photo">Car Photo</label>
<div class="file-upload-wrapper">
<label class="custom-file-label" for="car-photo">Choose File</label>
<input type="file" id="car-photo" name="car-photo" required>
</div>
<!-- Car Registration Number -->
<label for="car_registration_number">Car Registration Number</label>
<input type="text" id="car_registration_number" name="car_registration_number" placeholder="Enter car registration number" required>
<!-- Owner Photo -->
<label for="owner-photo">Owner Photo</label>
<div class="file-upload-wrapper">
<label class="custom-file-label" for="owner-photo">Choose File</label>
<input type="file" id="owner-photo" name="owner-photo" required>
</div>
<!-- License Photo -->
<label for="license-photo">License Photo</label>
<div class="file-upload-wrapper">
<label class="custom-file-label" for="license-photo">Choose File</label>
<input type="file" id="license-photo" name="license-photo" required>
</div>
<!-- Submit Button -->
<button type="submit">Register</button>
</form>
<!-- Already have an account -->
<p class="already-account">Already have an account? <a href="Owner_login.html">Click here</a></p>
</div>
<script src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js"></script>
<script>
// Initialize EmailJS
(function() {
emailjs.init("zNCAVDBUWq06reg7G"); // Replace with your actual EmailJS user ID
})();
document.querySelector("form").addEventListener("submit", function(event) {
event.preventDefault(); // Stop form submission
emailjs.send("service_ito0l9t", "template_bavrk7y", {
owner_name: document.getElementById("owner-name").value,
owner_email: document.getElementById("email").value,
car_model: document.getElementById("car-model").value,
car_registration_number: document.getElementById("car_registration_number").value
})
.then(function(response) {
console.log("Email sent successfully!", response);
event.target.submit(); // ✅ Submit form only after email is sent
})
.catch(function(error) {
console.error("Error sending email:", error);
alert("Failed to send confirmation email. Please try again.");
});
});
</script>
</body>
</html>