|
@@ -13,7 +13,7 @@ use yii\web\View;
|
|
|
$id = $design->parent_id;
|
|
|
$query = Inquirer::find()->where([ 'active'=>'Y', 'id'=>$id])->limit(1)->One();
|
|
|
$model = $query;
|
|
|
-echo "<!-- 1 опроса широкий -->";
|
|
|
+echo "<!-- 1 опроса широкий -->\n";
|
|
|
if(!is_null($design->parent)){
|
|
|
echo Html::tag('h2',Html::a($design->parent->title,[$design->parent->getUrl()]),['class'=>"widget-title mt-2 text-center"]);
|
|
|
}
|
|
@@ -58,23 +58,6 @@ if( $model->show == 'N' ){
|
|
|
window.bghtml[<?=$model->id?>] = '<?=$bghtml?>';
|
|
|
</script>
|
|
|
<?
|
|
|
-$filterurl = \yii\helpers\Url::base('https')."/inquirer/ajax";
|
|
|
-$this->registerJs(
|
|
|
-<<<JS
|
|
|
- function sendask(idq){
|
|
|
- ask = $('input:checked[name=ask_'+idq+']').val()
|
|
|
- $.post( "$filterurl", { 'idq': idq, 'ask': ask }, function( data ) {
|
|
|
- if( data.status == 'ok' ){
|
|
|
- //document.location.reload();
|
|
|
- console.log(data.status);
|
|
|
- $(".answer[key='"+idq+"']").html(window.bghtml[idq]);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-JS
|
|
|
- ,
|
|
|
- View::POS_END, 'sendask'
|
|
|
-);
|
|
|
}
|
|
|
?>
|
|
|
</div>
|