'app-frontend', 'homeUrl' => '/', 'basePath' => dirname(__DIR__), 'bootstrap' => [ 'log' ], 'controllerNamespace' => 'frontend\controllers', 'container' => [ 'singletons' => [ 'artbox\core\services\Languages' =>'artbox\core\services\Languages', ] ], 'modules' => [ 'feedback' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "artbox\core\models\Feedback", 'attributes' => [ 'name', 'phone', 'message', ], 'rules' => [ [ [ 'name', 'phone', ], 'required', ] ], 'labels' => [ 'name' => 'Name', 'message' => 'Message', 'phone' => 'Phone' ], 'inputOptions' => [ 'name' => [ 'template' => '
{input}
' ], 'phone' => [ 'template' => '
{input}
' ], 'message' => [ 'type' => 'textarea', 'options' => [], 'template' => '
{input}
' ], ], 'buttonTemplate' => '
{button}
', 'buttonOptions' => [], 'buttonContent' => 'Send', 'sendEmail' => false, 'ajax' => true, 'formId' => 'feedback-form', 'scenario' => 'callback', 'successCallback' => 'function (data) { document.getElementById("feedback-form").reset(); $(".close").click(); if (data.status == "success"){ document.getElementById("feedback-form").reset(); $(".success_").animate({opacity: 1, top: \'40\'}, 200).addClass("done_"); setTimeout(function(){$(".success_").animate({opacity: 0, top: \'0\'}, 200,function(){ $(this).removeClass("done_"); })}, 4000); var data = $("#feedback-form").data(\'yiiActiveForm\'); data.validated = false; } }', ], 'comments' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "common\models\Comment", 'attributes' => [ 'name', 'email', 'comment', 'service_id' ], 'rules' => [ [ [ 'name', 'email', ], 'required', ] ], 'labels' => [ 'name' => 'ФИО', 'email' => 'Email', 'comment' => 'Ваш отзыв', 'service_id' => false ], 'inputOptions' => [ 'name' => [ 'template' => '
{input}
' ], 'email' => [ 'template' => '
{input}
' ], 'comment' => [ 'type' => 'textarea', 'options' => [], 'template' => '
{input}
' ], ], 'buttonTemplate' => '
{button}
Закрыть окно
', 'buttonOptions' => [], 'buttonContent' => 'Отправить отзыв', 'sendEmail' => false, 'ajax' => true, 'formId' => 'comment-form', 'scenario' => 'default', '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").parent().parent().parent().find(".service-c-a-btns").after("

Ваш отзыв появиться после проверки модератором

") data.validated = false; }', ], 'questions' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "common\models\Question", 'attributes' => [ 'name', 'email', 'question', 'service_id' ], 'rules' => [ [ [ 'name', 'email', ], 'required', ] ], 'labels' => [ 'name' => 'ФИО', 'email' => 'Email', 'question' => 'Ваш вопрос', 'service_id' => false ], 'inputOptions' => [ 'name' => [ 'template' => '
{input}
' ], 'email' => [ 'template' => '
{input}
' ], 'question' => [ 'type' => 'textarea', 'options' => [], 'template' => '
{input}
' ], ], 'buttonTemplate' => '
{button}
Закрыть окно
', 'buttonOptions' => [], 'buttonContent' => 'Отправить вопрос', 'sendEmail' => false, 'ajax' => true, 'formId' => 'question-form', 'scenario' => 'question', 'successCallback' => 'function (data) { document.getElementById("question-form").reset(); var data = $("#question-form").data(\'yiiActiveForm\'); $("#question-form").find(".submit-close-c-a span").click(); $("#question-form").parent().parent().parent().find(".service-c-a-btns").after("

Спасибо за Вваш вопрос. Мы обязательно на него ответим

") data.validated = false; }', ], 'visit' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "common\models\Visit", 'attributes' => [ 'name', 'phone', 'email', 'message', 'entity', 'entity_id' ], 'rules' => [ [ [ 'phone', ], 'required', ] ], 'labels' => [ 'name' => 'ФИО', 'email' => 'Email', 'phone' => 'Телефон', 'message' => 'Сообщение', 'entity_id' => false, 'entity' => false ], 'inputOptions' => [ 'entity' => [ 'type' => 'hiddenInput' ], 'entity_id' => [ 'type' => 'hiddenInput' ], 'name' => [ 'template' => '
{input}
' ], 'email' => [ 'template' => '
{input}
' ], 'phone' => [ 'template' => '
{input}
', 'options' => [ 'placeholder' => '(0__)___-__-__' ] ], 'message' => [ 'type' => 'textarea', 'options' => ['cols' => 30, 'rows'=> 10], 'template' => '
{input}
' ], ], 'buttonTemplate' => '
{button}
Закрыть окно
', 'buttonOptions' => [], 'buttonContent' => 'Отправить', 'sendEmail' => false, 'ajax' => true, 'formId' => 'visit-form', 'scenario' => 'default', 'successCallback' => 'function (data) { document.getElementById("visit-form").reset(); var data = $("#visit-form").data(\'yiiActiveForm\'); data.validated = false; success(); }', ], ], 'components' => [ 'assetManager' => [ 'bundles' => [ 'yii\bootstrap\BootstrapAsset' => [ 'basePath' => '@webroot', 'baseUrl' => '@web', 'css' => [], ], 'frontend\assets\ArtboxModalAsset' => [ 'basePath' => '@webroot', 'baseUrl' => '@web', 'css' => [], ], ], 'appendTimestamp' => true, ], 'request' => [ 'csrfParam' => '_csrf-frontend', 'baseUrl' => '', ], 'user' => [ 'identityClass' => 'common\models\User', 'enableAutoLogin' => true, 'identityCookie' => [ 'name' => '_identity-frontend', 'httpOnly' => true, ], ], 'session' => [ // this is the name of the session cookie used for login on the frontend 'name' => 'advanced-frontend', ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => [ 'error', 'warning', ], ], ], ], 'seo' => [ 'class' => SeoComponent::className(), ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'urlManager' => [ 'class' => UrlManager::className(), 'baseUrl' => '/', 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [], 'hideDefaultLanguagePrefix' => true, ], ], 'params' => $params, ];