amic 8 mesi fa
parent
commit
808176b887
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      views/layouts/main.php

+ 3 - 1
views/layouts/main.php

@@ -186,8 +186,10 @@ $filterurl = \yii\helpers\Url::base('https')."/inquirer/ajax";
 $this->registerJs(
 <<<JS
     function sendask(idq){
+		var param = $('meta[name="csrf-param"]').attr("content");
+		var token = $('meta[name="csrf-token"]').attr("content");
 		ask = $('input:checked[name=ask_'+idq+']').val()
-		$.post( "$filterurl", { 'idq': idq, 'ask': ask }, function( data ) {
+		$.post( "$filterurl", { 'idq': idq, 'ask': ask, '_csrf' : token}, function( data ) {
 			if( data.status == 'ok' ){
 				//document.location.reload();
 				console.log(data.status);