summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/controllers/EventController.php4
-rw-r--r--application/forms/EventAdd.php16
-rw-r--r--application/views/scripts/event/index.phtml4
3 files changed, 21 insertions, 3 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 798f674..410fd76 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -225,8 +225,10 @@ class EventController extends Zend_Controller_Action
}
}
$add = $this->getRequest()->getParam("add");
+ $evstart = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('evstart'), 0, 24)));
+ $evend = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('evend'), 0, 24)));
if (!isset($add)){
- $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist));
+ $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $evstart, 'end' => $evend));
} else {
$addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, $this->getRequest()->getParams()));
if ($addForm->isValid($this->getRequest()->getParams())) {
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index 2bbded4..2e95f8f 100644
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -6,6 +6,8 @@ class Application_Form_EventAdd extends Zend_Form
private $bootoslist;
private $poollist;
private $eventcategorylist;
+ private $start;
+ private $end;
public function setMembershiplist($membershiplist){
$this->membershiplist = $membershiplist;
@@ -29,6 +31,18 @@ class Application_Form_EventAdd extends Zend_Form
$this->poollist = $poollist;
}
+
+ public function setStart($start)
+ {
+ $this->start = $start;
+ return $this;
+ }
+
+ public function setEnd($end)
+ {
+ $this->end = $end;
+ return $this;
+ }
public function getPoollist(){
return $this->poollist;
@@ -84,6 +98,7 @@ class Application_Form_EventAdd extends Zend_Form
),
'required' => true,
'label' => 'Start (mm/dd/yyyy H:min):',
+ 'value' => $this->start,
));
$this->addElement('text', 'end', array(
@@ -93,6 +108,7 @@ class Application_Form_EventAdd extends Zend_Form
),
'required' => false,
'label' => 'End (mm/dd/yyyy H:min):',
+ 'value' => $this->end,
));
$this->addElement('checkbox', 'repeat', array(
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index e858338..0c2a2c0 100644
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -115,8 +115,8 @@ var lastview;
if (!confirm("Are you sure to add an Event from " + startDate + " to " + endDate + " ?")) {
$('#calendar').fullCalendar( 'unselect' );
}else {
- self.location="/event/add/";
- //self.location="/event/add/evstart" + startDate + "/evend" + endDate;
+ //self.location="/event/add/";
+ self.location="/event/add/evstart/" + startDate + "/evend/" + endDate;
//$.post("/event/add/evstart" + startDate + "/evend" + endDate);
}