params[ 'breadcrumbs' ][] = [ 'label' => \Yii::t('app', 'Блог'), 'url' => [ 'blog/index' ], ]; $this->params[ 'breadcrumbs' ][] = $model->title; $moduleComment = \Yii::$app->getModule('comments'); $moduleComment->inputOptions = array_merge($moduleComment->inputOptions, ['entity_id' => [ 'type' => 'hiddenInput', 'options' => ['value' => $model->id], ], 'entity' => [ 'type' => 'hiddenInput', 'options' => ['value' => Article::className()], ]]); $moduleComment->buttonTemplate = '
'; $moduleComment->successCallback = 'function (data) { document.getElementById("comment-form").reset(); var data = $("#comment-form").data(\'yiiActiveForm\'); $("#comment-form").find(".submit-close-c-a span").click(); $("#comment-form").find(".field-comment-comment").parent().after("Ваш отзыв появиться после проверки модератором
") data.validated = false; }' ?>