Commit aef7f02b authored by Raph El's avatar Raph El
Browse files

Form : Rename getDataForAnswer -> getDataForm

parent 0990b347
......@@ -131,9 +131,8 @@ var formObj = {
panelColor = "panel-success";
formCostum = true;
urlCostum = baseUrl+'/costum/co/index/id/'+form.source.key
}
var str='<div class="col-sm-6 col-xs-12" id="'+id+'Form">'+
'<div class="panel '+panelColor+'">'+
'<div class="panel-heading">'+
......
......@@ -32,7 +32,7 @@ class IndexAction extends CAction
$params["form"] = $form ;
//Rest::json($params); exit;
$params = Form::getDataForAnswer($params);
$params = Form::getDataForm($params);
$params["answer"] = $answer;
// TODO améliorer getdataForAnser pour soit viré la création de lanswers soit charger la bonne answer
......
......@@ -3,15 +3,7 @@ class EditAction extends CAction
{
public function run($id=null, $answer=null)
{
// $this->getController()->layout = "//layouts/empty";
// $params = array("canEdit" => true, "showAnswerActions"=>false);
// $params = Form::getDataForAnswer($params);
// $tpl=(!empty($tpl)) ? $tpl : "survey.views.tpls.views.index";
// $params["mode"]="w";
// echo $this->getController()->renderPartial($tpl,$params );
$this->getController()->layout = "//layouts/empty";
$this->getController()->layout = "//layouts/empty";
$params = array();
if(!empty($id) && !empty(Yii::app()->session["userId"]) ){
$form = PHDB::findOneById( Form::COLLECTION , $id);
......@@ -28,7 +20,7 @@ class EditAction extends CAction
}
$params["form"] = $form ;
//Rest::json($params); exit;
$params = Form::getDataForAnswer($params);
$params = Form::getDataForm($params);
$params["answer"] = $answer;
$params["canEditForm"] = $canEditForm;
$params["canEdit"] = true;
......
......@@ -615,7 +615,7 @@ class Form {
return false;
}
public static function getDataForAnswer($params){
public static function getDataForm($params){
if(isset($_GET["form"]) || !empty($params["form"])){
if(!empty($params["form"]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment