Commit f37a4fe1741ada40026285a4d26e511d39eefa0d
1 parent
c518ce1a
14/09/17 1
Showing
4 changed files
with
20 additions
and
17 deletions
Show diff stats
frontend/controllers/SiteController.php
| 1 | <?php | 1 | <?php |
| 2 | namespace frontend\controllers; | 2 | namespace frontend\controllers; |
| 3 | - | 3 | + |
| 4 | use artbox\core\models\Feedback; | 4 | use artbox\core\models\Feedback; |
| 5 | use common\models\Settings; | 5 | use common\models\Settings; |
| 6 | use Yii; | 6 | use Yii; |
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | use yii\web\BadRequestHttpException; | 9 | use yii\web\BadRequestHttpException; |
| 10 | use yii\web\Controller; | 10 | use yii\web\Controller; |
| 11 | use yii\web\Response; | 11 | use yii\web\Response; |
| 12 | - | 12 | + |
| 13 | /** | 13 | /** |
| 14 | * Site controller | 14 | * Site controller |
| 15 | */ | 15 | */ |
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | ], | 26 | ], |
| 27 | ]; | 27 | ]; |
| 28 | } | 28 | } |
| 29 | - | 29 | + |
| 30 | /** | 30 | /** |
| 31 | * @inheritdoc | 31 | * @inheritdoc |
| 32 | */ | 32 | */ |
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | ], | 41 | ], |
| 42 | ]; | 42 | ]; |
| 43 | } | 43 | } |
| 44 | - | 44 | + |
| 45 | /** | 45 | /** |
| 46 | * Displays homepage. | 46 | * Displays homepage. |
| 47 | * | 47 | * |
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | { | 51 | { |
| 52 | return $this->render('index'); | 52 | return $this->render('index'); |
| 53 | } | 53 | } |
| 54 | - | 54 | + |
| 55 | /** | 55 | /** |
| 56 | * Displays contact page. | 56 | * Displays contact page. |
| 57 | * | 57 | * |
| @@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
| 67 | ] | 67 | ] |
| 68 | ); | 68 | ); |
| 69 | } | 69 | } |
| 70 | - | 70 | + |
| 71 | /** | 71 | /** |
| 72 | * Displays about page. | 72 | * Displays about page. |
| 73 | * | 73 | * |
| @@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
| 77 | { | 77 | { |
| 78 | return $this->render('about'); | 78 | return $this->render('about'); |
| 79 | } | 79 | } |
| 80 | - | 80 | + |
| 81 | /** | 81 | /** |
| 82 | * Action to view robots.txt file dinamycli | 82 | * Action to view robots.txt file dinamycli |
| 83 | * | 83 | * |
| @@ -98,23 +98,23 @@ | @@ -98,23 +98,23 @@ | ||
| 98 | $response->headers->set('Content-Type', 'text/plain'); | 98 | $response->headers->set('Content-Type', 'text/plain'); |
| 99 | return $this->renderFile($meta[ 'uri' ]); | 99 | return $this->renderFile($meta[ 'uri' ]); |
| 100 | } | 100 | } |
| 101 | - | 101 | + |
| 102 | public function actionFeedback() | 102 | public function actionFeedback() |
| 103 | { | 103 | { |
| 104 | Yii::$app->response->format = Response::FORMAT_JSON; | 104 | Yii::$app->response->format = Response::FORMAT_JSON; |
| 105 | - | 105 | + |
| 106 | /** | 106 | /** |
| 107 | * @var Mailer $mailer | 107 | * @var Mailer $mailer |
| 108 | */ | 108 | */ |
| 109 | $mailer = \Yii::$app->get('smtpmailer'); | 109 | $mailer = \Yii::$app->get('smtpmailer'); |
| 110 | $settings = Settings::getInstance(); | 110 | $settings = Settings::getInstance(); |
| 111 | - | 111 | + |
| 112 | if (empty(Yii::$app->request->post())) { | 112 | if (empty(Yii::$app->request->post())) { |
| 113 | throw new BadRequestHttpException(); | 113 | throw new BadRequestHttpException(); |
| 114 | } else { | 114 | } else { |
| 115 | $model = new Feedback(); | 115 | $model = new Feedback(); |
| 116 | if ($model->load(Yii::$app->request->post()) && $model->save()) { | 116 | if ($model->load(Yii::$app->request->post()) && $model->save()) { |
| 117 | - | 117 | + |
| 118 | $mailer->compose( | 118 | $mailer->compose( |
| 119 | 'feedback', | 119 | 'feedback', |
| 120 | [ | 120 | [ |
| @@ -125,7 +125,7 @@ | @@ -125,7 +125,7 @@ | ||
| 125 | ->setTo($settings->email) | 125 | ->setTo($settings->email) |
| 126 | ->setSubject(\Yii::t('app', 'Feedback')) | 126 | ->setSubject(\Yii::t('app', 'Feedback')) |
| 127 | ->send(); | 127 | ->send(); |
| 128 | - | 128 | + |
| 129 | return [ | 129 | return [ |
| 130 | 'success' => true, | 130 | 'success' => true, |
| 131 | 'message' => 'Success message', | 131 | 'message' => 'Success message', |
frontend/views/site/contact.php
| @@ -54,7 +54,7 @@ JS; | @@ -54,7 +54,7 @@ JS; | ||
| 54 | <div class="icon"> | 54 | <div class="icon"> |
| 55 | <i class="fa fa-map-marker"></i> | 55 | <i class="fa fa-map-marker"></i> |
| 56 | </div> | 56 | </div> |
| 57 | - <h3>Address</h3> | 57 | + <h3>Адрес</h3> |
| 58 | <p> | 58 | <p> |
| 59 | <?php | 59 | <?php |
| 60 | if (!empty( $settings->street )) { | 60 | if (!empty( $settings->street )) { |
| @@ -85,7 +85,7 @@ JS; | @@ -85,7 +85,7 @@ JS; | ||
| 85 | <div class="icon"> | 85 | <div class="icon"> |
| 86 | <i class="fa fa-phone"></i> | 86 | <i class="fa fa-phone"></i> |
| 87 | </div> | 87 | </div> |
| 88 | - <h3> Call center </h3> | 88 | + <h3> Телефон </h3> |
| 89 | <p class="text-muted"> This number is toll free if calling from Great Britain otherwise we advise you to use the electronic form of communication .</p> | 89 | <p class="text-muted"> This number is toll free if calling from Great Britain otherwise we advise you to use the electronic form of communication .</p> |
| 90 | <p> | 90 | <p> |
| 91 | <?php | 91 | <?php |
| @@ -108,7 +108,7 @@ JS; | @@ -108,7 +108,7 @@ JS; | ||
| 108 | <div class="icon"> | 108 | <div class="icon"> |
| 109 | <i class="fa fa-envelope"></i> | 109 | <i class="fa fa-envelope"></i> |
| 110 | </div> | 110 | </div> |
| 111 | - <h3> Electronic support </h3> | 111 | + <h3> E-mail </h3> |
| 112 | <p class="text-muted"> Please feel free to write an email to us or to use our electronic ticketing system .</p> | 112 | <p class="text-muted"> Please feel free to write an email to us or to use our electronic ticketing system .</p> |
| 113 | <ul class="list-style-none"> | 113 | <ul class="list-style-none"> |
| 114 | <li> | 114 | <li> |
| @@ -136,7 +136,7 @@ JS; | @@ -136,7 +136,7 @@ JS; | ||
| 136 | 136 | ||
| 137 | <div class="col-md-12"> | 137 | <div class="col-md-12"> |
| 138 | <div class="heading"> | 138 | <div class="heading"> |
| 139 | - <h2> Contact form </h2> | 139 | + <h2> Связаться с нами </h2> |
| 140 | </div> | 140 | </div> |
| 141 | </div> | 141 | </div> |
| 142 | 142 | ||
| @@ -173,7 +173,7 @@ JS; | @@ -173,7 +173,7 @@ JS; | ||
| 173 | 173 | ||
| 174 | <div class="col-sm-12 text-center"> | 174 | <div class="col-sm-12 text-center"> |
| 175 | <?= Html::submitButton( | 175 | <?= Html::submitButton( |
| 176 | - '<i class="fa fa-envelope-o"></i> Send message', | 176 | + '<i class="fa fa-envelope-o"></i> Отправить', |
| 177 | [ | 177 | [ |
| 178 | 'class' => 'btn btn-template-main', | 178 | 'class' => 'btn btn-template-main', |
| 179 | ] | 179 | ] |
frontend/web/css/style.turquoise.css
| @@ -4248,4 +4248,7 @@ a.list-group-item.active > .badge, | @@ -4248,4 +4248,7 @@ a.list-group-item.active > .badge, | ||
| 4248 | left: 0; | 4248 | left: 0; |
| 4249 | z-index: 1000000; | 4249 | z-index: 1000000; |
| 4250 | display: block; | 4250 | display: block; |
| 4251 | +} | ||
| 4252 | +textarea{ | ||
| 4253 | + resize:none; | ||
| 4251 | } | 4254 | } |
| 4252 | \ No newline at end of file | 4255 | \ No newline at end of file |