Commit 8a080313 authored by Raph El's avatar Raph El

Form : Hotfix multi save

parent 0a6eba0d
......@@ -105,7 +105,7 @@
<?php
$cle = $key ;
$value = (!empty($answers)) ? " value='".$answers."' " : "";
$inpClass = " saveOneByOne";
......@@ -440,7 +440,7 @@ jQuery(document).ready(function() {
mylog.log("render form input","/modules/costum/views/tpls/forms/cplx/multiCheckbox.php");
answer = {};
$('.ckbCo').change(function(){
$('#question<?php echo $cle ?> .ckbCo').change(function(){
var allckd = [];
// alert('<?php echo $kunik ?>');
$("input:checkbox[name='"+$(this).attr("name")+"']:checked").each(function(){
......@@ -462,7 +462,7 @@ jQuery(document).ready(function() {
});
});
$('.inputckbCo').keyup(function(){
$('#question<?php echo $cle ?> .inputckbCo').keyup(function(){
if($('input[value="' + $(this).data("imp") + '"]').is(':checked')) {
var allckd = [];
......
......@@ -93,7 +93,7 @@
<?php
$cle = $key ;
$value = (!empty($answers)) ? " value='".$answers."' " : "";
$inpClass = " saveOneByOne";
......@@ -383,7 +383,7 @@ jQuery(document).ready(function() {
mylog.log("render form input","/modules/costum/views/tpls/forms/cplx/multiCheckbox.php");
answer = {};
$('.radioCo').change(function(){
$('#question<?php echo $cle ?> .radioCo').change(function(){
if($(this).data("type") == "simple"){
answer.path = "answers."+$(this).data("form")+"."+$(this).data("id");
answer.collection = "answers" ;
......@@ -403,7 +403,8 @@ jQuery(document).ready(function() {
}
});
$('.inputRadioCo').keyup(function(){
$('#question<?php echo $cle ?> .inputRadioCo').keyup(function(){
if($('input[value="' + $(this).data("imp") + '"]').is(':checked')) {
console.log('here');
answer.path = "answers."+$(this).data("form")+"."+$(this).data("id");
......@@ -415,8 +416,7 @@ jQuery(document).ready(function() {
//toastr.success('saved');
} );
}
})
});
sectionDyf.<?php echo $kunik ?>Params = {
"jsonSchema" : {
......
......@@ -194,7 +194,7 @@ if($mode == "r"){ ?>
}else{
?>
<div class="input-grp " style="position: relative; padding-top: 50px; text-transform: unset;">
<label for="<?php echo $key ?>"><h4 style="text-transform: unset; color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn ?></h4></label>
<label for="<?php echo $key ?>"><h4 style="text-transform: unset; color <?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $kunik ; ?><?php echo $label.$editQuestionBtn ?></h4></label>
<br/>
<div class="multiinput" data-validate="Valid email is required: ex@abc.xyz">
......@@ -276,9 +276,7 @@ if($mode == "r"){ ?>
dyFObj.openForm( sectionDyf.<?php echo $kunik ?>Params,null, sectionDyf.<?php echo $kunik ?>ParamsData);
});
});
$('.effect-2').each(function(){
$('#question<?php echo $key ?> .effect-2').each(function(){
$(this).on('blur', function(){
if($(this).val().trim() != "") {
$(this).addClass('has-val');
......@@ -289,12 +287,11 @@ if($mode == "r"){ ?>
})
})
$('.effect-2').each(function(){
$('#question<?php echo $key ?> .effect-2').each(function(){
$(this).on('blur', function(){
if(validate(this) == false){
showValidate(this);
}
else {
} else {
if($(this).attr('type') == 'email' ) {
$(this).parent().addClass('true-validate');
}
......@@ -308,14 +305,17 @@ if($mode == "r"){ ?>
});
}
})
})
});
$('.effect-2').each(function(){
$('#question<?php echo $key ?> .effect-2').each(function(){
$(this).focus(function(){
hideValidate(this);
$(this).parent().removeClass('true-validate');
});
});
});
function validate (input) {
if($(input).attr('type') == 'email' ) {
......
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