-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefineShiftHours.php
More file actions
39 lines (34 loc) · 944 Bytes
/
DefineShiftHours.php
File metadata and controls
39 lines (34 loc) · 944 Bytes
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
<?php
const PAGE_TYPE = "Employer";
require "Head.php";
if ($_POST["action"] == "SaveShiftHours") {
if (TimeBlockForm::checkNoDeletion()) {
$week = Business::getBusiness()->getShiftHours();
foreach ($_POST["TimeBlocks"] as $blockData)
$week->addTimeBlock(new TimeBlock($blockData));
Business::getBusiness()->sync();
}
Util::redir("DefineShiftHours.php");
}
echo "
<h1>Define Shift Hours</h1>
<form method='post'>
<input type='hidden' name='action' value='SaveShiftHours'>
<div class='form-group'>
<button type='submit' class='btn btn-primary'>Submit</button>
</div><!-- /.form-group -->
";
foreach (Business::getBusiness()->getShiftHours()->getTimeBlocks() as $timeBlock)
(new TimeBlockForm)
->pretext("<b>Shift:</b>")
->timeBlock($timeBlock)
->label("")
->echo();
(new TimeBlockForm)
->pretext("<b>Shift:</b>")
->label("")
->echo();
echo "
</form>
";
require "Foot.php";