Commit b0ee9eddf7c09fb12c4c27e42073701a925481b0

Authored by Anastasia
2 parents 9cbe82b5 ae6f91d8

Merge remote-tracking branch 'origin/master'

common/messages/en/app.php
@@ -39,4 +39,4 @@ @@ -39,4 +39,4 @@
39 'Читать далее' => 'Read more', 39 'Читать далее' => 'Read more',
40 40
41 41
42 - ];  
43 \ No newline at end of file 42 \ No newline at end of file
  43 +];
44 \ No newline at end of file 44 \ No newline at end of file
common/messages/en/core.php
1 <?php 1 <?php
2 2
3 return [ 3 return [
4 - 'name'=>'Name',  
5 - 'email'=>'Email',  
6 - 'phone'=>'Phone',  
7 - 'message'=>'Message',  
8 - 4 + 'name' =>'Name',
  5 + 'email' =>'Email',
  6 + 'phone' =>'Phone',
  7 + 'message' =>'Message',
  8 + 'Message' => 'forntrend message',
9 ]; 9 ];
10 \ No newline at end of file 10 \ No newline at end of file
common/messages/ru/app.php
1 <?php 1 <?php
2 - return [  
3 - 'Home' => 'Главная',  
4 - 'Contacts' => 'Контакты',  
5 - 'About' => 'О нас',  
6 - 'Blog' => 'Блог',  
7 - 'Events' => 'Мероприятия',  
8 - 'You question' => 'Ваш вопрос',  
9 - 'Contact us!' => 'Свяжитесь с нами',  
10 - 'Go to contact page' => 'Перейти на страницу контактов',  
11 - 'Send message' => 'Отправить сообщение',  
12 - 'Contact form' => "Форма для связи",  
13 - 'News' => 'Новости',  
14 - 'Media' => 'Медиа',  
15 - 'More' => 'Подробнее',  
16 - 'Company Blog' => 'Блог компании',  
17 - 'Message' => 'Сообщения',  
18 - 'Name' => 'Имя',  
19 - 'Phone' => 'Телефон',  
20 - 'blog-txt' => ' Мы собираем полезные материалы по тематике бытовой техники и электроники',  
21 - 'Continue reading' => 'Продолжить чтение',  
22 - 'Address' => 'Адрес',  
23 - 'phone' => 'Телефон',  
24 - 'Form sends success' => 'Форма успешно отправлена',  
25 - 'Gallery' =>'Галерея',  
26 - 'Categories' => 'Категории',  
27 - 'Without category' =>'Без категории',  
28 - 'No results found' =>'Ничего не найдено',  
29 - 'Form sends success Header' => 'Форма успешно отправлена ',  
30 - 'Our advantages' => 'Наши преимущества',  
31 - 'Our clients' =>'Наши клиенты',  
32 - 'Send' => 'Отправить',  
33 - 'Empty field' => 'Поле является обязательным для заполнения',  
34 - "Search" => 'Поиск',  
35 - 'Search by tag' => 'Поиск по тегам',  
36 - "Search by article" => 'Поиск по статьям',  
37 - 'Wrong email' => 'Поле Email не валидное', 2 +return [
  3 + 'Home' => 'Главная',
  4 + 'Contacts' => 'Контакты',
  5 + 'About' => 'О нас',
  6 + 'Blog' => 'Блог',
  7 + 'Events' => 'Мероприятия',
  8 + 'You question' => 'Ваш вопрос',
  9 + 'Contact us!' => 'Свяжитесь с нами',
  10 + 'Go to contact page' => 'Перейти на страницу контактов',
  11 + 'Send message' => 'Отправить сообщение',
  12 + 'Contact form' => "Форма для связи",
  13 + 'News' => 'Новости',
  14 + 'Media' => 'Медиа',
  15 + 'More' => 'Подробнее',
  16 + 'Company Blog' => 'Блог компании',
38 17
  18 + 'Name' => 'Имя',
  19 + 'Phone' => 'Телефон',
  20 + 'blog-txt' => ' Мы собираем полезные материалы по тематике бытовой техники и электроники',
  21 + 'Continue reading' => 'Продолжить чтение',
  22 + 'Address' => 'Адрес',
  23 + 'phone' => 'Телефон',
  24 + 'Form sends success' => 'Форма успешно отправлена',
  25 + 'Gallery' =>'Галерея',
  26 + 'Categories' => 'Категории',
  27 + 'Without category' =>'Без категории',
  28 + 'No results found' =>'Ничего не найдено',
  29 + 'Form sends success Header' => 'Форма успешно отправлена ',
  30 + 'Our advantages' => 'Наши преимущества',
  31 + 'Our clients' =>'Наши клиенты',
  32 + 'Send' => 'Отправить',
  33 + 'Empty field' => 'Поле является обязательным для заполнения',
  34 + "Search" => 'Поиск',
  35 + 'Search by tag' => 'Поиск по тегам',
  36 + "Search by article" => 'Поиск по статьям',
  37 + 'Wrong email' => 'Поле Email не валидное',
  38 + 'Message' => 'Сообщение',
  39 + '<i class="fa fa-envelope-o"></i>Send Message' => 'Отправить сообщение',
39 40
40 - ];  
41 \ No newline at end of file 41 \ No newline at end of file
  42 +];
42 \ No newline at end of file 43 \ No newline at end of file
common/messages/ua/app.php
1 <?php 1 <?php
2 - return [  
3 - 'Home' => 'Головна',  
4 - 'Contacts' => 'Контакти',  
5 - 'About' => 'Про нас',  
6 - 'Blog' => 'Блог',  
7 - 'Events' => 'Заходи',  
8 - 'Empty field' => 'Поле є обов\'язковим для заповнення',  
9 - 'Name' => 'Ім\'я',  
10 - 'Phone' => 'Телефон',  
11 - 'Message' => 'Повідомленя',  
12 - 'You question' => 'Ваше питання',  
13 - 'Send' => 'Відправити',  
14 - 'Contact us!' => 'Зв\'яжіться з нами',  
15 - 'Go to contact page' => 'Перейти до сторінки контактів',  
16 - 'Читать далее' => 'Читати далі',  
17 - "Send message" => 'Надіслати повідомлення',  
18 - "Contact form" => 'Форма для зв\'язку',  
19 - 'News' => 'Новини',  
20 - 'Media' => 'Медіа',  
21 - 'More' => 'Докладніше',  
22 - 'Company Blog' => 'Блог компанії',  
23 - 'Categories' => 'Категорії',  
24 - 'blog-txt' => 'Ми збираємо корисні матеріали з тематики побутової техніки та електроніки',  
25 - 'Continue reading' => 'Продовжити читання',  
26 - 'Address' => 'Адреса',  
27 - 'phone' => 'телефон',  
28 - 'Gallery' =>'Галерея',  
29 - 'Without category' =>'Без категорії',  
30 - 'No results found' =>'Нічого не знайдено',  
31 -  
32 - 'Our advantages' => 'Наші переваги',  
33 - 'Our clients'=>'Наші клієнти',  
34 -  
35 - 'Search'=>'Пошук',  
36 - 'Search by tag' => 'Пошук по тегам',  
37 - "Search by article"=>'Поиск по статтям',  
38 -  
39 - 'Form sends success Header' => 'Форма успішно відправлена',  
40 - 'name' => 'Ім\'я',  
41 - 'email' => 'Email',  
42 - 'message' => 'Повідомленя',  
43 - 'Form sends success' => 'Форма успішно відправлена ',  
44 - 'Wrong email' => 'Поле Email не валідне ',  
45 -  
46 - ];  
47 \ No newline at end of file 2 \ No newline at end of file
  3 +return [
  4 + 'Home' => 'Головна',
  5 + 'Contacts' => 'Контакти',
  6 + 'About' => 'Про нас',
  7 + 'Blog' => 'Блог',
  8 + 'Events' => 'Заходи',
  9 + 'Empty field' => 'Поле є обов\'язковим для заповнення',
  10 + 'Name' => 'Ім\'я',
  11 + 'Phone' => 'Телефон',
  12 + 'Message' => 'Повідомленя',
  13 + 'You question' => 'Ваше питання',
  14 + 'Send' => 'Відправити',
  15 + 'Contact us!' => 'Зв\'яжіться з нами',
  16 + 'Go to contact page' => 'Перейти до сторінки контактів',
  17 + 'Читать далее' => 'Читати далі',
  18 + "Send message" => 'Надіслати повідомлення',
  19 + "Contact form" => 'Форма для зв\'язку',
  20 + 'News' => 'Новини',
  21 + 'Media' => 'Медіа',
  22 + 'More' => 'Докладніше',
  23 + 'Company Blog' => 'Блог компанії',
  24 + 'Categories' => 'Категорії',
  25 + 'blog-txt' => 'Ми збираємо корисні матеріали з тематики побутової техніки та електроніки',
  26 + 'Continue reading' => 'Продовжити читання',
  27 + 'Address' => 'Адреса',
  28 + 'phone' => 'телефон',
  29 + 'Gallery' =>'Галерея',
  30 + 'Without category' =>'Без категорії',
  31 + 'No results found' =>'Нічого не знайдено',
  32 +
  33 + 'Our advantages' => 'Наші переваги',
  34 + 'Our clients'=>'Наші клієнти',
  35 +
  36 + 'Search'=>'Пошук',
  37 + 'Search by tag' => 'Пошук по тегам',
  38 + "Search by article"=>'Поиск по статтям',
  39 +
  40 + 'Form sends success Header' => 'Форма успішно відправлена',
  41 + 'name' => 'Ім\'я',
  42 + 'email' => 'Email',
  43 + 'message' => 'Повідомленя',
  44 + 'Form sends success' => 'Форма успішно відправлена ',
  45 + 'Wrong email' => 'Поле Email не валідне ',
  46 + '<i class="fa fa-envelope-o"></i>Send Message' => 'Відправити повідомлення',
  47 +];
48 \ No newline at end of file 48 \ No newline at end of file
common/messages/ua/core.php
1 <?php 1 <?php
2 2
3 return [ 3 return [
4 - 'name'=>'Ім\'я',  
5 - 'email'=>'Email',  
6 - 'phone'=>'Телефон',  
7 - 'message'=>'Повідомленя',  
8 - 'Name'=>'Ім\'я',  
9 - 'Email'=>'Email',  
10 - 'Phone'=>'Телефон',  
11 - 'Message'=>'Повідомленя' 4 + 'name' =>'Ім\'я',
  5 + 'email' =>'Email',
  6 + 'phone' =>'Телефон',
  7 + 'message' =>'Повідомленя',
  8 + 'Name' =>'Ім\'я',
  9 + 'Email' =>'Email',
  10 + 'Phone' =>'Телефон',
  11 + 'Message' => 'Повідомленя',
  12 + #'Send message'=>'Відправити повідомлення'
12 ]; 13 ];
13 \ No newline at end of file 14 \ No newline at end of file
frontend/assets/AppAsset.php
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 'js/owl.carousel.min.js', 32 'js/owl.carousel.min.js',
33 'js/script.js', 33 'js/script.js',
34 'js/modal.js', 34 'js/modal.js',
35 - 'js/jquery.mask.min.js', 35 + 'js/jquery.mask.min.js',
36 ]; 36 ];
37 public $depends = [ 37 public $depends = [
38 'yii\web\YiiAsset', 38 'yii\web\YiiAsset',
frontend/config/main.php
@@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
2 use artbox\core\components\SeoComponent; 2 use artbox\core\components\SeoComponent;
3 use frontend\components\UrlManager; 3 use frontend\components\UrlManager;
4 4
  5 + $a = \Yii::t('app', 'Message');
  6 +
5 $params = array_merge( 7 $params = array_merge(
6 require( __DIR__ . '/../../common/config/params.php' ), 8 require( __DIR__ . '/../../common/config/params.php' ),
7 require( __DIR__ . '/../../common/config/params-local.php' ), 9 require( __DIR__ . '/../../common/config/params-local.php' ),
@@ -12,14 +14,18 @@ @@ -12,14 +14,18 @@
12 'id' => 'app-frontend', 14 'id' => 'app-frontend',
13 'homeUrl' => '/', 15 'homeUrl' => '/',
14 'basePath' => dirname(__DIR__), 16 'basePath' => dirname(__DIR__),
15 - 'bootstrap' => [ 'log' ], 17 + 'bootstrap' => [
  18 + 'log',
  19 + 'i18n',
  20 + 'contact',
  21 + ],
16 'controllerNamespace' => 'frontend\controllers', 22 'controllerNamespace' => 'frontend\controllers',
17 - 'container' => [ 23 + 'container' => [
18 'singletons' => [ 24 'singletons' => [
19 'artbox\core\services\Languages' =>'artbox\core\services\Languages', 25 'artbox\core\services\Languages' =>'artbox\core\services\Languages',
20 ] 26 ]
21 ], 27 ],
22 - 28 +
23 'components' => [ 29 'components' => [
24 'request' => [ 30 'request' => [
25 'csrfParam' => '_csrf-frontend', 31 'csrfParam' => '_csrf-frontend',
@@ -79,9 +85,9 @@ @@ -79,9 +85,9 @@
79 ], 85 ],
80 'modules' => [ 86 'modules' => [
81 'feedback' => [ 87 'feedback' => [
82 - 'class' => 'artbox\core\forms\Module',  
83 - 'activeRecord' => "artbox\core\models\Feedback",  
84 - 'attributes' => [ 88 + 'class' => 'artbox\core\forms\Module',
  89 + 'activeRecord' => "frontend\models\Feedback",
  90 + 'attributes' => [
85 'name', 91 'name',
86 'email', 92 'email',
87 'message', 93 'message',
@@ -111,7 +117,7 @@ @@ -111,7 +117,7 @@
111 'options' => [], 117 'options' => [],
112 ], 118 ],
113 ], 119 ],
114 - 'buttonContent' => \Yii::t('app','Send'), 120 + 'buttonContent' => \Yii::t('app', 'Send'),
115 'scenario' => 'feedback', 121 'scenario' => 'feedback',
116 'sendEmail' => false, 122 'sendEmail' => false,
117 'formId' => 'feedback-form', 123 'formId' => 'feedback-form',
@@ -131,16 +137,16 @@ @@ -131,16 +137,16 @@
131 }', 137 }',
132 ], 138 ],
133 'contact' => [ 139 'contact' => [
134 - 'class' => 'artbox\core\forms\Module',  
135 - 'activeRecord' => "artbox\core\models\Feedback", 140 + 'class' => 'artbox\core\forms\Module',
  141 + 'activeRecord' => "frontend\models\Feedback",
136 'templateForm' => '<div class="row">{form}</div>', 142 'templateForm' => '<div class="row">{form}</div>',
137 - 'attributes' => [ 143 + 'attributes' => [
138 'name', 144 'name',
139 'email', 145 'email',
140 'phone', 146 'phone',
141 'message', 147 'message',
142 ], 148 ],
143 - 'rules' => [ 149 + 'rules' => [
144 [ 150 [
145 [ 'email' ], 151 [ 'email' ],
146 'email', 152 'email',
@@ -181,7 +187,8 @@ @@ -181,7 +187,8 @@
181 'buttonOptions' => [ 187 'buttonOptions' => [
182 'class' => 'btn btn-template-main', 188 'class' => 'btn btn-template-main',
183 ], 189 ],
184 - 'buttonContent' => '<i class="fa fa-envelope-o"></i>' . \Yii::t('app', 'Message'), 190 + 'buttonContent' => '<i class="fa fa-envelope-o"></i>Send Message',
  191 + 'buttonContent' => \Yii::t('app', 'Send Message'),
185 'sendEmail' => false, 192 'sendEmail' => false,
186 'ajax' => true, 193 'ajax' => true,
187 'formId' => 'contact-form', 194 'formId' => 'contact-form',
frontend/controllers/SiteController.php
1 <?php 1 <?php
2 namespace frontend\controllers; 2 namespace frontend\controllers;
3 3
4 - use frontend\models\FeedBack; 4 + use frontend\models\Feedback;
5 use common\models\blog\Article; 5 use common\models\blog\Article;
6 use common\models\Settings; 6 use common\models\Settings;
7 use common\models\slider\Slide; 7 use common\models\slider\Slide;
@@ -51,6 +51,7 @@ @@ -51,6 +51,7 @@
51 */ 51 */
52 public function actionIndex() 52 public function actionIndex()
53 { 53 {
  54 +
54 $slides = Slide::find()->with('language')->where(['status' => true])->orderBy('sort')->all(); 55 $slides = Slide::find()->with('language')->where(['status' => true])->orderBy('sort')->all();
55 $articles = Article::find() 56 $articles = Article::find()
56 ->with('language') 57 ->with('language')
frontend/models/FeedBack.php renamed to frontend/models/Feedback.php
@@ -9,7 +9,7 @@ namespace frontend\models; @@ -9,7 +9,7 @@ namespace frontend\models;
9 9
10 use artbox\core\models\Feedback as ArtboxCoreFeedback; 10 use artbox\core\models\Feedback as ArtboxCoreFeedback;
11 11
12 -class FeedBack extends ArtboxCoreFeedback 12 +class Feedback extends ArtboxCoreFeedback
13 { 13 {
14 public function rules() 14 public function rules()
15 { 15 {
@@ -40,11 +40,12 @@ class FeedBack extends ArtboxCoreFeedback @@ -40,11 +40,12 @@ class FeedBack extends ArtboxCoreFeedback
40 ], 40 ],
41 'required', 41 'required',
42 'on' => self::SCENARIO_CALLBACK, 42 'on' => self::SCENARIO_CALLBACK,
  43 +
43 ], 44 ],
44 [ 45 [
45 [ 'email' ], 46 [ 'email' ],
46 'email', 47 'email',
47 - 'message' => 'Wrong email', 48 + 'message' => \Yii::t('app', 'Wrong email'),
48 ], 49 ],
49 50
50 [ 51 [
frontend/web/js/script.js
@@ -6,7 +6,7 @@ $( @@ -6,7 +6,7 @@ $(
6 // */ 6 // */
7 // $(document) 7 // $(document)
8 // .on( 8 // .on(
9 - // 'beforeSubmit', '#feedback-form', function(e) { 9 + // 'beforeSubmit', '#feedback-form', function(e) {
10 // var f = this; 10 // var f = this;
11 // var form = $(this); 11 // var form = $(this);
12 // var formData = form.serialize(); 12 // var formData = form.serialize();