Skip to content

Commit

Permalink
Dev: small amendmend
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Oct 19, 2017
1 parent 589a318 commit 18f33e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/controllers/admin/templateoptions.php
Expand Up @@ -123,8 +123,9 @@ public function updatesurveygroup($id=null, $gsid)
if ( Permission::model()->hasGlobalPermission('templates', 'update')){
$sTemplateName = $id !==null ? TemplateConfiguration::model()->findByPk($id)->template_name : null;
$model = TemplateConfiguration::getInstance($sTemplateName, $gsid);

if(isset($_POST['TemplateConfiguration'])){
$model = TemplateConfiguration::getInstance($_POST['TemplateConfiguration']['template_name'], $gsid);
$model->attributes=$_POST['TemplateConfiguration'];
if($model->save())
$this->getController()->redirect(Yii::app()->getController()->createUrl("/admin/surveysgroups/sa/update/",['id'=>$gsid]));
Expand Down Expand Up @@ -242,7 +243,7 @@ private function _updateCommon($model,$sid=null)
'model'=>$model,
'templateOptionPage' => $templateOptionPage
);

if($sid !== null){
$aData['surveyid'] = $sid;
$aData['title_bar']['title'] = gT("Survey template options");
Expand Down

0 comments on commit 18f33e6

Please sign in to comment.