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
|
<!doctype html> <html lang="en"> <head> <? include('head.php')?> </head>
<body>
<div class="container">
<? include('menu.php')?>
<? if($id): ?> <h3 class="cover-heading">Modify Booking</h3> <? else: ?> <h3 class="cover-heading">Create Booking</h3> <? endif; ?>
<? if ($this->input->get('success') == 1) { ?> <div class="alert alert-success alert-dismissible fade show" role="alert"> <strong>Success!</strong> </div> <? } ?> <? if ($this->input->get('error') == 1) { ?> <div class="alert alert-danger alert-dismissible fade show" role="alert"> <strong>ERROR! </strong><br> This booking's date was duplicated on database. </div> <? } ?> <? if ($this->input->get('error') == 2) { ?> <div class="alert alert-danger alert-dismissible fade show" role="alert"> <strong>ERROR! </strong><br> This booking's date was duplicated on google calendar. </div> <? } ?>
<?= form_open(front_url(current_controller('booking_submit')),array(),array('id'=>$id)) ?>
<div class="form-group row"> <label for="inputTitle" class="col-sm-1 col-form-label">Title</label> <div class="col-sm-5"> <input type="text" class="form-control" name="title" id="inputTitle" placeholder="Add title" value="<?=$row->title?>"> </div> <label for="inputDate" class="col-sm-1 col-form-label">Date</label> <div class="col-sm-2"> <input type="text" class="form-control form_datetime" name="datefm" id="inputDate" value="<?=$row->datefm?>" placeholder="From"> </div> <div class="col-sm-2"> <input type="text" class="form-control form_datetime" name="dateto" id="inputDate" value="<?=$row->dateto?>" placeholder="To"> </div> </div>
<div class="form-group row"> <label for="inputPassword" class="col-sm-2 col-form-label">Location</label> <div class="col-sm-10"> <div class="form-check"> <input class="form-check-input" type="radio" name="location" id="roomA" value="Room A" <?=$row->location == 'Room A' ? 'checked' : ''?>> <label class="form-check-label" for="roomA"> Room A </label> </div> <div class="form-check"> <input class="form-check-input" type="radio" name="location" id="roomB" value="Room B" <?=$row->location == 'Room B' ? 'checked' : ''?>> <label class="form-check-label" for="roomB"> Room B </label> </div>
</div> </div>
<a href="<?= front_url(current_controller()) ?>" class="btn btn-light">Back</a> <button class="btn btn-primary" type="submit"> <?=$id ? 'Update' : 'Create' ?> </button> <?= form_close() ?>
</div>
<? include('script.php') ?>
</body> </html>
|