Skip to content

Commit

Permalink
Fixed issue #10945: Add button Save and close when creating a new group
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Apr 15, 2016
1 parent 505211f commit 66546e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/controllers/admin/questiongroups.php
Expand Up @@ -168,6 +168,7 @@ function add($surveyid)
$aData['surveybar']['importquestiongroup'] = true;
$aData['surveybar']['closebutton']['url'] = 'admin/survey/sa/listquestiongroups/surveyid/'.$surveyid; // Close button
$aData['surveybar']['savebutton']['form'] = true;
$aData['surveybar']['saveandclosebutton']['form'] = true;
$this->_renderWrappedTemplate('survey/QuestionGroups', 'addGroup_view', $aData);
}
}
Expand Down Expand Up @@ -284,7 +285,10 @@ public function insert($surveyid)
// http://local.lsinst/LimeSurvey_206/index.php/admin/survey/sa/view/surveyid/282267/gid/10
// http://local.lsinst/LimeSurvey_206/index.php//282267/gid/10

$this->getController()->redirect(array('admin/questiongroups/sa/view/surveyid/' . $surveyid . '/gid/' . $gid));
if(Yii::app()->request->getPost('close-after-save') === 'true')
{
$this->getController()->redirect(array('admin/questiongroups/sa/view/surveyid/' . $surveyid . '/gid/' . $gid));
}
}
}

Expand Down

0 comments on commit 66546e4

Please sign in to comment.