To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Show
Ignore:
Timestamp:
04/30/10 15:13:53 (2 years ago)
Author:
dordille
Message:

rescoped aBlogAdmin body class to a-blog-admin for compatibility with aEventAdmin

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/lib/BaseaEventAdminActions.class.php

    r862 r1108  
    3333    $this->a_event = $this->getRoute()->getObject(); 
    3434    $this->form = $this->configuration->getForm($this->a_event); 
    35      
     35 
    3636    if($request->isXmlHttpRequest()) 
    3737    { 
     
    4040      { 
    4141        $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); 
    4244        $this->dispatcher->notify(new sfEvent($this, 'admin.save_object', array('object' => $this->a_event))); 
    4345      } 
    4446      $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; 
    4654    } 
    4755    else