Created
July 17, 2012 09:29
-
-
Save radutopala/3128329 to your computer and use it in GitHub Desktop.
Example of closing or opening popup after submit
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
<?php | |
// not opening the popup again after submitting | |
class skillEditAction extends simpleWidgetEditAction | |
{ | |
public function execute($request) | |
{ | |
if ($request->isMethod('post')) { | |
if ($this->processPostData()) { | |
$result = array( | |
'success' => true, | |
'message' => "Saved with success!", | |
); | |
return $result; | |
} | |
} | |
} | |
} |
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
<?php | |
// opening the popup again after submitting | |
class skillEditAction extends simpleWidgetEditAction | |
{ | |
public function execute($request) | |
{ | |
if ($request->isMethod('post')) { | |
if ($this->processPostData()) { | |
$result = array( | |
'success' => true, | |
'message' => "Saved with success!", | |
'redirect' => $this->widgetUri . '?id=' . $this->object->getId() | |
); | |
return $result; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment