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
$f = PHDB::findOne(Form::COLLECTION, ["id"=>$formId]);
$params["forms"][$formId] = $f;
}
$params["what"] = "propositions";
$params["what"] = (isset($params["form"]["what"])) ? $params["form"]["what"] : "réponses";
$el = Slug::getElementBySlug( $params["form"]["parentSlug"] );
$params['el'] = $el["el"];
//ce code ne marchera pas pour deux formulaire identaique , d'un meme slug
......
......@@ -22,7 +22,7 @@ class GetAction extends CTKAction
{
foreach ( $params["forms"] as $fix => $f )
{
$params["forms"][$fix]["name"] = "todo COForms name";
$formId = "";
if(isset($f['ids'])){
foreach ($f['ids'] as $ix => $fid)
......
......@@ -709,7 +709,7 @@ class 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;
if(isset($costum["hasOpenForm"]))
......
......@@ -40,7 +40,7 @@ if( $mode != "pdf" ){
$selectedOperator = true;
$str = '<tr>'.
'<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>'.
'</tr>';
}
......@@ -51,7 +51,7 @@ if( $mode != "pdf" ){
'<td class="padding-top-15">Opérateur candidat</td>'.
'<td>'.
'<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>'.
'</td>'.
'<td class="padding-top-15">';
......
......@@ -10,8 +10,9 @@ foreach ($forms as $fix => $f) {
if($ct == 0)
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">
<h4 class="letter-turq"><?php echo (isset($f['name'])) ? $f['name'] : "Formulaire ".$el["slug"] ?></h4>
steps : <br/>
<?php
if(isset($f['ids'])){
......@@ -20,14 +21,14 @@ 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">
<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 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
</a>
<a href='costum/co/index/slug/<?php echo $el["slug"] ?>/form/<?php echo $fix ?>' class="btn btn-xs btn-primary col-sm-4 col-xs-12 bold">
<i class='fa fa-file-text-o'></i> RÉPONDRE
</a>
</a>
</div>
</div>
......@@ -62,6 +63,7 @@ var oform = {
icon : "fa-question",
properties : {
name : { label : "Nom du formulaire"},
what : { label : "Nom d'une Réponse, à quoi correspondent les réponses ?", placeholder:"Proposition, Dossiers, Projets..."},
// sections : {
// inputType : "array",
// 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