Skip to content

Instantly share code, notes, and snippets.

@PeterJuel
Created March 14, 2012 05:38
Show Gist options
  • Save PeterJuel/2034331 to your computer and use it in GitHub Desktop.
Save PeterJuel/2034331 to your computer and use it in GitHub Desktop.
SocialEngine: Colorbox submit buttons
// In the form
$this->addElement('Button', 'submit', array(
'label' => 'Tilbagetræk artikel',
'type' => 'submit',
'ignore' => true,
'decorators' => array('ViewHelper')
));
$this->addElement('Cancel', 'cancel', array(
'label' => 'cancel',
'link' => true,
'prependText' => ' eller ',
'href' => '',
'onclick' => "$.colorbox.close();",
'decorators' => array(
'ViewHelper'
)
));
// In the controller
$referer = $this->getRequest()->getHeader('REFERER');
$this->_forward('success', 'utility', 'core', array(
'smoothboxClose' => 1,
'parentRefresh' => 1,
'redirect'=> $referer,
'layout' =>'none',
'messages' => array('Artiklen er trukket tilbage')
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment