Commit 1865e6b6 authored by Raph El's avatar Raph El

Replace : Yii::app()->session["costum"] to $this->costum

parent cb85be5c
//parent form
{
"parent" : Ne pas oublié de rattacher le parent,
"parent" : {
"5e3bb97569086421758b465a" : {
"type" : "projects",
"name" : "DEAL"
}
},
"hasStepValidations" : 1,
"id" : "dealForm",
"source" : {
......
......@@ -11,8 +11,8 @@
costum.col = "<?php echo Yii::app()->session["costum"]["contextType"] ?>";
costum.ctrl = "<?php echo Element::getControlerByCollection(Yii::app()->session["costum"]["contextType"]) ?>";
var configDynForm = <?php echo json_encode(Yii::app()->session['costum']['dynForm']); ?>;
var tplsList = <?php echo json_encode((isset(Yii::app()->session['costum']['tpls'])) ? Yii::app()->session['costum']['tpls']:null); ?>;
var configDynForm = <?php echo json_encode($this->costum['dynForm']); ?>;
var tplsList = <?php echo json_encode((isset($this->costum['tpls'])) ? $this->costum['tpls']:null); ?>;
//contains all dynform definitions for complexe inputs
//it also carries sub dynforms, when an input needs extra parameters to
......
......@@ -14,14 +14,14 @@
$editBtnL = (Yii::app()->session["userId"] == $answer["user"]) ? " <a href='javascript:;' data-id='".$answer["_id"]."' data-collection='".Form::ANSWER_COLLECTION."' data-path='".$answerPath."' class='add".$kunik." btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".Yii::app()->session["costum"]["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$paramsData = [
"mail_type" => ""
];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["mail_type"]) )
$paramsData["mail_type"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["mail_type"];
if( isset($this->costum["form"]["params"][$kunik]["mail_type"]) )
$paramsData["mail_type"] = $this->costum["form"]["params"][$kunik]["mail_type"];
$properties = [
......
......@@ -12,10 +12,10 @@ $paramsData = [ "title" => "",
"tags" => "structags"
];
if( isset(Yii::app()->session["costum"]["tpls"][$keyTpl]) ) {
if( isset($this->costum["tpls"][$keyTpl]) ) {
foreach ($paramsData as $i => $v) {
if( isset(Yii::app()->session["costum"]["tpls"][$keyTpl][$i]) )
$paramsData[$i] = Yii::app()->session["costum"]["tpls"][$keyTpl][$i];
if( isset($this->costum["tpls"][$keyTpl][$i]) )
$paramsData[$i] = $this->costum["tpls"][$keyTpl][$i];
}
}
......@@ -59,8 +59,8 @@ var formInputsHere = formInputs;
{
echo '<h1 class="text-center" style="color:'.$color1.'" >'.@$form["name"].'</h1>';
echo "<div class='text-center'>";
if(isset(Yii::app()->session["costum"]["cms"][$form["id"]."desc"]))
echo htmlentities(Yii::app()->session["costum"]["cms"][$form["id"]."desc"]);
if(isset($this->costum["cms"][$form["id"]."desc"]))
echo htmlentities($this->costum["cms"][$form["id"]."desc"]);
else
echo "<span style='color:#aaa'>* section description</span>";
if($canEdit)
......
......@@ -7,15 +7,15 @@ if( $mode != "pdf" ){
$isFinanceur=false;
if(Authorisation::isInterfaceAdmin())
$isFinanceur=true;
if(isset(Yii::app()->session["costum"][$this->costum["slug"]]["financorOf"])){
if(isset($this->costum[$this->costum["slug"]]["financorOf"])){
$isFinanceur=true;
$financorOf=Yii::app()->session["costum"][$this->costum["slug"]]["financorOf"];
$financorOf=$this->costum[$this->costum["slug"]]["financorOf"];
$financorOf["thumbImg"]=(isset($financorOf["profilThumbImageUrl"])) ? Yii::app()->createUrl($financorOf["profilThumbImageUrl"]) : Yii::app()->getModule( Yii::app()->params["module"]["parent"] )->getAssetsUrl()."/images/thumb/default_organizations.jpg";
}
$isOperator = false;
if(isset(Yii::app()->session["costum"][$this->costum["slug"]]["operatorOf"])){
if(isset($this->costum[$this->costum["slug"]]["operatorOf"])){
$isOperator= true;
$operatorOf=Yii::app()->session["costum"][$this->costum["slug"]]["operatorOf"];
$operatorOf=$this->costum[$this->costum["slug"]]["operatorOf"];
$operatorOf["thumbImg"]=(isset($operatorOf["profilThumbImageUrl"])) ? Yii::app()->createUrl($operatorOf["profilThumbImageUrl"]) : Yii::app()->getModule( Yii::app()->params["module"]["parent"] )->getAssetsUrl()."/images/thumb/default_organizations.jpg";
}
......
......@@ -11,7 +11,7 @@
}
}
}
if(isset(Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row']) and Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row'] == "0" and isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"]) and ((int)Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"]) <= $i){
if(isset($this->costum["form"]["params"][$kunik]['num_row']) and $this->costum["form"]["params"][$kunik]['num_row'] == "0" and isset($this->costum["form"]["params"][$kunik]["nbmax"]) and ((int)$this->costum["form"]["params"][$kunik]["nbmax"]) <= $i){
$show = false;
}
$editBtnL="";
......@@ -19,16 +19,16 @@
$editBtnL = (Yii::app()->session["userId"] == $answer["user"]) ? " <a href='javascript:;' data-id='".$answer["_id"]."' data-collection='".Form::ANSWER_COLLECTION."' data-path='".$answerPath."' class='add".$kunik." btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a>" : "";
}
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".Yii::app()->session["costum"]["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$paramsData = [
"nbmax" => "2", "num_row" => ["limité","illimité"]
];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"]) )
$paramsData["nbmax"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["limited"]) )
$paramsData["num_row"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["num_row"];
if( isset($this->costum["form"]["params"][$kunik]["nbmax"]) )
$paramsData["nbmax"] = $this->costum["form"]["params"][$kunik]["nbmax"];
if( isset($this->costum["form"]["params"][$kunik]["limited"]) )
$paramsData["num_row"] = $this->costum["form"]["params"][$kunik]["num_row"];
$properties = [
......@@ -125,7 +125,7 @@
inputType : "select",
label : "Limitation",
options : sectionDyf.<?php echo $kunik ?>ParamsData.num_row,
value : "<?php echo (isset(Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row'])) ? Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row'] : ''; ?>"
value : "<?php echo (isset($this->costum["form"]["params"][$kunik]['num_row'])) ? $this->costum["form"]["params"][$kunik]['num_row'] : ''; ?>"
},
nbmax : {
......
......@@ -21,30 +21,30 @@
$cnt++;
}
}
if(isset(Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row']) and Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row'] == "0" and isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"]) and ((int)Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"]) <= $i){
if(isset($this->costum["form"]["params"][$kunik]['num_row']) and $this->costum["form"]["params"][$kunik]['num_row'] == "0" and isset($this->costum["form"]["params"][$kunik]["nbmax"]) and ((int)$this->costum["form"]["params"][$kunik]["nbmax"]) <= $i){
$show = false;
}
$editBtnL="";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".Yii::app()->session["costum"]["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$paramsData = [
"nbmax" => "2", "num_row" => ["limité","illimité"], "nblist_max" => "2" ,"num_list" => ["limité","illimité"], "width" => ["1" => "1","2" => "2","2" => "2","3" => "3"]
];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"]) )
$paramsData["nbmax"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["nbmax"];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["limited"]) )
$paramsData["num_row"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["num_row"];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["nblist_max"]) )
$paramsData["nblist_max"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["nblist_max"];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["num_list"]) )
$paramsData["num_list"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["num_list"];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["width"]) )
$paramsData["width"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["width"];
if( isset($this->costum["form"]["params"][$kunik]["nbmax"]) )
$paramsData["nbmax"] = $this->costum["form"]["params"][$kunik]["nbmax"];
if( isset($this->costum["form"]["params"][$kunik]["limited"]) )
$paramsData["num_row"] = $this->costum["form"]["params"][$kunik]["num_row"];
if( isset($this->costum["form"]["params"][$kunik]["nblist_max"]) )
$paramsData["nblist_max"] = $this->costum["form"]["params"][$kunik]["nblist_max"];
if( isset($this->costum["form"]["params"][$kunik]["num_list"]) )
$paramsData["num_list"] = $this->costum["form"]["params"][$kunik]["num_list"];
if( isset($this->costum["form"]["params"][$kunik]["width"]) )
$paramsData["width"] = $this->costum["form"]["params"][$kunik]["width"];
$cssRow = "6";
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["width"]) ){
if( isset($this->costum["form"]["params"][$kunik]["width"]) ){
if($paramsData["width"] == "1"){
$cssRow = "12";
}elseif ($paramsData["width"] == "2"){
......@@ -202,7 +202,7 @@
inputType : "select",
label : "Limitation",
options : sectionDyf.<?php echo $kunik ?>ParamsData.num_row,
value : "<?php echo (isset(Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row'])) ? Yii::app()->session["costum"]["form"]["params"][$kunik]['num_row'] : ''; ?>"
value : "<?php echo (isset($this->costum["form"]["params"][$kunik]['num_row'])) ? $this->costum["form"]["params"][$kunik]['num_row'] : ''; ?>"
},
nbmax : {
......@@ -214,7 +214,7 @@
inputType : "text",
label : "Nombre d'element par ligne",
options : sectionDyf.<?php echo $kunik ?>ParamsData.width,
value : "<?php echo (isset(Yii::app()->session["costum"]["form"]["params"][$kunik]['width'])) ? Yii::app()->session["costum"]["form"]["params"][$kunik]['width'] : ''; ?>"
value : "<?php echo (isset($this->costum["form"]["params"][$kunik]['width'])) ? $this->costum["form"]["params"][$kunik]['width'] : ''; ?>"
}
},
save : function () {
......
......@@ -93,18 +93,18 @@ if( $mode != "pdf" ){
<tr>
<td colspan='2' class="text-center" >
<?php
// var_dump(Yii::app()->session["costum"][$el['costum']['slug']]["hasRoles"][0]);
// var_dump($this->costum[$el['costum']['slug']]["hasRoles"][0]);
// var_dump($paramsData['canValidRoles']);
if( (!isset($answer["validation"][$form['id']]) || (isset( $answer["validation"][ $form['id'] ]["valid"] ) && $answer["validation"][ $form['id'] ]["valid"] == "notValid")) &&
//isset( $answ) &&
isset( Yii::app()->session["costum"][$el['costum']['slug']]["hasRoles"][0]) &&
in_array(Yii::app()->session["costum"][$el['costum']['slug']]["hasRoles"][0], $paramsData['canRequestRoles']) )
isset( $this->costum[$el['costum']['slug']]["hasRoles"][0]) &&
in_array($this->costum[$el['costum']['slug']]["hasRoles"][0], $paramsData['canRequestRoles']) )
echo '<a href="javascript:;" data-type="'.$form['id'].'" class="requestValid btn btn-primary">Étape terminé , Demander la Validation</a>';
else if( isset( $answer["validation"][ $form['id'] ]["valid"] ) &&
$answer["validation"][ $form['id'] ]["valid"] == "request" &&
isset( Yii::app()->session["costum"][$el['costum']['slug']]["hasRoles"][0] ) &&
in_array(Yii::app()->session["costum"][$el['costum']['slug']]["hasRoles"][0], $paramsData['canValidRoles']) )
isset( $this->costum[$el['costum']['slug']]["hasRoles"][0] ) &&
in_array($this->costum[$el['costum']['slug']]["hasRoles"][0], $paramsData['canValidRoles']) )
echo '<a href="javascript:;" data-type="'.$form['id'].'" class="validEdit btn btn-primary">Valider cette Étape</a>';
else {
if(isset( $answer["validation"][ $form['id'] ] ) &&
......
......@@ -6,7 +6,7 @@
<?php
$editBtnL = (Yii::app()->session["userId"] == $answer["user"]) ? " <a href='javascript:;' data-id='".$answer["_id"]."' data-collection='".Form::ANSWER_COLLECTION."' data-path='".$answerPath."' class='add".$kunik." btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".Yii::app()->session["costum"]["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$paramsData = [
"role" => [
......@@ -14,8 +14,8 @@ $paramsData = [
"graphiste"
] ];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["role"]) )
$paramsData["role"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["role"];
if( isset($this->costum["form"]["params"][$kunik]["role"]) )
$paramsData["role"] = $this->costum["form"]["params"][$kunik]["role"];
$properties = [
"titre_sous_action" => [
......
<?php if($answer){
$copy = "opalProcess1.depense";
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["offresCopy"]) )
$copy = Yii::app()->session["costum"]["form"]["params"][$kunik]["offresCopy"];
if( isset($this->costum["form"]["params"][$kunik]["offresCopy"]) )
$copy = $this->costum["form"]["params"][$kunik]["offresCopy"];
//var_dump($copy);
$copyT = explode(".", $copy);
$copyF = $copyT[0];
......@@ -25,7 +25,7 @@
$editBtnL = "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".Yii::app()->session["costum"]["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$paramsData = [
......@@ -39,22 +39,22 @@ $paramsData = [
]
];
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]) ) {
if( isset(Yii::app()->session["costum"]["form"]["params"][$offresKey]["group"]) )
$paramsData["group"] = Yii::app()->session["costum"]["form"]["params"][$offresKey]["group"];
if( isset(Yii::app()->session["costum"]["form"]["params"][$offresKey]["nature"]) )
$paramsData["nature"] = Yii::app()->session["costum"]["form"]["params"][$offresKey]["nature"];
if( isset(Yii::app()->session["costum"]["form"]["params"][$offresKey]["amounts"]) )
$paramsData["amounts"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["amounts"];
if( isset($this->costum["form"]["params"][$kunik]) ) {
if( isset($this->costum["form"]["params"][$offresKey]["group"]) )
$paramsData["group"] = $this->costum["form"]["params"][$offresKey]["group"];
if( isset($this->costum["form"]["params"][$offresKey]["nature"]) )
$paramsData["nature"] = $this->costum["form"]["params"][$offresKey]["nature"];
if( isset($this->costum["form"]["params"][$offresKey]["amounts"]) )
$paramsData["amounts"] = $this->costum["form"]["params"][$kunik]["amounts"];
}
$communityLinks = Element::getCommunityByTypeAndId(Yii::app()->session["costum"]["contextType"],Yii::app()->session["costum"]["contextId"]);
$communityLinks = Element::getCommunityByTypeAndId($this->costum["contextType"],$this->costum["contextId"]);
$organizations = Link::groupFindByType( Organization::COLLECTION,$communityLinks,["name","links"] );
$orgs = [];
foreach ($organizations as $id => $or) {
$roles = $or["links"]["memberOf"][Yii::app()->session["costum"]["contextId"]]["roles"];
$roles = $or["links"]["memberOf"][$this->costum["contextId"]]["roles"];
if( $paramsData["limitRoles"] && !empty($roles))
{
foreach ($roles as $i => $r) {
......@@ -98,7 +98,7 @@ $properties["votes"] = [
<tr>
<td colspan='<?php echo count( $properties)+2?>' ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn.$editParamsBtn.$editBtnL?></h4>
<?php echo $info;
if( !isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["offresCopy"]) )
if( !isset($this->costum["form"]["params"][$kunik]["offresCopy"]) )
echo "<br/><span class='text-red text-center'><i class='fa fa-warning fa-2x'></i> THIS FIELD HAS TO BE CONFIGURED FIRST ".$editParamsBtn."</span>"; ?>
</td>
</tr>
......@@ -274,13 +274,13 @@ echo "<h4 style='color:".(($titleColor) ? $titleColor : "black")."'>Décision Gl
<?php
if( isset(Yii::app()->session["costum"]["form"]["params"]["financement"]["tpl"])){
//if( Yii::app()->session["costum"]["form"]["params"]["financement"]["tpl"] == "tpls.forms.equioffres" )
$this->renderPartial( "costum.views.".Yii::app()->session["costum"]["form"]["params"]["financement"]["tpl"] ,
if( isset($this->costum["form"]["params"]["financement"]["tpl"])){
//if( $this->costum["form"]["params"]["financement"]["tpl"] == "tpls.forms.equioffres" )
$this->renderPartial( "costum.views.".$this->costum["form"]["params"]["financement"]["tpl"] ,
[ "totalFin" => $total,
"totalBudg" => Yii::app()->session["totaloffres"]["totaloffres"] ] );
// else
// $this->renderPartial( "costum.views.".Yii::app()->session["costum"]["form"]["params"]["financement"]["tpl"]);
// $this->renderPartial( "costum.views.".$this->costum["form"]["params"]["financement"]["tpl"]);
}
?>
......
......@@ -7,8 +7,8 @@ uses a classic costum engine with a json associated
editable blocks in the *costumTpl* are made editable like this
```
<?php
if(isset(Yii::app()->session["costum"]["cms"]["title1"])){
echo htmlentities(Yii::app()->session["costum"]["cms"]["title1"]);
if(isset($this->costum["cms"]["title1"])){
echo htmlentities($this->costum["cms"]["title1"]);
} else { ?> Open Form <?php }
if($canEdit)
echo "<a class='btn btn-xs btn-danger editBtn' href='javascript:;' data-key='title1' data-path='costum.cms.title1'><i class='fa fa-pencil'></i></a>";
......
......@@ -43,7 +43,7 @@ isMultiForms
initValues : contains any dyfinputs initial data
answerObj : contains answer data for the current form
** to edit costum page pieces
var configDynForm = <?php echo json_encode(Yii::app()->session['costum']['dynForm']); ?>;
var configDynForm = <?php echo json_encode($this->costum['dynForm']); ?>;
** information and structure of the form in this page
var formInputs = <?php echo json_encode($form['inputs']); ?>;
......
......@@ -6,7 +6,7 @@
<?php
$editBtnL = ($canAnswer) ? " <a href='javascript:;' data-id='".$answer["_id"]."' data-collection='".Form::ANSWER_COLLECTION."' data-path='".$answerPath."' class='add".$kunik." btn btn-default'><i class='fa fa-plus'></i> Ajouter une ligne </a> <a href='javascript:;' data-id='".Yii::app()->request->getQuery("answer")."' data-collection='answers' data-path='answers.sommomForm1.sommomForm122.' class='addorganismesommomForm122 btn btn-default'><i class='fa fa-plus'></i> Ajouter un organisme </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".Yii::app()->session["costum"]["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$paramsData = [
"type" => [
......@@ -52,8 +52,8 @@
}
}
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["ocean"]) )
$paramsData["ocean"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["ocean"];
if( isset($this->costum["form"]["params"][$kunik]["ocean"]) )
$paramsData["ocean"] = $this->costum["form"]["params"][$kunik]["ocean"];
$l = PHDB::findOne(Lists::COLLECTION, array('name' => 'cetaces'));
$i=1;
......@@ -121,14 +121,14 @@
foreach ($properties as $k => $v) {
if( isset($v["label"])){
if( isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["labels"][$k]) )
$properties[$k]["label"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["labels"][$k];
if( isset($this->costum["form"]["params"][$kunik]["labels"][$k]) )
$properties[$k]["label"] = $this->costum["form"]["params"][$kunik]["labels"][$k];
$propertiesParams["labels"][$k] = $properties[$k]["label"];
}
if( isset($v["placeholder"])){
if(isset(Yii::app()->session["costum"]["form"]["params"][$kunik]["placeholders"][$k]) )
$properties[$k]["placeholder"] = Yii::app()->session["costum"]["form"]["params"][$kunik]["placeholders"][$k];
if(isset($this->costum["form"]["params"][$kunik]["placeholders"][$k]) )
$properties[$k]["placeholder"] = $this->costum["form"]["params"][$kunik]["placeholders"][$k];
$propertiesParams["placeholders"][$k] = $properties[$k]["placeholder"];
}
}
......
......@@ -12,10 +12,10 @@ $paramsData = [ "title" => "",
"tags" => "structags"
];
if( isset(Yii::app()->session["costum"]["tpls"][$keyTpl]) ) {
if( isset($this->costum["tpls"][$keyTpl]) ) {
foreach ($paramsData as $i => $v) {
if( isset(Yii::app()->session["costum"]["tpls"][$keyTpl][$i]) )
$paramsData[$i] = Yii::app()->session["costum"]["tpls"][$keyTpl][$i];
if( isset($this->costum["tpls"][$keyTpl][$i]) )
$paramsData[$i] = $this->costum["tpls"][$keyTpl][$i];
}
}
......@@ -56,15 +56,15 @@ if( isset(Yii::app()->session["costum"]["tpls"][$keyTpl]) ) {
$d = '';
$lbl = "?";
// if(isset(Yii::app()->session["costum"]["form"]["hasStepValidations"]) )
// if(isset($this->costum["form"]["hasStepValidations"]) )
// $lbl = "";
if( (!isset($answer["step"]) && !isset(Yii::app()->session["costum"]["form"]["hasStepValidations"])) ||
if( (!isset($answer["step"]) && !isset($this->costum["form"]["hasStepValidations"])) ||
$k == 0 ||
(isset($answer["step"]) && $answer["step"] == "all" ) ||
(isset(Yii::app()->session["costum"]["form"]["hasStepValidations"]) && isset($answer["step"]) && $k <= array_search($answer["step"], $formList) ) ||
( isset(Yii::app()->session["costum"]["form"]["hasStepValidations"]) && !isset($answer["step"]) && $k <= Yii::app()->session["costum"]["form"]["hasStepValidations"] ) )
(isset($this->costum["form"]["hasStepValidations"]) && isset($answer["step"]) && $k <= array_search($answer["step"], $formList) ) ||
( isset($this->costum["form"]["hasStepValidations"]) && !isset($answer["step"]) && $k <= $this->costum["form"]["hasStepValidations"] ) )
{
$d = 'class="done"';
$lbl = $k;
......@@ -101,8 +101,8 @@ var formInputsHere = formInputs;
{
echo '<h1 class="text-center" style="color:'.$color1.'" >'.@$form["name"].'</h1>';
echo "<div class='text-center'>";
if(isset(Yii::app()->session["costum"]["cms"][$form["id"]."desc"]))
echo htmlentities(Yii::app()->session["costum"]["cms"][$form["id"]."desc"]);
if(isset($this->costum["cms"][$form["id"]."desc"]))
echo htmlentities($this->costum["cms"][$form["id"]."desc"]);
else
echo "<span style='color:#aaa'>* section description</span>";
if($canEdit)
......
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