Created
March 14, 2012 05:38
-
-
Save PeterJuel/2034331 to your computer and use it in GitHub Desktop.
SocialEngine: Colorbox submit buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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