Commit 544ed60f authored by Clément Damiens's avatar Clément Damiens
Browse files

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

parents 114be7c5 ee45e6cd
......@@ -660,6 +660,7 @@ class Form {
$budgetInputList = [];
$allforms = [];
$stockBudgetInputs = false;
if(!empty($params["formList"])){
foreach ($params["formList"] as $i => $formId)
{
$f = PHDB::findOne(Form::COLLECTION, ["id"=>$formId]);
......@@ -676,6 +677,8 @@ class Form {
}
}
}
if(count($budgetInputList))
Yii::app()->session["budgetInputList"] = $budgetInputList;
//var_dump($budgetInputList);
......@@ -743,6 +746,8 @@ class Form {
$showForm = true;
if(!empty($params["formId"])){
$myAnswers = self::getListAnswersBy($params["formId"], $params["el"]["slug"], Yii::app()->session["userId"]);
......@@ -829,6 +834,8 @@ class Form {
echo "<a class='btn btn-primary' href='/costum/co/index/slug/".$el["slug"]."/answer/".$myAnswers[0]."'>Votre réponse</a>";
}
}
}
return $params;
}
......
......@@ -6,32 +6,37 @@ else if(!empty($answer) && isset($answer["answers"][$kunik]) && $answer["answers
$value = "checked";
$inpClass = "";
if($saveOneByOne)
$inpClass = " saveOneByOne";
if($mode == "r"){ ?>
if($mode == "r" || $mode == "pdf"){ ?>
<div class="col-xs-12" id="<?php echo $kunik ?>">
<label for="<?php echo $kunik ?>"><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label ?></h4></label>
<?php
echo @$form["inputs"][$key]["placeholder"]." : ".(!empty($value) ? "Yes" : "No");
?>
<label for="<?php echo $kunik ?>"><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label ?></h4></label><br/>
<?php echo @$form["inputs"][$key]["placeholder"]." : ".(!empty($value) ? "Yes" : "No"); ?>
</div>
<?php
}else{
?>
<div class="form-check">
<label class="form-check-label" for="<?php echo $kunik ?>"><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn ?></h4></label>
<br/>
<input type="checkbox" class="form-check-input <?php echo $inpClass ?>" id="<?php echo $kunik ?>" data-form='<?php echo $form["id"] ?>' <?php echo $value ?> > <?php echo @$form["inputs"][$key]["placeholder"]?>
<?php if(!empty($info)){ ?>
<small id="<?php echo $key ?>Help" class="form-text text-muted"><?php echo $info ?></small>
<?php } ?>
</div>
<script type="text/javascript">
<?php } ?>
<?php if($mode != "pdf"){ ?>
<script type="text/javascript">
jQuery(document).ready(function() {
mylog.log("render form input","/modules/costum/views/tpls/forms/checkbox.php");
});
</script>
</script>
<?php } ?>
\ No newline at end of file
<?php
//check show btn use cases
// role is financer or operater
if( Form::canFormAccess( ['roles'=>["Financeur","Opérateur"] ]))
{
if( $mode != "pdf" ){
if(Form::canFormAccess( ['roles'=>["Financeur","Opérateur"] ]))
{
if( isset($form['id']) )
{ ?>
......@@ -86,8 +86,9 @@ if( Form::canFormAccess( ['roles'=>["Financeur","Opérateur"] ]))
<?php }?>
</tbody>
</table>
<?php
}} else { ?>
<?php
}
} else { ?>
<div class="col-xs-12 text-center margin-top-50 well">
<?php if(@$answer["step"] && $answer["step"]=="deal1"){ ?>
<span style="font-size: 22px;font-weight: 800;">Vous avez soumis votre dossier pour qu'un opérateur se positionne dessus.<br/>Il est en cours de validation.
......@@ -101,13 +102,11 @@ if( Form::canFormAccess( ['roles'=>["Financeur","Opérateur"] ]))
</span>
<?php } ?>
</div>
<?php } ?>
<script type="text/javascript">
<?php
} ?>
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
mylog.log("render","modules/survey/views/tpls/forms/costum/deal/stepOperateur.php");
var today = new Date();
......@@ -165,5 +164,10 @@ $(document).ready(function() {
});
</script>
});
</script>
<?php } ?>
......@@ -5,7 +5,7 @@ if(!empty($answer) && isset($answer["answers"][$form["id"]][$kunik]))
else if(!empty($answer) && isset($answer["answers"][$kunik]))
$value = $answer["answers"][$kunik];
if($mode == "r"){ ?>
if($mode == "r" || $mode == "pdf"){ ?>
<div class="col-xs-12" id="<?php echo $kunik ?>">
<label for="<?php echo $kunik ?>"><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label ?></h4></label>
<?php
......
......@@ -2,7 +2,7 @@
$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>" : "";
$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>" : "";
$editParamsBtn = ($canEditForm) ? " <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 = [
"group" => [
......@@ -17,7 +17,7 @@ $paramsData = [
"fonctionnement" => "Fonctionnement"
],
"amounts" => [
"price" => "Price"
"price" => "Montant"
],
"estimate" => false
];
......@@ -80,6 +80,7 @@ echo $this->renderPartial("survey.views.tpls.forms.cplx.budgetTable",
"answer"=>$answer,
"mode" => $mode,
"kunik" => $kunik,
"answerPath"=>$answerPath,
"key" => $key,
"titleColor" => $titleColor,
"properties" => $properties,
......@@ -108,7 +109,7 @@ echo $this->renderPartial("survey.views.tpls.forms.cplx.budgetTable",
<?php }
if($mode != "r"){
if($mode != "r" && $mode != "pdf"){
?>
<script type="text/javascript">
......@@ -131,12 +132,17 @@ $(document).ready(function() {
tplCtx.value[k] = $("#"+k).val();
});
var connectedData = ["financer","todo","payed","progress","worker","validFinal","votes",];
$.each( connectedData , function(k,attr) {
if(notNull("answerObj."+tplCtx.path+"."+attr))
tplCtx.value[attr] = jsonHelper.getValueByPath(answerObj,tplCtx.path+"."+attr);
});
mylog.log("save tplCtx",tplCtx);
if(typeof tplCtx.value == "undefined")
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");//$("#ajax-modal").modal('hide');
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -199,8 +205,7 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
//urlCtrl.loadByHash(location.hash);
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -212,7 +217,7 @@ $(document).ready(function() {
mylog.log("render","/modules/costum/views/tpls/forms/<?php echo $kunik ?>.php");
//adds a line into answer
$(".add<?php echo $kunik ?>").off().on("click",function() {
$( ".add<?php echo $kunik ?>" ).off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path")+((notNull(<?php echo $kunik ?>Data) ? <?php echo $kunik ?>Data.length : "0"));
......@@ -324,7 +329,7 @@ $(document).ready(function() {
function closePrioModal(){
prioModal.modal('hide');
}
function closePrioModalRel(){
function closePrioModalRel (){
closePrioModal();
urlCtrl.loadByHash(location.hash);
}
......
<?php
$colspanplus = (($mode == "r") ? 0 : 2);
$styleT = ( ($mode == "pdf") ? " border : 1px solid black ;" : "");
//var_dump($styleT);
$colspanplus = (($mode == "r" || $mode == "pdf") ? 0 : 2);
?>
<div class="form-group">
<?php
if($mode == "r"){ ?>
if($mode == "r" || $mode == "pdf"){ ?>
<label ><h4 style="color:<?php echo (!empty($titleColor) ? $titleColor : "black" ); ?>"><?php echo $label ; ?></h4></label>
<?php echo $info ?>
<?php
......@@ -15,7 +16,8 @@ $colspanplus = (($mode == "r") ? 0 : 2);
<?php echo $info ?>
<?php
} ?>
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik?>">
<table class="table table-bordered table-hover directoryTable" id="<?php echo $kunik ; ?>"
>
<thead>
<?php
......@@ -28,7 +30,7 @@ $colspanplus = (($mode == "r") ? 0 : 2);
} ?>
<?php
if($mode != "r"){ ?>
if($mode != "r" && $mode != "pdf"){ ?>
<th></th>
<?php } ?>
</tr>
......@@ -70,16 +72,17 @@ $colspanplus = (($mode == "r") ? 0 : 2);
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
echo $tds;
if($mode != "r"){
if($mode != "r" && $mode != "pdf"){
?>
<td>
<?php
//echo $answerPath.$q;
$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" => "answers.".$kunik.".".$q,
"path" => $answerPath.$q,
"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>
......@@ -119,7 +122,7 @@ if($total > 0){
echo "<tr class='bold'>";
echo "<td colspan=".(count( $paramsData["amounts"] )+2)." style='text-align:right'> TOTAL : </td>";
if($mode != "r")
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>";
......
......@@ -34,7 +34,7 @@
$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='".$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>" : "";
$editParamsBtn = ($canEditForm) ? " <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>" : "";
?>
<thead>
<tr>
......@@ -144,8 +144,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
//$("#ajax-modal").modal('hide');
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -183,8 +181,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
//$("#ajax-modal").modal('hide');
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -317,7 +317,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");//$("#ajax-modal").modal('hide');
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -362,7 +361,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -491,13 +489,7 @@ $(document).ready(function() {
});
});
function closePrioModal(){
prioModal.modal('hide');
}
function closePrioModalRel(){
closePrioModal();
urlCtrl.loadByHash(location.hash);
}
</script>
<?php } else {
//echo "<h4 class='text-red'>CALENDAR works with existing answers</h4>";
......
......@@ -185,7 +185,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");//$("#ajax-modal").modal('hide');
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -222,7 +221,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -234,7 +234,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");//$("#ajax-modal").modal('hide');
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -281,7 +280,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -57,20 +57,18 @@ $orgs = [];
foreach ($organizations as $id => $or) {
$roles = null;
if(!empty($or["links"]) &&
!empty($or["links"]["memberOf"]) &&
!empty($or["links"]["memberOf"][$this->costum["contextId"]]) &&
!empty($or["links"]["memberOf"][$this->costum["contextId"]]["roles"]) )
$roles = $or["links"]["memberOf"][$this->costum["contextId"]]["roles"];
if( $paramsData["limitRoles"] && !empty($roles))
if( isset( $communityLinks[$id]["roles"] ) )
$roles = $communityLinks[$id]["roles"];
if( $paramsData["limitRoles"] && !empty($roles) )
{
foreach ($roles as $i => $r)
{
foreach ($roles as $i => $r) {
if( in_array($r, $paramsData["limitRoles"]) )
$orgs[$id] = $or["name"];
}
}
}
//var_dump($orgs);exit;
//var_dump($orgs); exit;
$listLabels = array_merge(Ctenat::$financerTypeList,$orgs);
$properties = [
......@@ -409,7 +407,7 @@ if( isset($this->costum["form"]["params"]["financement"]["tpl"])){
// $this->renderPartial( "costum.views.".$this->costum["form"]["params"]["financement"]["tpl"]);
}
?>
<?php if($mode != "pdf"){ ?>
<script type="text/javascript">
if(typeof costum.lists == "undefined")
costum.lists = {};
......@@ -502,7 +500,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -652,6 +649,7 @@ $(document).ready(function() {
});
});
</script>
<?php } ?>
<?php } else {
//echo "<h4 class='text-red'>CALENDAR works with existing answers</h4>";
} ?>
\ No newline at end of file
......@@ -144,7 +144,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");//$("#ajax-modal").modal('hide');
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -183,7 +182,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -230,7 +228,6 @@ $(document).ready(function() {
mylog.log(".editContent", "<?php echo $kunik ?>","tplCtx",tplCtx);
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -139,7 +139,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -9,7 +9,7 @@ $paramsData = [ "options" => [ ] ];
if( isset($this->costum["form"]["params"][$key]) )
$paramsData = $this->costum["form"]["params"][$key];
$editParamsBtn = ($canEdit) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$key."' class='previewTpl edit".$key."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
$editParamsBtn = ($canEditForm) ? " <a href='javascript:;' data-id='".$el["_id"]."' data-collection='".$this->costum["contextType"]."' data-path='costum.form.params.".$key."' class='previewTpl edit".$key."Params btn btn-xs btn-danger'><i class='fa fa-cog'></i> </a>" : "";
?>
<div class="form-group">
......
<?php
if( Form::canFormAccess( ['roles'=>["Financeur"] ]) )
{
if( $mode != "pdf" ){
if( Form::canFormAccess( ['roles'=>["Financeur"] ]) )
{
if( isset($form['id']) )
{
$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>" : "";
......@@ -92,17 +93,17 @@ if( Form::canFormAccess( ['roles'=>["Financeur"] ]) )
<?php
} ?>
<?php
} ?>
<script type="text/javascript">
<script type="text/javascript">
sectionDyf.<?php echo $kunik ?>ParamsData = <?php echo json_encode( $paramsData ); ?>;
sectionDyf.<?php echo $kunik ?>ParamsData = <?php echo json_encode( $paramsData ); ?>;
$(document).ready(function() {
$(document).ready(function() {
mylog.log("render","/modules/costum/views/tpls/forms/cplx/stepValidation.php");
......@@ -133,7 +134,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -246,10 +246,12 @@ $(document).ready(function() {
});
</script>
<?php } else {?>
});
</script>
<?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>
<?php } ?>
\ No newline at end of file
<?php }
}
?>
\ No newline at end of file
......@@ -72,11 +72,13 @@ $organizations = Link::groupFindByType( Organization::COLLECTION,$communityLinks
$orgs = [];
foreach ($organizations as $id => $or) {
if( isset($or["links"]["memberOf"][$this->costum["contextId"]]["roles"]) )
$roles = $or["links"]["memberOf"][ $this->costum["contextId"] ]["roles"];
if( $paramsData["limitRoles"] && !empty($roles))
$roles = null;
if( isset( $communityLinks[$id]["roles"] ) )
$roles = $communityLinks[$id]["roles"];
if( $paramsData["limitRoles"] && !empty($roles) )
{
foreach ($roles as $i => $r)
{
foreach ($roles as $i => $r) {
if( in_array($r, $paramsData["limitRoles"]) )
$orgs[$id] = $or["name"];
}
......@@ -395,9 +397,12 @@ echo "<h4 style='color:".(($titleColor) ? $titleColor : "black")."'>Suivi des d
</div>
<div class="form-worker" style="display:none;">
<select id="worker" style="width:100%;">
<option>Choisir un maitre d'oeuvre</option>
<?php foreach ($orgs as $v => $f) {
<?php
foreach ($orgs as $v => $f) {
echo "<option value='".$v."'>".$f."</option>";
} ?>
</select>
......@@ -569,7 +574,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");//$("#ajax-modal").modal('hide');
urlCtrl.loadByHash(location.hash);
} );
}
......@@ -621,7 +625,6 @@ $(document).ready(function() {
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").html("<div class='text-center'><i class='fa fa-spin fa-spinner'></i></div>");
urlCtrl.loadByHash(location.hash);
} );
}
......
......@@ -51,8 +51,8 @@ if( isset( $form["inputs"] ) ){ ?>
//fin nouvelle repositionnement
//echo json_encode($form["inputs"]) ;
echo "<ul class='questionList'>";
$dragNDrop = ($canEditForm) ? "dragNDrop" : "" ;
echo "<ul class='questionList ".$dragNDrop."'>";
foreach ( $form["inputs"] as $key => $input) {
$editQuestionBtn = ($canEditForm) ? " <a class='btn btn-xs btn-danger editQuestion' href='javascript:;' data-form='".$form["id"]."' data-id='".$form["_id"]."' data-collection='".Form::COLLECTION."' data-key='".$key."' data-path='inputs.".$key."'><i class='fa fa-pencil'></i></a>".
......@@ -309,7 +309,7 @@ jQuery(document).ready(function() {
}
//questions can be ordered by drag n drop
$( ".questionList" ).sortable({
$( ".dragNDrop" ).sortable({
stop: