Skip to content

Commit

Permalink
Fixed issue #11011: Blank screen after adding new group
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Apr 22, 2016
1 parent 14c88ad commit 6f23b64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions application/controllers/admin/questiongroups.php
Expand Up @@ -300,6 +300,11 @@ public function insert($surveyid)
{
$this->getController()->redirect(array('admin/questiongroups/sa/view/surveyid/' . $surveyid . '/gid/' . $gid));
}
else
{
// After save, go to edit
$this->getController()->redirect(array("admin/questiongroups/sa/edit/surveyid/$surveyid/gid/$gid"));
}
}
else
{
Expand Down
6 changes: 5 additions & 1 deletion application/core/Survey_Common_Action.php
Expand Up @@ -687,7 +687,10 @@ function _nquestiongroupbar($aData)
if(isset($aData['questiongroupbar']['closebutton']['url']))
{
$sAlternativeUrl = $aData['questiongroupbar']['closebutton']['url'];
$aData['questiongroupbar']['closebutton']['url'] = Yii::app()->request->getUrlReferrer( Yii::app()->createUrl($sAlternativeUrl) );
$aForbiddenWordsInUrl = array(
'add'
);
$aData['questiongroupbar']['closebutton']['url'] = Yii::app()->request->getUrlReferrer(Yii::app()->createUrl($sAlternativeUrl), $aForbiddenWordsInUrl);
}

$this->getController()->renderPartial("/admin/survey/QuestionGroups/questiongroupbar_view", $aData);
Expand Down Expand Up @@ -860,6 +863,7 @@ function _surveybar($aData)
$aForbiddenWordsInUrl[]='assessmentedit';
$aForbiddenWordsInUrl[]='setsurveysecurity';
$aForbiddenWordsInUrl[]='importsurveyresources';
$aForbiddenWordsInUrl[]='add';
$aData['surveybar']['closebutton']['url'] = Yii::app()->request->getUrlReferrer( Yii::app()->createUrl($sAlternativeUrl), $aForbiddenWordsInUrl );
}

Expand Down

0 comments on commit 6f23b64

Please sign in to comment.