Changeset 1108 for plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/lib/BaseaEventAdminActions.class.php
- Timestamp:
- 04/30/10 15:13:53 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/lib/BaseaEventAdminActions.class.php
r862 r1108 33 33 $this->a_event = $this->getRoute()->getObject(); 34 34 $this->form = $this->configuration->getForm($this->a_event); 35 35 36 36 if($request->isXmlHttpRequest()) 37 37 { … … 40 40 { 41 41 $this->a_event = $this->form->save(); 42 //We need to recreate the form to handle the fact that it is not possible to change the value of a sfFormField 43 $this->form = $this->configuration->getForm($this->a_event); 42 44 $this->dispatcher->notify(new sfEvent($this, 'admin.save_object', array('object' => $this->a_event))); 43 45 } 44 46 $this->setLayout(false); 45 return $this->renderPartial('aEventAdmin/form', array('a_event' => $this->a_event, 'form' => $this->form, 'dog' => '1')); 47 $response = array(); 48 $response['aBlogPost'] = $this->a_event->toArray(); 49 $response['modified'] = $this->a_event->getLastModified(); 50 //Any additional messages can go here 51 $output = json_encode($response); 52 $this->getResponse()->setHttpHeader("X-JSON", '('.$output.')'); 53 return sfView::HEADER_ONLY; 46 54 } 47 55 else

