Commit 86c83881 authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

Merge remote-tracking branch 'origin/development' into development

parents b319cef5 be2384c7
......@@ -14,7 +14,7 @@ class DirectoryAction extends CAction
$res = Form::getBySourceAndId($source, $form);
$answers=Answer::globalAutocomplete($res["form"], $searchParams);
$answerList = Form::listForAdmin($answers["results"]) ;
$answerList = Answer::getDataAnswers($answerList, $res["forms"]);
$answerList = Answer::getDataAnswers($answerList, $res["forms"], $res["form"]);
if(isset($answers["count"]))
$res["count"]=$answers["count"];
......
......@@ -35,43 +35,34 @@ class IndexAction extends CAction
$params = Form::getDataForm($params);
$params["answer"] = $answer;
// TODO améliorer getdataForAnser pour soit viré la création de lanswers soit charger la bonne answer
//$parentForm = Slug::getElementBySlug($form["id"]);
$canEditForm = false;
$canAdminAnswer = false;
$canEditAnswer = false;
$canSeeAnswer = false;
if(empty($mode) || ( $mode != "w" && $mode != "r" ) )
$mode = "r";
if(!empty(Yii::app()->session['userId'])){
if($mode == "fa"){
$canEditForm = Form::canAdmin(Yii::app()->session['userId'], $form);
if(empty($canEditForm))
$mode = "w";
}
if( $mode == "w" || $mode == "fa" ){
$canEditAnswer = Answer::canEdit($params["answer"], $form, Yii::app()->session['userId'], @$parentForm);
if(empty($canEditAnswer))
$mode = "r";
else
$canSeeAnswer = true;
}
$canEditAnswer = Answer::canEdit($params["answer"], $form, Yii::app()->session['userId'], @$parentForm);
$canAdminAnswer = Answer::canAdmin($params["answer"], $form);
if(empty($canEditAnswer) && empty($canSeeAnswer)){
$canSeeAnswer = Answer::canAccess($params["answer"], $form, Yii::app()->session['userId'], @$parentForm);
if($canSeeAnswer === true && !empty($mode) && ($mode == "w" || $mode == "fa") )
$mode = "r";
}
if($canEditAnswer === false && $canAdminAnswer === false)
$canSeeAnswer = Answer::canAccess($params["answer"], $form, Yii::app()->session['userId'], @$parentForm);
else
$canSeeAnswer = true;
}
if($canEditAnswer === true || $canSeeAnswer === true){
if( $mode == "w" && $canEditAnswer === false && $canAdminAnswer === false )
$mode = "r";
if($canSeeAnswer === true){
$params["canEditForm"] = $canEditForm;
$params["canAdminAnswer"] = $canAdminAnswer;
$params["canEdit"] = $canEditAnswer;
$params["canSee"] = $canSeeAnswer;
$params["mode"] = (!empty($mode) ? $mode : "r");
$tpl=(!empty($form["tpl"])) ? $form["tpl"] : "survey.views.tpls.forms.formWizard";
//Rest::json($tpl); exit;
echo $this->getController()->renderPartial($tpl,$params );
} else {
if(Yii::app()->request->isAjaxRequest)
......
......@@ -24,12 +24,12 @@ class DirectoryAction extends CAction
$idFs[] = $keyF;
}
$res = Form::getBySourceAndId($controller->costum["slug"]);
//Rest::json($res); exit;
$searchParams = $_POST;
$searchParams["count"] = true;
$answers=Answer::globalAutocomplete($res["form"], $searchParams);
$answerList = Form::listForAdmin($answers["results"]) ;
$answerList = Answer::getDataAnswers($answerList, $res["forms"]);
$answerList = Answer::getDataAnswers($answerList, $res["forms"], $res["form"]);
$panelAdmin["context"] = array( "id" => $_POST["id"],
"collection" => $_POST["collection"],
......
......@@ -23,6 +23,7 @@ class EditAction extends CAction
$params = Form::getDataForm($params);
$params["answer"] = $answer;
$params["canEditForm"] = $canEditForm;
$params["canAdminAnswer"] = true;
$params["canEdit"] = true;
$params["canSee"] = true;
$params["showForm"] = true;
......
//parent form
{
"parent" : {
"5ea7cb098b509c8c658b45a0" : {
"type" : "organizations",
"name" : "DEAL Amélioration de l'habitat"
}
},
"tpl" : "costum.views.custom.deal.form",
"answersTpl" : "costum.views.custom.deal.answers",
"parent" : creer un form sur un element
"hasStepValidations" : 1,
"id" : "dealForm",
"source" : {
......
......@@ -5,6 +5,7 @@ class Answer{
const CONTROLLER = "answer";
const ICON = "fa-calendar-check-o";
public static function getById($id, $fields=array()){
return PHDB::findOne( self::COLLECTION, array( "_id" => new MongoId((string)$id) ), $fields );
}
......@@ -51,6 +52,16 @@ class Answer{
return $answer;
}
public static function canAdmin($ans, $form=null){
if(Form::canAdmin((string)$form["_id"], $form))
return true;
else if(Costum::isSameFunction("canAdminAnswer", array("answer"=>$ans)))
return Costum::sameFunction("canAdminAnswer", array("answer"=>$ans));
return false;
}
public static function canEdit($ans, $form=null, $userId=null, $parent=null){
if(ctype_xdigit($ans)){
$ans=self::getById($ans);
......@@ -162,13 +173,13 @@ class Answer{
}
public static function getDataAnswers($answerList, $forms){
public static function getDataAnswers($answerList, $subForms, $form){
$globalLinks = [];
$gUids = [];
if(!empty($answerList)){
foreach ($answerList as $key => $ans) {
if(isset($res["form"]["mapping"])){
$answerList[$key]["mappingValues"]=Answer::getMappingValues($res["form"]["mapping"], $ans);
if(isset($form["mapping"])){
$answerList[$key]["mappingValues"]=Answer::getMappingValues($form["mapping"], $ans);
}
$answerList[$key]["countComment"] = PHDB::count(Comment::COLLECTION, array("contextId"=>$key,"contextType"=>Form::ANSWER_COLLECTION));
......@@ -182,7 +193,7 @@ class Answer{
} else {
$totalInputs = 0;
$answeredInputs = 0;
foreach ($forms as $fid => $f){
foreach ($subForms as $fid => $f){
$totalInputs += count($f["inputs"]);
if( isset( $ans["answers"][$fid] ) ){
$answeredInputs += count( $ans["answers"][$fid] );
......@@ -240,11 +251,10 @@ class Answer{
$answerList[$key]["todo"] = $todo;
$answerList[$key]["done"] = $done;
$answerList[$key]["tasksPerson"] = $tasksPerson;
$answerList[$key]["canEdit"] = self::canEdit( $ans, null, Yii::app()->session["userId"]) ;
$answerList[$key]["canEdit"] = self::canEdit( $ans, $form, Yii::app()->session["userId"]) ;
}
}
return $answerList;
}
public static function csv($elements, $idElt, $valElt, $forms ){
......@@ -264,6 +274,51 @@ class Answer{
}
return $elements;
}
public static $mailTpl=array(
"validation"=>array(
"subject"=> "La candidature {nameAns} a été validée",
"msg"=>"Nous vous informons que la candidature que vous avez soumise a été validée par les administrateurs. Vous pouvez retrouvez toutes les informations au lien suivant"
)
);
public static function getCommunityToNotify($answer, $entry=null){
$arrayMail=array();
if(!empty($answer["links"])){
foreach($answer["links"] as $k => $v){
if($k=="answered" && (empty($entry) || in_array("answered",$entry))){
foreach($v as $id){
$people=Element::getElementById($id, Person::COLLECTION, null, array("email") );
array_push($arrayMail, $people["email"]);
}
}
}
if(Costum::isSameFunction("getAnswerCommunityToNotify")){
// CARREFUL $costumUserArray need to be return as result : return $params["costumUserArray"]
array_merge($arrayMail, Costum::sameFunction("getAnswerCommunityToNotify", array(
"answer"=>$answer)));
}
}
return $arrayMail;
}
public static function getMailNotifification($id, $key, $step){
$costum = CacheHelper::getCostum();
$answer=Answer::getById($id);
$mailsCommunity=Answer::getCommunityToNotify($answer);
$answer["mappingValues"]=array();
$form=Form::getById($answer["form"]);
if(isset($form["mapping"]))
$answer["mappingValues"]=Answer::getMappingValues($res["form"]["mapping"], $ans);
$nameAnsw=(isset($answer["mappingValues"]["name"])) ? $answer["mappingValues"]["name"] : "";
foreach($mailsCommunity as $email){
/*if(Costum::isSameFunction("getAnswerCommunityToNotify")){
}else{
$subject= ;
$msg="Bonjour {contactName}, ";
}*/
}
}
}
?>
\ No newline at end of file
......@@ -33,7 +33,10 @@
$params["form"]["subForms"]=[$params["form"]["subForms"][0]];
$params = Form::getDataForm($params);
$params["parentForm"]=$params["form"];
$params["canEditForm"]=false;
$params["canEditForm"]=false;
$params["canAdminAnswer"] = false;
//var_dump($params["canAdminAnswer"]);
echo $this->renderPartial("survey.views.tpls.forms.wizard",$params);
?>
</div>
......
......@@ -17,7 +17,6 @@ if($canEditForm === true){
<script type="text/javascript">
var tplCtx = {};
var form = <?php echo (!empty($form)) ? json_encode( $form ) : "null"; ?>;
var subForms = <?php echo json_encode($subFormIds)?>;
jQuery(document).ready(function() {
......
......@@ -25,7 +25,7 @@ if( $mode != "pdf" ){
<tbody class="directoryLines">
<tr>
<?php $label=(@$answer["step"]=="deal12") ? "Opérateur sélectionner par le ménage" : "Intention opérateur"; ?>
<?php $label=(@$answer["step"]=="deal12") ? "Opérateur sélectionné par le ménage" : "Intention opérateur"; ?>
<td colspan='2' ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label ?></h4></td>
</tr>
<?php
......@@ -70,12 +70,12 @@ if( $mode != "pdf" ){
//if role operateurs
if(!$selectedOperator){
if($isOperator && !$alreadyCandidate && @$answer["step"]!="deal12"){
if($isOperator && !$selectedOperator){
if( !$alreadyCandidate && @$answer["step"]!="deal12"){
?>
<tr>
<td colspan='2' class="text-center" >
<a href="javascript:;" data-oid="<?php echo (string)$operatorOf["_id"] ?>" class="intentOperator btn btn-primary">Demander de prise en charge en tant qu'opérateur <?php echo $operatorOf["name"] ?></a>
<a href="javascript:;" data-oid="<?php echo (string)$operatorOf["_id"] ?>" class="intentOperator btn btn-primary">Demande de prise en charge en tant qu'opérateur <?php echo $operatorOf["name"] ?></a>
</td>
</tr>
<?php
......@@ -90,8 +90,8 @@ if( $mode != "pdf" ){
} ?>
</tbody>
</table>
<?php if($isFinanceur){
if(@$answer["step"] && $answer["step"]=="deal1"){ ?>
<?php if($isFinanceur && !$selectedOperator){
if(!@$answer["step"] || in_array($answer["step"], ["deal1","deal12"])){ ?>
<div class="col-xs-12 text-center margin-top-50 well">
<span style="font-size: 22px;font-weight: 800;">Ce dossier n'a pas encore d'opérateur rattaché. En tant que financeurs ou administrateur de la DEAL, veuillez valider un opérateur afin de passer ce dossier à l'étape suivant d'instruction.</span>
</div>
......@@ -117,8 +117,10 @@ if( $mode != "pdf" ){
<?php }else{ ?>
<?php $labelStep=array(
"deal2"=> "en cours de construction par l'opérateur",
"deal3"=> "en cours d'attribution des financements", "deal4"=>"est en phase d'échelonnage du planning", "deal5"=>"finalisé. Vous pouvez réaliser le suivi des travaux"); ?>
<span style="font-size: 22px;font-weight: 800;"> Votre dossier est <?php echo $label[$answer["step"]] ?>.<br/><br> L'opérateur en charge du dossier est </span>
"deal3"=> "en cours d'attribution des financements",
"deal4"=>"est en phase d'échelonnage du planning",
"deal5"=>"finalisé. Vous pouvez réaliser le suivi des travaux"); ?>
<span style="font-size: 22px;font-weight: 800;"> Votre dossier est <?php echo $labelStep[$answer["step"]] ?>.<br/><br> L'opérateur en charge du dossier est </span>
<?php } ?>
<a href="#page.type.organizations.id.<?php echo $opId ?>" class="lbh-preview-element"><img src="<?php echo $thumbOp ?>" width=40 height=40 style="margin-right: 5px;border-radius: 20px"/><?php echo $operator["name"] ?></a>
......
<?php if($answer){
<?php if($answer){
//var_dump($mode); exit;
$debug = false;
$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>" : "";
$editBtnL = ( $canEdit === true && ( $mode == "w" || $mode == "fa") ) ? " <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 = ($canEditForm) ? " <a href='javascript:;' data-id='".$parentForm["_id"]."' data-collection='".Form::COLLECTION."' data-path='params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
......@@ -72,6 +73,7 @@ $properties = [
?>
<?php
echo $this->renderPartial("survey.views.tpls.forms.cplx.budgetTable",
[
"form" => $form,
......@@ -84,8 +86,7 @@ echo $this->renderPartial("survey.views.tpls.forms.cplx.budgetTable",
"key" => $key,
"titleColor" => $titleColor,
"properties" => $properties,
"canAdminAnswer" => $canAdminAnswer,
"label" => $label,
"editQuestionBtn" => $editQuestionBtn,
"editParamsBtn" => $editParamsBtn,
......
<?php
//$styleT = ( ($mode == "pdf") ? " border : 1px solid black ;" : "");
//var_dump($styleT);
$colspanplus = (($mode == "r" || $mode == "pdf") ? 0 : 2);
$colspanplus = 0 ;
if( $mode != "pdf" && ( $canAdminAnswer === true || $canEdit === true ) )
$colspanplus = 2;
?>
<div class="form-group">
......@@ -29,7 +32,8 @@ $colspanplus = (($mode == "r" || $mode == "pdf") ? 0 : 2);
} ?>
<?php
if($mode != "r" && $mode != "pdf"){ ?>
if( $mode != "pdf" && !empty($canAdminAnswer) && $canAdminAnswer === true ){?>
<th></th>
<?php } ?>
</tr>
......@@ -71,20 +75,26 @@ $colspanplus = (($mode == "r" || $mode == "pdf") ? 0 : 2);
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
echo $tds;
if($mode != "r" && $mode != "pdf"){
if( $mode != "pdf" &&
( $canAdminAnswer === true ||
$canEdit === true ) ) {
?>
<td>
<?php
//echo $answerPath.$q;
<?php
if($mode == "w" && ( $canAdminAnswer === true || $canEdit === true ) ){
$this->renderPartial( "survey.views.tpls.forms.cplx.editDeleteLineBtn" , [
"canEdit"=>($canEdit||Yii::app()->session["userId"] == $answer["user"]),
"id" => $answer["_id"],
"collection" => Form::ANSWER_COLLECTION,
"q" => $q,
"path" => $answerPath.$q,
"kunik"=>$kunik ] ); ?>
"kunik"=>$kunik ] );
} ?>
<a href="javascript:;" class="btn btn-xs btn-primary openAnswersComment" onclick="commentObj.openPreview('answers','<?php echo $answer["_id"]?>','<?php echo $answer["_id"].$key.$q ?>', '<?php echo @$a['step'] ?>')"><?php echo PHDB::count(Comment::COLLECTION, array("contextId"=>$answer["_id"],"contextType"=>"answers", "path"=>$answer["_id"].$key.$q))?> <i class='fa fa-commenting'></i></a>
<a href="javascript:;" class="btn btn-xs btn-primary openAnswersComment" onclick="commentObj.openPreview('answers','<?php echo $answer["_id"]?>','<?php echo $answer["_id"].$key.$q ?>', '<?php echo @$a['step'] ?>')">
<?php
echo PHDB::count(Comment::COLLECTION, array("contextId"=>$answer["_id"],"contextType"=>"answers", "path"=>$answer["_id"].$key.$q)); ?>
<i class='fa fa-commenting'></i></a>
</td>
<?php
}
......@@ -118,10 +128,10 @@ $colspanplus = (($mode == "r" || $mode == "pdf") ? 0 : 2);
if($total > 0){
echo "<tr class='bold'>";
echo '<td colspan="'.(count( $paramsData["amounts"] )+2).'" style="text-align:right"> TOTAL : </td>';
if($mode != "r" && $mode != "pdf")
//if($mode != "r" && $mode != "pdf")
echo "<td colspan='".$colspanplus."'>".trim(strrev(chunk_split(strrev($total),3, ' ')))." €</td>";
else
echo "<td>".trim(strrev(chunk_split(strrev($total),3, ' ')))." €</td>";
//else
//echo "<td>".trim(strrev(chunk_split(strrev($total),3, ' ')))." €</td>";
echo "</tr>";
}
......
......@@ -137,7 +137,8 @@ echo $this->renderPartial("survey.views.tpls.forms.cplx.financementFromBudgetTab
"info" => $info,
//"showForm" => $showForm,
"paramsData" => $paramsData,
"canEdit" => $canEdit,
"canEdit" => $canEdit,
"canAdminAnswer" => $canAdminAnswer,
//"el" => $el
] ,true );
......
......@@ -153,7 +153,8 @@
echo "<tr id='".$kunik.$q."' class='".$kunik."Line text-center' style='".$trStyle."'>";
echo $tds;
if($mode != "r" && $mode != "pdf"){ ?>
if($mode != "r" && $mode != "pdf" &&
!empty($canAdminAnswer) && $canAdminAnswer === true ){ ?>
<td>
<?php
$color = "default";
......
<?php
if( $mode != "pdf" ){
if( Form::canFormAccess( ['roles'=>["Financeur"] ], @$parentForm["parent"]) )
{
//if( Form::canFormAccess( ['roles'=>["Financeur"] ], @$parentForm["parent"]) ){
if( !empty($canAdminAnswer) && $canAdminAnswer === true ){
if( isset($form['id']) )
{
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$parentForm["_id"]."' data-collection='".Form::COLLECTION."' data-path='params.".$kunik."' class='previewTpl edit".$kunik."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
......@@ -17,30 +17,29 @@ if( $mode != "pdf" ){
?>
<div id="copyEquilibreBudgetaire"></div>
<div id="copyEquilibreBudgetaire"></div>
<table class="table table-bordered table-hover directoryTable" >
<tbody class="directoryLines">
<tr>
<td colspan='2' ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>">Validation</h4>
</td>
</tr>
<table class="table table-bordered table-hover directoryTable" >
<tbody class="directoryLines">
<tr>
<td colspan='2' ><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>">Validation</h4>
</td>
</tr>
<?php
if( isset( $answer["validation"][ $form['id'] ] ) )
{ ?>
<tr>
<td colspan='2' align="center">
<button id="generateCopil2" class="generateCopil btn btn-primary" data-id="<?php echo (string)$answer["_id"] ?>" data-date="<?php echo date("Y-m-d") ?>" data-title="Compte Rendu de la réunion de finalisation" data-key="copilReunionFinalisation">Générer le dossier validé</button>
<?php $pdf=Document::getListDocumentsWhere([ "id"=>(string)$answer["_id"], "type"=>Form::ANSWER_COLLECTION, "doctype"=>"file", "subKey"=>"pdf".$form['id'] ] ,"file");
?>
</td>
</tr>
<?php }
if( isset( $answer["validation"][ $form['id'] ] ) ){ ?>
<tr>
<td colspan='2' align="center">
<button id="generateCopil2" class="generateCopil btn btn-primary" data-id="<?php echo (string)$answer["_id"] ?>" data-date="<?php echo date("Y-m-d") ?>" data-title="Compte Rendu de la réunion de finalisation" data-key="copilReunionFinalisation">Générer le dossier validé</button>
<?php $pdf=Document::getListDocumentsWhere([ "id"=>(string)$answer["_id"], "type"=>Form::ANSWER_COLLECTION, "doctype"=>"file", "subKey"=>"pdf".$form['id'] ] ,"file");
?>
</td>
</tr>
<?php
}
if(isset($answer["validation"][$form['id']]))
{
if(isset($answer["validation"][$form['id']])){
$color = "danger";
$lbl = "Non validé";
if(isset($answer["validation"][$form['id']]["valid"])){
......@@ -68,33 +67,33 @@ if( $mode != "pdf" ){
<td><?php if( isset($answer["validation"][$form['id']]["date"] ) ) echo $answer["validation"][$form['id']]["date"]; ?></td>
</tr>
<?php
if(!empty($ficheAction))
{
//$ficheAction = array_splice($ficheAction, count($ficheAction)-1);
$histo = 0;
foreach($ficheAction as $k => $v){
if($histo < 1){?>
<tr>
<td>Fiche Action Finale</td>
<td><a href='<?php echo $v["docPath"] ?>' target='_blank' class="link-files"><i class="fa fa-file-pdf-o text-red"></i> <?php echo $v["name"] ?></a></td>
</tr>
<?php $histo++; }
}
} ?>
if(!empty($ficheAction)){
//$ficheAction = array_splice($ficheAction, count($ficheAction)-1);
$histo = 0;
foreach($ficheAction as $k => $v){
if($histo < 1){?>
<tr>
<td>Fiche Action Finale</td>
<td><a href='<?php echo $v["docPath"] ?>' target='_blank' class="link-files"><i class="fa fa-file-pdf-o text-red"></i> <?php echo $v["name"] ?></a></td>
</tr>
<?php $histo++; }
}
} ?>
<?php } ?>
<tr>
<td colspan='2' class="text-center" >
<a href="javascript:;" data-type="<?php echo $form['id'] ?>" class="validEdit btn btn-primary">Valider cette action</a>
</td>
</tr>
</tbody>
</table>
<?php
} ?>
<tr>
<td colspan='2' class="text-center" >
<a href="javascript:;" data-type="<?php echo $form['id'] ?>" class="validEdit btn btn-primary">Valider cette action</a>
</td>
</tr>
</tbody>
</table>
<?php
} ?>
} ?>
......@@ -105,7 +104,7 @@ if( $mode != "pdf" ){
$(document).ready(function() {
mylog.log("render","/modules/costum/views/tpls/forms/cplx/stepValidation.php");
mylog.log("render","/modules/survey/views/tpls/forms/cplx/stepValidation.php");
sectionDyf.<?php echo $kunik ?>Params = {
"jsonSchema" : {
......@@ -171,7 +170,7 @@ if( $mode != "pdf" ){
today = today.getDate() + '/' + (today.getMonth()+1) + '/' + today.getFullYear();
ctxTpl = {
id : "<?php echo $answer['_id'] ?>",
id : "<?php echo (string)$answer['_id'] ?>",
collection : "answers",
path : "validation."+formData.form,
value : {
......@@ -182,7 +181,7 @@ if( $mode != "pdf" ){
user : userId
}
};
if(costum.form.subForms.length == $.inArray( "<?php echo $form['id'] ?>", costum.form.subForms )+1 && formData.valid == "valid")
if(form.subForms.length == $.inArray( "<?php echo $form['id'] ?>", form.subForms )+1 && formData.valid == "valid")
ctxTpl.value.finished = true;
mylog.log("validation save",ctxTpl);
......@@ -192,13 +191,13 @@ if( $mode != "pdf" ){
//only increment step form to next step if step valid
if( ctxTpl.value.valid == "valid" || ctxTpl.value.valid == "validReserve" ){
step = 0;
if(costum.form.subForms.length == $.inArray( "<?php echo $form['id'] ?>", costum.form.subForms )+1)
if(form.subForms.length == $.inArray( "<?php echo $form['id'] ?>", form.subForms )+1)
step = "all";
else
step = costum.form.subForms[$.inArray( "<?php echo $form['id'] ?>", costum.form.subForms )+1];
step = form.subForms[$.inArray( "<?php echo $form['id'] ?>", form.subForms )+1];
ctxTpl = {
id : "<?php echo $answer['_id'] ?>",
id : "<?php echo (string)$answer['_id'] ?>",
collection : "answers",
path : "step",
value : step
......@@ -251,7 +250,8 @@ if( $mode != "pdf" ){
});
</script>
<?php } else {?>
<?php
} else { ?>
<div class="col-xs-12">
Seuls les référents du territoire, le porteur de l’action et l’équipe nationale ont accès à cette étape.
</div>
......