diff --git a/common/config/main.php b/common/config/main.php index 4bd4999..0f169d8 100644 --- a/common/config/main.php +++ b/common/config/main.php @@ -52,5 +52,17 @@ 'useFilename' => true, 'absoluteUrl' => false, ], + 'mailer' => [ + 'class' => 'yii\swiftmailer\Mailer', + 'viewPath'=>'@common/mail', + 'transport' => [ + 'class' => 'Swift_SmtpTransport', + 'host' => 'smtp.gmail.com', + 'username' => 'kbenergy.kiev@gmail.com', + 'password' => '', + 'port' => '587', + 'encryption' => 'tls', + ], + ], ], ]; diff --git a/common/config/settings.php b/common/config/settings.php index 79a91ba..9e74fbc 100644 --- a/common/config/settings.php +++ b/common/config/settings.php @@ -5,7 +5,7 @@ return [ 'phone' => '+38 (068) 380-39-82', 'phone2' => '', 'skype' => '', - 'email' => 'zhegal@gmail.com', + 'email' => 'kbenergy.kiev@gmail.com', 'house' => '1-М', 'street' => 'пр. М. Бажана', 'office' => '25', diff --git a/common/mail/feedback.php b/common/mail/feedback.php new file mode 100644 index 0000000..2ec66b3 --- /dev/null +++ b/common/mail/feedback.php @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
title; ?>

Имя: name; ?>
Email: email; ?>
Телефон: phone; ?>
Текст сообщения: message; ?>
diff --git a/common/models/Feedback.php b/common/models/Feedback.php index 6be03a2..d775ca2 100644 --- a/common/models/Feedback.php +++ b/common/models/Feedback.php @@ -12,6 +12,7 @@ use yii\db\ActiveRecord; * * @property integer $id * @property string $name + * @property string $title * @property string $email * @property string $phone * @property string $message diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 8575678..6aab7cb 100644 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -1,7 +1,7 @@ load(Yii::$app->request->post()) && $model->save()) { + Yii::$app->mailer->compose('feedback.php', ['model' => $model]) + ->setFrom('zhegal@gmail.com') + ->setTo($model->email) + ->setSubject($model->title) + ->send(); return [ 'success' => true, 'message' => 'Success message', diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index c1a11fa..1d055bd 100644 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -306,19 +306,19 @@ _________________________________________________________ --> 'items' => [ [ 'label' => \Yii::t('app', 'Чому ми'), - 'url' => [ '#section1' ], + 'url' => [ '../#section1' ], ], [ 'label' => \Yii::t('app', 'Наші проекти'), - 'url' => [ '#section2' ], + 'url' => [ '../#section2' ], ], [ 'label' => \Yii::t('app', '10 кроків до енергонезалежності'), - 'url' => [ '#section3' ], + 'url' => [ '../#section3' ], ], [ 'label' => \Yii::t('app', 'Контакти'), - 'url' => [ '#section4' ], + 'url' => [ '../#section4' ], ], ], 'options' => [ @@ -379,6 +379,9 @@ _________________________________________________________ --> ] ); ?> + field($feedback, 'title') + ->hiddenInput(); ?> + field($feedback, 'name') ->textInput(); ?> @@ -479,7 +482,7 @@ _________________________________________________________ --> - Напишіть нам + Напишіть нам
diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index 3303dfe..6cef142 100644 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -202,15 +202,15 @@ $this->registerJs($js, View::POS_END);
- Замовити консультацію - Розрахувати вартість проекту + Замовити консультацію + Розрахувати вартість проекту
-
+

Чому ми

@@ -242,7 +242,7 @@ $this->registerJs($js, View::POS_END);

Енергоаудит

-

перед встановленням ми робимо повний аналіз вашої домашньої енергосистеми

+

перед встановленням ми робимо повний аналіз вашої енергосистеми

@@ -255,14 +255,14 @@ $this->registerJs($js, View::POS_END);
-
+
@@ -289,23 +289,23 @@ $this->registerJs($js, View::POS_END);
@@ -325,7 +325,7 @@ $this->registerJs($js, View::POS_END);
-
+
@@ -362,7 +362,7 @@ $this->registerJs($js, View::POS_END);
-
+
@@ -455,7 +455,7 @@ $this->registerJs($js, View::POS_END);

Або звернутись до нас та

diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css index b75a105..d6338d6 100644 --- a/frontend/web/css/style.css +++ b/frontend/web/css/style.css @@ -167,4 +167,10 @@ a.sqre_btn { display: inline-block; position: relative; width: 100%; +} +.field-feedback-title{display:none!important;} +#footer { + background: #0080ca; + padding: 50px 0; + color: #ffffff; } \ No newline at end of file diff --git a/frontend/web/js/script.js b/frontend/web/js/script.js index e16451c..0633303 100644 --- a/frontend/web/js/script.js +++ b/frontend/web/js/script.js @@ -178,6 +178,24 @@ $( w: 960, h: 535, title: 'Нами розроблена металоконструкція для встановлення сонячних панелей для наземних сонячних електростанцій, яка може застосовуватися як для промислових об\'єктів так і для приватних домоволодінь.', + }, + { + src: '../img/galpics/15.jpg', + w: 1398, + h: 790, + title: 'Нами розроблена металоконструкція для встановлення сонячних панелей для наземних сонячних електростанцій, яка може застосовуватися як для промислових об\'єктів так і для приватних домоволодінь.', + }, + { + src: '../img/galpics/16.jpg', + w: 1054, + h: 790, + title: 'Нами розроблена металоконструкція для встановлення сонячних панелей для наземних сонячних електростанцій, яка може застосовуватися як для промислових об\'єктів так і для приватних домоволодінь.', + }, + { + src: '../img/galpics/17.jpg', + w: 1054, + h: 790, + title: 'Нами розроблена металоконструкція для встановлення сонячних панелей для наземних сонячних електростанцій, яка може застосовуватися як для промислових об\'єктів так і для приватних домоволодінь.', } ]; @@ -233,5 +251,10 @@ $( return false; }); + + $(".modaled").on('click', function(){ + $(".modal-title#Login").text($(this).data('title')); + $(".field-feedback-title #feedback-title").val($(this).data('title')); + }); } ); \ No newline at end of file -- libgit2 0.21.4