Skip to content

Commit

Permalink
Fixed issue #17572: When adding a new participant the buttons are not…
Browse files Browse the repository at this point in the history
… properly working (#2104)
  • Loading branch information
gabrieljenik committed Oct 26, 2021
1 parent 91e2dd9 commit dcb4316
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -609,6 +609,14 @@ public function addnew(int $iSurveyId)

$aData['topBar']['name'] = 'tokensTopbar_view';

if ($aData['success']) {
if ($request->getPost('close-after-save')) {
$redirectUrl = Yii::app()->createUrl('admin/tokens/sa/browse/surveyid/' . $iSurveyId);
} else {
$redirectUrl = Yii::app()->createUrl("/admin/tokens/sa/edit", ["iSurveyId" => $iSurveyId, "iTokenId" => $token->tid]);
}
$this->getController()->redirect($redirectUrl);
}
$this->_renderWrappedTemplate('token', array('addtokenpost'), $aData);
} else {
$this->_handletokenform($iSurveyId, "addnew");
Expand Down Expand Up @@ -2481,7 +2489,7 @@ public function _handletokenform($iSurveyId, $subaction, $iTokenId = "", $ajax =
$aData['showSaveAndCloseButton'] = true;
// White Close Button
$aData['showWhiteCloseButton'] = true;
$aData['closeUrl'] = Yii::app()->createUrl('admin/tokens/sa/index/surveyid/' . $iSurveyId);
$aData['closeUrl'] = Yii::app()->createUrl('admin/tokens/sa/browse/surveyid/' . $iSurveyId);

$aData['topBar']['name'] = 'tokensTopbar_view';
$aData['topBar']['rightSideView'] = 'tokensTopbarRight_view';
Expand Down

0 comments on commit dcb4316

Please sign in to comment.