summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-09-08 14:36:39 +0200
committerBjörn Geiger2011-09-08 14:36:39 +0200
commit7fafa407f60327c5c67a007a906ee2bd91c0fb3a (patch)
treeac3473e43f1e788248abb2394941ddae769403c2 /application
parentweitere Korrektur (diff)
parentminor (diff)
downloadpoolctrl-7fafa407f60327c5c67a007a906ee2bd91c0fb3a.tar.gz
poolctrl-7fafa407f60327c5c67a007a906ee2bd91c0fb3a.tar.xz
poolctrl-7fafa407f60327c5c67a007a906ee2bd91c0fb3a.zip
Merge branch 'master' of git.openslx.org:lsfks/projekte/poolctrl
Diffstat (limited to 'application')
-rw-r--r--application/controllers/EventController.php20
-rw-r--r--application/forms/EventAdd.php7
-rw-r--r--application/views/scripts/event/index.phtml6
3 files changed, 17 insertions, 16 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index f521de7..9ec5bd3 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -225,16 +225,12 @@ class EventController extends Zend_Controller_Action
}
}
$add = $this->getRequest()->getParam("add");
- if($this->getRequest()->getParam('evstart')) {
- $evstart = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('evstart'), 0, 24)));
- } else if($this->getRequest()->getParam('start')) {
- $evstart = $this->getRequest()->getParam('start');
- }
- if($this->getRequest()->getParam('evend')) {
- $evend = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('evend'), 0, 24)));
- } else if($this->getRequest()->getParam('end')) {
- $evend = $this->getRequest()->getParam('end');
- }
+ if($this->getRequest()->getParam('start')) {
+ $start = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('start'), 0, 24)));
+ } else {$start = 'mm/dd/yyyy H:min';}
+ if($this->getRequest()->getParam('end')) {
+ $end = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('end'), 0, 24)));
+ } else {$end = 'mm/dd/yyyy H:min';}
if (!isset($add)){
$defaultEventCategory = $this->config['event']['category']['default'];
foreach($eventcategorylist as $eventcategory) {
@@ -243,9 +239,9 @@ class EventController extends Zend_Controller_Action
break;
}
}
- $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $evstart, 'end' => $evend, 'defaultEventCategoryID' => $defaultEventCategoryID));
+ $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $start, 'end' => $end, 'defaultEventCategoryID' => $defaultEventCategoryID));
} else {
- $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $evstart, 'end' => $evend, $this->getRequest()->getParams()));
+ $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $start, 'end' => $end, $this->getRequest()->getParams()));
if ($addForm->isValid($this->getRequest()->getParams())) {
$startTimestamp = strtotime($this->getRequest()->getParam('start'));
$this->getRequest()->setParam('start', date ('Y-m-d H:i', $startTimestamp));
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index af34f84..9f0a78d 100644
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -124,7 +124,7 @@ class Application_Form_EventAdd extends Zend_Form
array('Date', false, array('format' => 'mm/dd/yyyy H:i')),
),
'required' => true,
- 'label' => 'Start (mm/dd/yyyy H:min):',
+ 'label' => 'Start:',
'value' => $this->start,
));
@@ -136,7 +136,7 @@ class Application_Form_EventAdd extends Zend_Form
array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())),
),
'required' => false,
- 'label' => 'End (mm/dd/yyyy H:min):',
+ 'label' => 'End:',
'value' => $this->end,
));
$this->getElement('end')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validator/', 'validate');
@@ -154,7 +154,8 @@ class Application_Form_EventAdd extends Zend_Form
array('StringLength', false, array(0, 16)),
),
'required' => false,
- 'label' => 'Repeat end (mm/dd/yyyy H:min):',
+ 'label' => 'Repeat end:',
+ 'value' => 'mm/dd/yyyy H:min'
));
$this->addElement('text', 'participants', array(
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 473bbc5..b71011e 100644
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -112,7 +112,11 @@ var lastview;
}
});
return false;
+
/*
+ *
+ * TO DO: Selection eines Events per Klick sichtbar machen
+ *
if(event.color == 'red') {
event.color = 'rgb(112,0,0)';
}else if(event.color == 'green') {
@@ -129,7 +133,7 @@ var lastview;
if (!confirm("Are you sure to add an Event from " + startDate + " to " + endDate + " ?")) {
$('#calendar').fullCalendar( 'unselect' );
}else {
- self.location="/event/add/evstart/" + startDate + "/evend/" + endDate;
+ self.location="/event/add/start/" + startDate + "/end/" + endDate;
}
},