summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/event/edit.phtml
blob: 673682f476fbb07c51cde3ba2695db370a67f95b (plain) (blame)
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
<h1>Edit Event</h1>
<?php
$this->editForm->setAction($this->url());
$this->bootoslist = $this->editForm->getBootoslist();
$this->configlist = $this->editForm->getConfiglist();
if(isset($this->bootoslist)) {
	foreach($this->bootoslist as $bootos) {
		if(array_key_exists($bootos->getID(), $this->configlist)) {
			$bootosIDs[] = $bootos->getID();
		}
	}
}
echo "<script type=\"text/javascript\">";
$ids = implode(", ", $bootosIDs);
echo "bootosIDs = new Array(" . $ids . ");\n";
echo "</script>";
echo $this->editForm;
echo '<script type="text/javascript">
		bootosfieldChanged("pbs_bootosID", bootosIDs);
		$(function() {
			$("#start").datetimepicker({
			  onSelect: function (selectedDateTime){
          var start = $(this).datetimepicker("getDate");
          $("#end").datetimepicker("option", "minDate", new Date(start.getTime()));
        },
				dateFormat: "mm/dd/yy",
				timeFormat: "hh:mm tt",
				ampm: true
			});
			$("#end").datetimepicker({
			  onSelect: function (selectedDateTime){
          var end = $(this).datetimepicker("getDate");
          $("#start").datetimepicker("option", "maxDate", new Date(end.getTime()) );
        },
				dateFormat: "mm/dd/yy",
				timeFormat: "hh:mm tt",
				ampm: true
			});
			$("#repeatdate").datetimepicker({
				dateFormat: "mm/dd/yy",
				timeFormat: "hh:mm tt",
				ampm: true
			});
		});
	  </script>';
?>