This repository was archived by the owner on Apr 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.php
More file actions
433 lines (407 loc) · 18.9 KB
/
Copy pathsettings.php
File metadata and controls
433 lines (407 loc) · 18.9 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
<div class="section-heading">
<header>
<h1>Settings
</h1>
<?php include '_primary-nav.php'; ?>
</header>
<?php include '_settings-secondary-nav.php'; ?>
</div>
<!-- /.section-heading -->
<!-- .section-body -->
<div class="section-body">
<div class="row">
<div class="col-sm-6">
<div class="panel panel-settings">
<div class="panel-heading"><i class="fa fa-list-alt"></i> Your Account</div>
<div class="panel-body">
<form class="form-horizontal" role="form">
<div style="min-height: 350px;">
<div class="form-group">
<label for="input-email" class="col-sm-4 control-label text-left">Email</label>
<div class="col-sm-8">
<input type="email" class="form-control" id="input-email" placeholder="Email">
<small class="help-block"> </small>
</div>
</div>
<div class="form-group">
<label for="input-username" class="col-sm-4 control-label text-left">Username</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="input-username" placeholder="Username">
<small class="help-block"> </small>
</div>
</div>
<div class="form-group">
<label for="input-password" class="col-sm-4 control-label text-left">Current Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="input-password" placeholder="">
<small class="help-block">(We need your current password to confirm you changes)</small>
</div>
</div>
<div class="form-group">
<label for="input-password-new" class="col-sm-4 control-label text-left">New Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="input-password-new" placeholder="">
<small class="help-block">(Leave blank if you don't want to change it)</small>
</div>
</div>
<div class="form-group">
<label for="input-password-confirm" class="col-sm-4 control-label text-left">Password Confirmation</label>
<div class="col-sm-8"><input type="password" class="form-control" id="input-password-confirm" placeholder=""></div>
</div>
</div>
<div class="text-right"><button type="submit" class="btn btn-green">Update</button></div>
</form>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel panel-settings">
<div class="panel-heading"><i class="fa fa-building-o"></i> Company</div>
<div class="panel-body">
<form class="form-horizontal" role="form">
<div style="min-height: 350px;">
<div class="form-group">
<label for="input-company" class="col-sm-4 control-label text-left">Company Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="input-company" placeholder="Company">
<small class="help-block"> </small>
</div>
</div>
<div class="form-group">
<label for="input-password" class="col-sm-4 control-label text-left">Industry</label>
<div class="col-sm-8">
<select class="form-control selectpicker" data-style="btn-default">
<option>Fashion Retail</option>
<option>Food & Beverage</option>
<option>Specialty Retail</option>
</select>
<small class="help-block"> </small>
</div>
</div>
<div class="form-group">
<label for="input-contact-name" class="col-sm-4 control-label text-left">Contact Person Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="input-contact-name" placeholder="Name">
<small class="help-block"> </small>
</div>
</div>
<div class="form-group">
<label for="input-contact-number" class="col-sm-4 control-label text-left">Contact Person Number</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="input-contact-number" placeholder="Number">
<small class="help-block"> </small>
</div>
</div>
</div>
<div class="text-right"><button type="submit" class="btn btn-green">Update</button></div>
</form>
</div>
</div>
</div>
</div><!-- /.row -->
<div class="panel panel-settings">
<div class="panel-heading"><i class="fa fa-user"></i> Manage Users</div>
<div class="panel-body">
<table class="table">
<thead>
<th>Username</th>
<th>Email</th>
<th>Action</th>
</thead>
<tbody>
<tr>
<td>Tapway Admin</td><td>enquiry@tapway.com.my</td>
<td><a href="#"><i class="fa fa-pencil"></i></a> <a href="#"><i class="fa fa-trash"></i></a></td>
</tr>
<tr>
<td>Chee How Lim</td><td>enquiry@tapway.com.my</td>
<td><a href="#"><i class="fa fa-pencil"></i></a> <a href="#"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody>
</table>
<div class="text-right"><a class="btn btn-green" data-toggle="modal" data-target="#new-user-modal" href="#">+ Add User</a></div>
</div>
</div>
<div class="panel panel-settings">
<div class="panel-heading"><i class="fa fa-map-marker"></i> Location</div>
<div class="panel-body">
<table class="table">
<thead>
<th>Location Name</th>
<th class="hidden-sm hidden-xs">Node</th>
<th class="hidden-sm hidden-xs">Last Checkin</th>
<th>Status</th>
<th>Group</th>
<th>Action</th>
</thead>
<tbody>
<tr>
<td>Red Beanbag</td><td class="hidden-sm hidden-xs">ABCDEF123456</td><td class="hidden-sm hidden-xs">19:22, Tue, 26th Aug 2014</td>
<td><span class="label label-success">Online</span></td>
<td>
<select class="form-control selectpicker" data-style="btn-link">
<option>Kuala Lumpur</option>
<option>Klang Valley</option>
<option>Premium Fashion</option>
<option data-divider="true"></option>
<option class="trig-group-modal" data-content="Add New Group <span class='fa fa-plus-circle text-green'></span>">#</option>
</select>
<!-- <div class="btn-group select-replacment">
<a class="btn btn-select dropdown-toggle" data-toggle="dropdown">
<span class="text">Kuala Lumpur</span> <span class="fa fa-angle-down"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li class="option"><a>Kuala Lumpur</a></li>
<li class="option"><a>Klang Valley</a></li>
<li class="option"><a>Premium Fashion</a></li>
<li class="divider"></li>
<li><a data-toggle="modal" data-target="#new-group-modal">Add New Group <i class="fa fa-plus"></i></a></li>
</ul>
</div> -->
</td>
<td><a href="#"><i class="fa fa-pencil"></i></a> <a href="#"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody>
</table>
<div class="text-right"><a class="btn btn-green" data-toggle="modal" data-target="#new-location-modal" href="#">+ Add Location</a></div>
</div>
</div>
</div>
<!-- /.section-body -->
<!-- New Group Modal -->
<div class="modal fade modal-green" id="new-group-modal" tabindex="-1" role="dialog" aria-labelledby="newGroupModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="new-group-modal-label">New Group</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="input-group" class="col-sm-3 control-label text-left">Group Name</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="input-group" placeholder="Name">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">Create</button>
</div>
</div>
</div>
</div>
<!-- New User Modal -->
<div class="modal fade modal-green" id="new-user-modal" tabindex="-1" role="dialog" aria-labelledby="newUserModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="new-user-modal-label">New User</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="input-group" class="col-sm-4 control-label text-left">Email</label>
<div class="col-sm-8">
<input type="email" class="form-control" id="input-group" placeholder="you@email.com">
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-4 control-label text-left">Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="input-group">
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-4 control-label text-left">Password Confirmation</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="input-group">
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-1 control-label text-left">Admin</label>
<div class="col-sm-11">
<div class="checkbox">
<label>
<input type="checkbox"> <small class="text-muted">Tick to make this user admin</small>
</label>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">Create</button>
</div>
</div>
</div>
</div>
<!-- New Location Modal -->
<div class="modal fade modal-green" id="new-location-modal" tabindex="-1" role="dialog" aria-labelledby="newLocationModal" aria-hidden="true">
<div class="modal-dialog modal-g">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="new-location-modal-label">New/Edit Location</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="input-group" class="col-sm-3 control-label text-left">Name</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="input-group" placeholder="Location Name">
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-3 control-label text-left">Phone</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="input-group" placeholder="">
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-3 control-label text-left">Address</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="input-group" placeholder="">
</div>
<label for="input-group" class="col-sm-3 hidden-xs"></label>
<div class="col-sm-4">
<label class="control-label text-left">City</label>
<input type="text" class="form-control" id="input-group" placeholder="">
</div>
<div class="col-sm-5">
<label class="control-label text-left">Country</label>
<input type="text" class="form-control" id="input-group" placeholder="">
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-7 control-label text-left">What are your store's operating days and hours?</label>
<div class="col-sm-5">
<div class="checkbox">
<label>All days<input id="checkAlldays" type="checkbox"></label>
</div>
</div>
</div>
<div class="form-group">
<?php
$selectHrs = "<option>12:00AM</option><option>1:00AM</option><option>2:00AM</option><option>3:00AM</option><option>4:00AM</option>";
?>
<?php foreach (['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'] as $value): ?>
<div class="day-wrapper">
<div class="col-sm-3 col-sm-offset-1">
<div class="checkbox"><label><?=$value;?> <input class="day-checkbox" type="checkbox"></label></div>
</div>
<div class="day-options">
<label class="col-sm-1 control-label">Starts</label>
<div class="col-sm-3">
<select class="form-control selectpicker" data-style="btn-gray"><?php print $selectHrs; ?></select>
</div>
<label class="col-sm-1 control-label">Ends</label>
<div class="col-sm-3">
<select class="form-control selectpicker" data-style="btn-gray"><?php print $selectHrs; ?></select>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-9 control-label text-left">What is the expected no of shoppers per day?
<br/><small class="text-muted">to help us calibrate RSSI</small>
</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="input-group" placeholder="">
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-9 control-label text-left">What is the bare minimum time your shoppers may make a purchase?
<br/><small class="text-muted">2 mins by default</small>
</label>
<div class="col-sm-3">
<div class="input-group">
<input type="text" class="form-control" id="input-group" placeholder="">
<span class="input-group-addon">mins</span>
</div>
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-9 control-label text-left">What is the amount of time where you consider your shopper is engaged?
<br/><small class="text-muted">10 mins by default</small>
</label>
<div class="col-sm-3">
<div class="input-group">
<input type="text" class="form-control" id="input-group" placeholder="">
<span class="input-group-addon">mins</span>
</div>
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-sm-9 control-label text-left">What is the max time you would consider a shopper?
<br/><small class="text-muted">3 hours default</small>
</label>
<div class="col-sm-3">
<div class="input-group">
<input type="text" class="form-control" id="input-group" placeholder="">
<span class="input-group-addon">hours</span>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">Create/Update</button>
</div>
</div>
</div>
</div>
<script>
$(function(){
// Use blockUI plugin to block entire panel, based on toggle checkbox settings
var blockUIOptions = {
message: null,
overlayCSS: { cursor: 'not-allowed', backgroundColor: '#fff', opacity: 0.6 }
};
function toggleElement(jqTrigger, jqTarget) {
$(jqTrigger).change(function() {
if (!$(this).prop('checked')) {
$(jqTarget).block(blockUIOptions);
} else {
$(jqTarget).unblock();
}
});
}
//On page load, if unticked, block the corresponding day options, and start monitoring for checkbox changes
var eleBlocked = '[class^=col-sm]'; //actual elements to be blocked by blockUI
$('.day-wrapper').each(function(){
var chkBox = $(this).find('.day-checkbox');
var opts = $(this).find('.day-options');
if(chkBox.prop('checked', false)) {
opts.find(eleBlocked).block(blockUIOptions);
}
toggleElement( chkBox, opts.find(eleBlocked) );
});
//Tick every single day checkbox if 'alldays' checkbox is ticked, and vice versa. Also block/unblock options
daysCheckboxes = '.day-checkbox';
$('#checkAlldays').change(function(){
if($(this).prop('checked')) {
$(daysCheckboxes).prop('checked', true);
$('.day-wrapper .day-options '+eleBlocked).unblock();
} else {
$(daysCheckboxes).prop('checked', false);
$('.day-wrapper .day-options '+eleBlocked).block(blockUIOptions);
}
})
//Untick 'alldays' checkbox, even if one day's checkbox is unticked
$(daysCheckboxes).change(function(){
if ($(daysCheckboxes).length === $(daysCheckboxes+':checked').length) {
$('#checkAlldays').prop('checked', true);
} else {
$('#checkAlldays').prop('checked', false);
}
});
//Trigger new group modal
$('.trig-group-modal').click(function(){
$('#new-group-modal').modal('show');
});
});
</script>