membershiplist = $membershiplist; } public function getMembershiplist(){ return $this->membershiplist; } public function setBootoslist($bootoslist){ $this->bootoslist = $bootoslist; } public function getBootoslist(){ return $this->bootoslist; } public function setPoollist($poollist){ $this->poollist = $poollist; } public function getPoollist(){ return $this->poollist; } public function getEventcategorylist() { return $this->eventcategorylist; } public function setEventcategorylist($eventcategorylist) { $this->eventcategorylist = $eventcategorylist; } public function init() { $this->setName('EventAdd'); $this->setMethod('post'); $this->addElement('text', 'title', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 30)), ), 'required' => true, 'label' => 'Title:', )); $this->addElement('checkbox', 'immediate', array( 'required' => false, 'label' => 'Immediate Event', 'value'=>array(0,1), )); $this->addElement('text', 'start', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 16)), ), 'required' => true, 'label' => 'Start (mm/dd/yyyy H:min):', )); $this->addElement('text', 'end', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 16)), ), 'required' => false, 'label' => 'End (mm/dd/yyyy H:min):', )); $this->addElement('checkbox', 'repeat', array( 'required' => false, 'label' => 'Repeat:', 'value'=>array(0,1), )); $this->addElement('text', 'repeatEnd', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 16)), ), 'required' => false, 'label' => 'Repeat end (mm/dd/yyyy H:min):', )); $this->addElement('text', 'participants', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 40)), ), 'required' => false, 'label' => 'Participants:', )); $eventcategoryfield = $this->createElement('select','category'); $eventcategoryfield ->setLabel('Category:'); if(count($this->eventcategorylist)>0){ foreach($this->eventcategorylist as $category => $c){ $eventcategoryfield->addMultiOption($c->getID(), $c->getTitle()); } } $eventcategoryfield->setRegisterInArrayValidator(false); $eventcategoryfield->setAttrib('onchange', "eventcategoryfieldChanged('category');"); $this->addElement($eventcategoryfield); $this->addElement('text', 'note', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 140)), ), 'required' => false, 'label' => 'Note:', )); $poolfield = $this->createElement('select','pbs_poolID'); $poolfield ->setLabel('Pool:'); if(count($this->poollist)>0){ foreach($this->poollist as $pool => $p){ $poolfield->addMultiOption($p->getID(), $p->getTitle()); } } $poolfield->setRegisterInArrayValidator(false); $this->addElement($poolfield); $bootosfield = $this->createElement('select','pbs_bootosID'); $bootosfield ->setLabel('BootOS:'); if(count($this->bootoslist)>0){ foreach($this->bootoslist as $bootos => $b){ $bootosfield->addMultiOption($b->getID(), $b->getTitle()); } } $bootosfield->setRegisterInArrayValidator(false); $this->addElement($bootosfield); $this->addElement('submit', 'add', array( 'required' => false, 'ignore' => true, 'label' => 'Create Event' )); $this->addElement('button', 'cancel', array( 'required' => false, 'ignore' => true, 'label' => 'Cancel', 'onclick' => 'location.href="javascript:history.back();"', )); echo ''; } }