validationForm.php 1008 Bytes
Newer Older
Raph El's avatar
Raph El committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<?php 

if($mode != "pdf"){
?>
<div class="">
    <label for="<?php echo $key ?>"><h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn ?></h4></label>
    <div class="text-center">
    	<button class="btn btn-primary" id="validation<?php echo $kunik ?>">Validation</button>
    </div>
</div>

<script type="text/javascript">
	jQuery(document).ready(function() {
	    mylog.log("render form input","/modules/costum/views/tpls/forms/cplx/validate.php");
	    $("#validation<?php echo $kunik ?>").click(function(){
			var params = {
				answerId : answerId,
				answer : answerObj.answers
			};

			ajaxPost(
		        null,
		        baseUrl+"/survey/answer/validate",
		        params,
		        function(data){
		        	toastr.success("Le formulaire à été soumis");    
		        },
		        function(data){
		        	toastr.error("Un soucis est apparue. Contacter l'administrateur");    
		        }
		    );

		});
	});


	
	
</script>
<?php } ?>