-
Notifications
You must be signed in to change notification settings - Fork 1
/
booking.html
287 lines (269 loc) · 14.6 KB
/
booking.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
<!--Author: Matthew Fan-->
<!--Student ID: 18040157-->
<!--
Description of File:
This file is the home page of the Cabs Online booking system
it provides a form for the user to interact with
using DOM, it sends the form to the server, after process
update the targetDiv area of the webpage
-->
<!DOCTYPE html>
<HTML XMLns="http://www.w3.org/1999/xHTML">
<head>
<title>
CabsOnline - Your cab is right next to you
</title>
<meta name="description" content="CabsOnline - Your cab is right next to you."/>
<meta name="author" content="Matthew Fan"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="apple-touch-icon" sizes="180x180" href="./favicon_io/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon_io/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon_io/favicon-16x16.png">
<link rel="manifest" href="./favicon_io/site.webmanifest">
<script type="text/javascript" src="booking.js"></script>
</head>
<body onload="getDate(); getTime()">
<nav class="navbar is-primary" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="booking.html">
<img src="./logo.jpg" width="140px" height=auto>
</a>
</div>
<div class="navbar-end">
<div class="navbar-item">
<p class="control">
<a href="booking.html" class="button is-primary">
<span class="icon">
<i class="fas fa-home"></i>
</span>
</a>
</p>
<p class="control">
<a href="admin.html" class="button is-primary">
<span class="icon">
<i class="fas fa-cog"></i>
</span>
</a>
</p>
</div>
</div>
</nav>
<div class="container is-fluid">
<div class="columns has-background-link-light">
<div class="column is-half">
<form action="javascript:requestBooking()">
<div class="columns mt-5">
<div class="column is-half">
<H1 class="title">CabsOnline</H1>
<h1 class="subtitle">Your cab is right next to you.</h1>
</div>
</div>
<div class="block">
<h1 class="title is-3">Customer details</h1>
<div class="columns">
<div class="column is-half">
<label>
Customer Name:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="text"
id="cname"
name="cname"
placeholder="Jack Smith"
pattern="[A-Za-z ]{1,42}"
required
/>
<span class="icon is-left">
<i class="fas fa-user"></i>
</span>
</p>
</label>
</div>
<div class="column is-half">
<label>
Phone Number:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="text"
id="phone"
name="phone"
placeholder="0271234567"
pattern="\d+"
minlength="10"
maxlength="12"
required
/>
<span class="icon is-left">
<i class="fas fa-phone"></i>
</span>
</p>
</label>
</div>
</div>
</div>
<div class="block">
<h2 class="title is-3">Pick-Up details</h2>
<h2 class="subtitle">Street details</h2>
<div class="columns" id="unit&street">
<div class="column">
<label>
Unit Number:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="text"
id="unumber"
name="unumber"
placeholder="3"
pattern="[1-9A-Za-z ]{1,10}"
>
<span class="icon is-left">
<i class="fas fa-home"></i>
</span>
</p>
</label>
</div>
<div class="column">
<label>
Street Number:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="text"
id="snumber"
name="snumber"
placeholder="38"
pattern="[1-9A-Za-z ]{1,15}"
required
/>
<span class="icon is-left">
<i class="fas fa-home"></i>
</span>
</p>
</label>
</div>
<div class="column">
<label>
Street Name:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="text"
id="stname"
name="stname"
placeholder="Wellesley Street"
pattern="[A-Za-z ]+"
required
/>
<span class="icon is-left">
<i class="fas fa-road"></i>
</span>
</p>
</label>
</div>
</div>
<div class="block">
<h2 class="subtitle">Suburb details</h2>
<div class="columns" id="suburb&dest">
<div class="column">
<label>
Suburb:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="text"
id="sbname"
name="sbname"
placeholder="Auckland CBD"
pattern="[A-Za-z ]+"
/>
<span class="icon is-left">
<i class="fas fa-map-marked-alt"></i>
</span>
</p>
</label>
</div>
<div class="column">
<label>
Destination Suburb:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="text"
id="dsbname"
name="dsbname"
placeholder="Manukau"
pattern="[A-Za-z ]+"
required
/>
<span class="icon is-left">
<i class="fas fa-map-marked-alt"></i>
</span>
</p>
</label>
</div>
</div>
</div>
<div class="block">
<h2 class="subtitle">Time details</h2>
<div class="columns" id="date&time">
<div class="column">
<label>
Pick-Up Date:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="date"
name="date"
id="displayDate"
required
/>
<span class="icon is-left">
<i class="fas fa-calendar-alt"></i>
</span>
</p>
</label>
</div>
<div class="column">
<label>
Pick-Up Time:
<br>
<p class="control has-icons-left">
<input
class="input is-rounded"
type="time"
name="time"
id="displayTime"
required
/>
<span class="icon is-left">
<i class="fas fa-clock"></i>
</span>
</p>
</label>
</div>
</div>
</div>
<button class="button is-rounded" type="submit" name="submit">Book A Cab</button>
</div>
</form>
</div>
<div class="column is-half" id="targetDiv">
<p>The confirmation information will be displayed here</p>
<p name="reference"></p>
</div>
</div>
</div>
</body>
</HTML>