From d23c67c036d687dd5f0021453620c282c054fb09 Mon Sep 17 00:00:00 2001 From: dozer111 Date: Tue, 14 Aug 2018 11:22:00 +0300 Subject: [PATCH] правки по формам --- common/messages/ua/app.php | 2 +- frontend/config/main.php | 3 ++- frontend/controllers/SiteController.php | 12 ------------ frontend/views/site/index.php | 7 +++---- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/common/messages/ua/app.php b/common/messages/ua/app.php index afea675..9552929 100644 --- a/common/messages/ua/app.php +++ b/common/messages/ua/app.php @@ -7,7 +7,7 @@ return [ 'Believe Us' => 'НАМ ДОВІРЯЮТЬ', - + 'Callback' => 'Зворотнiй дзвінок', 'About Product' => 'ПРО ТОВАР', 'Advantages' => 'ПЕРЕВАГИ', 'Message wasn`t send' => 'Сообщение не отправлено', diff --git a/frontend/config/main.php b/frontend/config/main.php index 7ca9c90..a66060b 100755 --- a/frontend/config/main.php +++ b/frontend/config/main.php @@ -11,6 +11,7 @@ $send="Отправить"; $request1='Ваша заявка'; + if(strpos($_SERVER['REQUEST_URI'],"/ua")!==false) { $send = "Вiдправити"; @@ -314,7 +315,7 @@ ], 'buttonTemplate' => '
{button}
', - 'buttonContent' => ''.$send, + 'buttonContent' => $send, 'sendEmail' => true, 'email' => 'alkhonko@gmail.com', 'subject' => 'test tt22', diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 3cb10e4..6870b37 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -45,18 +45,6 @@ ]; } - public function actionSave(){ - - $model=new Feedback(); - $model->setScenario(Feedback::SCENARIO_CALLBACK); - - if(Yii::$app->request->post() && $model->load(Yii::$app->request->post())) - { - $model->save(); - Yii::$app->response->format = Response::FORMAT_JSON; - return Yii::$app->request->referrer; - } - } /** diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index 8e88bcf..53fb0f0 100644 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -12,14 +12,13 @@ use artbox\core\models\Language; * @var object $model artbox\core\models\Feedback */ - $send="Отправить"; $request1='Ваша заявка'; if(strpos($_SERVER['REQUEST_URI'],"/ua")!==false) { $send = "Вiдправити"; -} +} $settings = Settings::getInstance(); @@ -452,9 +451,9 @@ $moduleRequest=\Yii::$app->getModule('request_1');