summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/event/add.phtml
blob: 90fc8893f811be61a7f702f06fc445a06be15f8c (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
47
48
49
50
<h1>Add Event</h1>
<script type="text/javascript">
<?php
$this->addForm->setAction($this->url());
$this->bootoslist = $this->addForm->getBootoslist();
$this->configlist = $this->addForm->getConfiglist();
if(isset($this->bootoslist)) {
	foreach($this->bootoslist as $bootos) {
		if(array_key_exists($bootos->getID(), $this->configlist)) {
			$bootosIDs[] = $bootos->getID();
		}
	}
}
$bootosIDs = implode(", ", $bootosIDs);
echo "\tvar bootosIDs = new Array(" . $bootosIDs . ");\n";
?>
</script>
<?php
echo $this->addForm . "\n";
?>
<script type="text/javascript">
<?php
if(isset($this->params['add'])) {
	echo "\taddeventcategoryfieldChanged('category', bootosIDs, '" . $this->params['add'] . "');\n";
	echo "\timmediateChanged('immediate', bootosIDs, '" . $this->params['add'] . "');\n";
} else {
	echo "\taddeventcategoryfieldChanged('category', bootosIDs);\n";
	echo "\timmediateChanged('immediate', bootosIDs);\n";
}
?>
	$(function() {
		$("#start").datetimepicker({
			minDate: new Date(),
			dateFormat: "mm/dd/yy",
			timeFormat: "hh:mm tt",
			ampm: true
		});
		$("#end").datetimepicker({
			minDate: new Date(),
			dateFormat: "mm/dd/yy",
			timeFormat: "hh:mm tt",
			ampm: true
		});
		$("#repeatdate").datetimepicker({
			dateFormat: "mm/dd/yy",
			timeFormat: "hh:mm tt",
			ampm: true
		});
	});
</script>