Commit 178b7c23 authored by Raph El's avatar Raph El
Browse files

Merge branch 'development' of https://gitlab.adullact.net/pixelhumain/survey into development

parents 48b19c1c cf89cae7
...@@ -22,7 +22,7 @@ class GetAction extends CTKAction ...@@ -22,7 +22,7 @@ class GetAction extends CTKAction
$f = PHDB::findOne(Form::COLLECTION, ["id"=>$formId]); $f = PHDB::findOne(Form::COLLECTION, ["id"=>$formId]);
$params["forms"][$formId] = $f; $params["forms"][$formId] = $f;
} }
$params["what"] = "propositions"; $params["what"] = (isset($params["form"]["what"])) ? $params["form"]["what"] : "réponses";
$el = Slug::getElementBySlug( $params["form"]["parentSlug"] ); $el = Slug::getElementBySlug( $params["form"]["parentSlug"] );
$params['el'] = $el["el"]; $params['el'] = $el["el"];
//ce code ne marchera pas pour deux formulaire identaique , d'un meme slug //ce code ne marchera pas pour deux formulaire identaique , d'un meme slug
......
...@@ -22,7 +22,7 @@ class GetAction extends CTKAction ...@@ -22,7 +22,7 @@ class GetAction extends CTKAction
{ {
foreach ( $params["forms"] as $fix => $f ) foreach ( $params["forms"] as $fix => $f )
{ {
$params["forms"][$fix]["name"] = "todo COForms name";
$formId = ""; $formId = "";
if(isset($f['ids'])){ if(isset($f['ids'])){
foreach ($f['ids'] as $ix => $fid) foreach ($f['ids'] as $ix => $fid)
......
...@@ -709,7 +709,7 @@ class Form { ...@@ -709,7 +709,7 @@ class Form {
} }
//if(isset($_GET["form"])) //if(isset($_GET["form"]))
$form = (isset($costum['form'])) ? $costum['form'] : PHDB::findOne( Form::COLLECTION, [ "_id" => new MongoId($_GET["form"]) ] ); $form = (isset($costum["form"])) ? $costum["form"] : PHDB::findOne( Form::COLLECTION, [ "_id" => new MongoId($_GET["form"]) ] );
$params["parentForm"] = $form; $params["parentForm"] = $form;
if(isset($costum["hasOpenForm"])) if(isset($costum["hasOpenForm"]))
......
...@@ -40,7 +40,7 @@ if( $mode != "pdf" ){ ...@@ -40,7 +40,7 @@ if( $mode != "pdf" ){
$selectedOperator = true; $selectedOperator = true;
$str = '<tr>'. $str = '<tr>'.
'<td class="padding-top-15">Opérateur</td>'. '<td class="padding-top-15">Opérateur</td>'.
'<td><a href="#page.type.organizations.id.'.$oid.'" class="lbh-preview-element"><img src="'.$thumb.'" width=50 height=50/> '.$elt["name"].'</a></td>'. '<td><a href="#page.type.organizations.id.'.$oid.'" class="lbh-preview-element"><img src="'.$thumb.'" width=50 height=50/> '.@$elt["name"].'</a></td>'.
'<td class="padding-top-15"><span class="label label-success">Validé</span></td>'. '<td class="padding-top-15"><span class="label label-success">Validé</span></td>'.
'</tr>'; '</tr>';
} }
...@@ -51,7 +51,7 @@ if( $mode != "pdf" ){ ...@@ -51,7 +51,7 @@ if( $mode != "pdf" ){
'<td class="padding-top-15">Opérateur candidat</td>'. '<td class="padding-top-15">Opérateur candidat</td>'.
'<td>'. '<td>'.
'<a href="#page.type.organizations.id.'.$oid.'" class="lbh-preview-element">'. '<a href="#page.type.organizations.id.'.$oid.'" class="lbh-preview-element">'.
'<img src="'.$thumb.'" width=40 height=40/> '.$elt["name"]. '<img src="'.$thumb.'" width=40 height=40/> '.@$elt["name"].
'</a>'. '</a>'.
'</td>'. '</td>'.
'<td class="padding-top-15">'; '<td class="padding-top-15">';
......
...@@ -10,8 +10,9 @@ foreach ($forms as $fix => $f) { ...@@ -10,8 +10,9 @@ foreach ($forms as $fix => $f) {
if($ct == 0) if($ct == 0)
echo '<div class="row ">'; echo '<div class="row ">';
?> ?>
<div class="col-md-4 col-sm-3 col-xs-12 " style="padding:5px;"> <div class="liForm col-md-4 col-sm-3 col-xs-12 " style="padding:5px;">
<div class="col-xs-12 " style="padding:10px;border:1px solid grey"> <div class="col-xs-12 " style="padding:10px;border:1px solid grey">
<h4 class="letter-turq"><?php echo (isset($f['name'])) ? $f['name'] : "Formulaire ".$el["slug"] ?></h4>
steps : <br/> steps : <br/>
<?php <?php
if(isset($f['ids'])){ if(isset($f['ids'])){
...@@ -20,7 +21,7 @@ foreach ($forms as $fix => $f) { ...@@ -20,7 +21,7 @@ foreach ($forms as $fix => $f) {
} }
}?> }?>
<a href='javascript:;' data-id='<?php echo $fix ?>' class="showAnswersBtn btn btn-xs btn-default col-sm-4 col-sm-12 bold"> <a href='javascript:;' data-id='<?php echo $fix ?>' class="showAnswersBtn btn btn-xs btn-default col-sm-4 col-sm-12 bold">
<i class='fa fa-comments'></i>(<?php echo $f["answers"]; ?>) RÉPONSES <i class='fa fa-comments'></i>(<?php echo $f["answers"]; ?>) <?php echo (isset($f['what'])) ? $f['what'] : "RÉPONSES" ?>
</a> </a>
<a href='javascript:;' data-id='<?php echo $fix ?>' class="configBtn btn btn-xs btn-danger col-sm-4 col-sm-12 bold"> <a href='javascript:;' data-id='<?php echo $fix ?>' class="configBtn btn btn-xs btn-danger col-sm-4 col-sm-12 bold">
<i class='fa fa-cogs'></i> CONFIG <i class='fa fa-cogs'></i> CONFIG
...@@ -62,6 +63,7 @@ var oform = { ...@@ -62,6 +63,7 @@ var oform = {
icon : "fa-question", icon : "fa-question",
properties : { properties : {
name : { label : "Nom du formulaire"}, name : { label : "Nom du formulaire"},
what : { label : "Nom d'une Réponse, à quoi correspondent les réponses ?", placeholder:"Proposition, Dossiers, Projets..."},
// sections : { // sections : {
// inputType : "array", // inputType : "array",
// label : "Nommé chaque étape de votre questionnaire", // label : "Nommé chaque étape de votre questionnaire",
......
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