diff --git a/application/controllers/admin/SurveysGroupsController.php b/application/controllers/admin/SurveysGroupsController.php index 5ba32a09358..99fb93f67e9 100644 --- a/application/controllers/admin/SurveysGroupsController.php +++ b/application/controllers/admin/SurveysGroupsController.php @@ -45,13 +45,14 @@ public function create() if(isset($_POST['SurveysGroups'])) { $model->attributes=$_POST['SurveysGroups']; + $model->name = sanitize_paranoid_string($_POST['SurveysGroups']['title']); + $model->created_by = $model->owner_uid = Yii::app()->user->id; if($model->save()) - $this->redirect(array('view','id'=>$model->gsid)); + $this->getController()->redirect(array('admin/survey/sa/listsurveys ')); } - $this->render('create',array( - 'model'=>$model, - )); + $aData['model'] = $model; + $this->_renderWrappedTemplate('surveysgroups', 'create', $aData); } /** diff --git a/application/views/admin/super/fullpagebar_view.php b/application/views/admin/super/fullpagebar_view.php index d88d0ad1640..88b123f5674 100644 --- a/application/views/admin/super/fullpagebar_view.php +++ b/application/views/admin/super/fullpagebar_view.php @@ -16,6 +16,10 @@ + " role="button"> + + + diff --git a/application/views/admin/surveysgroups/create.php b/application/views/admin/surveysgroups/create.php new file mode 100644 index 00000000000..d055bda2cbe --- /dev/null +++ b/application/views/admin/surveysgroups/create.php @@ -0,0 +1,21 @@ + + +
+ + renderPartial('super/fullpagebar_view', array( + 'fullpagebar' => array( + 'returnbutton'=>array( + 'url'=>'index', + 'text'=>gT('Close'), + ), + ) + )); ?> + +

title; ?>

+ + renderPartial('./surveysgroups/_form', array('model'=>$model)); ?> + +