/** Edit an event
  * @access public
  * @return void
  * @todo Add geocoding in model
  */
 public function editAction()
 {
     $form = new EventForm();
     $form->details->setLegend('Edit event');
     $form->submit->setLabel('Save event');
     $this->view->form = $form;
     if ($this->_request->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $where = array();
             $where[] = $this->_events->getAdapter()->quoteInto('id = ?', $this->getParam('id'));
             $this->_events->update($form->getValues(), $where);
             $this->getFlash()->addMessage('You updated this events successfully.');
             $this->redirect('/admin/events/');
         } else {
             $form->populate($this->_request->getPost());
         }
     } else {
         $form->populate($this->_events->fetchRow('id=' . $this->getParam('id'))->toArray());
     }
 }