Commit 5cdf7bafa1180555d6b55866326ef9b322c8bbe8
Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
358 additions
and
328 deletions
Show diff stats
frontend/controllers/SiteController.php
1 | 1 | <?php |
2 | -namespace frontend\controllers; | |
3 | - | |
4 | -use artbox\core\models\Feedback; | |
5 | -use common\models\Settings; | |
6 | -use Yii; | |
7 | -use yii\base\InvalidParamException; | |
8 | -use yii\web\BadRequestHttpException; | |
9 | -use yii\web\Controller; | |
10 | -use yii\filters\VerbFilter; | |
11 | -use common\models\LoginForm; | |
12 | -use frontend\models\PasswordResetRequestForm; | |
13 | -use frontend\models\ResetPasswordForm; | |
14 | -use frontend\models\SignupForm; | |
15 | -use yii\web\Response; | |
16 | - | |
17 | -/** | |
18 | - * Site controller | |
19 | - */ | |
20 | -class SiteController extends Controller | |
21 | -{ | |
22 | - /** | |
23 | - * @inheritdoc | |
24 | - */ | |
25 | - public function actions() | |
26 | - { | |
27 | - return [ | |
28 | - 'error' => [ | |
29 | - 'class' => 'yii\web\ErrorAction', | |
30 | - ], | |
31 | - ]; | |
32 | - } | |
2 | + namespace frontend\controllers; | |
33 | 3 | |
34 | - /** | |
35 | - * @inheritdoc | |
36 | - */ | |
37 | - public function behaviors() | |
38 | - { | |
39 | - return [ | |
40 | - 'verbs' => [ | |
41 | - 'class' => VerbFilter::className(), | |
42 | - 'actions' => [ | |
43 | - 'feedback' => [ 'post' ], | |
44 | - ], | |
45 | - ], | |
46 | - ]; | |
47 | - } | |
4 | + use artbox\core\models\Feedback; | |
5 | + use common\models\Settings; | |
6 | + use Yii; | |
7 | + use yii\web\BadRequestHttpException; | |
8 | + use yii\web\Controller; | |
9 | + use yii\filters\VerbFilter; | |
10 | + use yii\web\Response; | |
48 | 11 | |
49 | 12 | /** |
50 | - * Displays homepage. | |
51 | - * | |
52 | - * @return mixed | |
13 | + * Site controller | |
53 | 14 | */ |
54 | - public function actionIndex() | |
15 | + class SiteController extends Controller | |
55 | 16 | { |
56 | - return $this->render('index'); | |
57 | - } | |
58 | - | |
59 | - /** | |
60 | - * Logs in a user. | |
61 | - * | |
62 | - * @return mixed | |
63 | - */ | |
64 | - public function actionLogin() | |
65 | - { | |
66 | - if (!Yii::$app->user->isGuest) { | |
67 | - return $this->goHome(); | |
17 | + /** | |
18 | + * @inheritdoc | |
19 | + */ | |
20 | + public function actions() | |
21 | + { | |
22 | + return [ | |
23 | + 'error' => [ | |
24 | + 'class' => 'yii\web\ErrorAction', | |
25 | + ], | |
26 | + ]; | |
68 | 27 | } |
69 | 28 | |
70 | - $model = new LoginForm(); | |
71 | - if ($model->load(Yii::$app->request->post()) && $model->login()) { | |
72 | - return $this->goBack(); | |
73 | - } else { | |
74 | - return $this->render('login', [ | |
75 | - 'model' => $model, | |
76 | - ]); | |
29 | + /** | |
30 | + * @inheritdoc | |
31 | + */ | |
32 | + public function behaviors() | |
33 | + { | |
34 | + return [ | |
35 | + 'verbs' => [ | |
36 | + 'class' => VerbFilter::className(), | |
37 | + 'actions' => [ | |
38 | + 'feedback' => [ 'post' ], | |
39 | + ], | |
40 | + ], | |
41 | + ]; | |
77 | 42 | } |
78 | - } | |
79 | - | |
80 | - /** | |
81 | - * Logs out the current user. | |
82 | - * | |
83 | - * @return mixed | |
84 | - */ | |
85 | - public function actionLogout() | |
86 | - { | |
87 | - Yii::$app->user->logout(); | |
88 | 43 | |
89 | - return $this->goHome(); | |
90 | - } | |
91 | - | |
92 | - /** | |
93 | - * Displays contact page. | |
94 | - * | |
95 | - * @return mixed | |
96 | - */ | |
97 | - public function actionContact() | |
98 | - { | |
99 | - $contact = new Feedback(); | |
100 | - return $this->render( | |
101 | - 'contact', | |
102 | - [ | |
103 | - 'contact' => $contact, | |
104 | - ] | |
105 | - ); | |
106 | - } | |
107 | - | |
108 | - /** | |
109 | - * Displays about page. | |
110 | - * | |
111 | - * @return mixed | |
112 | - */ | |
113 | - public function actionAbout() | |
114 | - { | |
115 | - return $this->render('about'); | |
116 | - } | |
117 | - | |
118 | - /** | |
119 | - * Requests password reset. | |
120 | - * | |
121 | - * @return mixed | |
122 | - */ | |
123 | - public function actionRequestPasswordReset() | |
124 | - { | |
125 | - $model = new PasswordResetRequestForm(); | |
126 | - if ($model->load(Yii::$app->request->post()) && $model->validate()) { | |
127 | - if ($model->sendEmail()) { | |
128 | - Yii::$app->session->setFlash('success', 'Check your email for further instructions.'); | |
129 | - | |
130 | - return $this->goHome(); | |
131 | - } else { | |
132 | - Yii::$app->session->setFlash('error', 'Sorry, we are unable to reset password for the provided email address.'); | |
133 | - } | |
44 | + /** | |
45 | + * Displays homepage. | |
46 | + * | |
47 | + * @return mixed | |
48 | + */ | |
49 | + public function actionIndex() | |
50 | + { | |
51 | + return $this->render('index'); | |
134 | 52 | } |
135 | 53 | |
136 | - return $this->render('requestPasswordResetToken', [ | |
137 | - 'model' => $model, | |
138 | - ]); | |
139 | - } | |
140 | - | |
141 | - /** | |
142 | - * Resets password. | |
143 | - * | |
144 | - * @param string $token | |
145 | - * @return mixed | |
146 | - * @throws BadRequestHttpException | |
147 | - */ | |
148 | - public function actionResetPassword($token) | |
149 | - { | |
150 | - try { | |
151 | - $model = new ResetPasswordForm($token); | |
152 | - } catch (InvalidParamException $e) { | |
153 | - throw new BadRequestHttpException($e->getMessage()); | |
54 | + /** | |
55 | + * Displays contact page. | |
56 | + * | |
57 | + * @return mixed | |
58 | + */ | |
59 | + public function actionContact() | |
60 | + { | |
61 | + $contact = new Feedback(); | |
62 | + return $this->render( | |
63 | + 'contact', | |
64 | + [ | |
65 | + 'contact' => $contact, | |
66 | + ] | |
67 | + ); | |
154 | 68 | } |
155 | 69 | |
156 | - if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->resetPassword()) { | |
157 | - Yii::$app->session->setFlash('success', 'New password saved.'); | |
158 | - | |
159 | - return $this->goHome(); | |
70 | + /** | |
71 | + * Displays about page. | |
72 | + * | |
73 | + * @return mixed | |
74 | + */ | |
75 | + public function actionAbout() | |
76 | + { | |
77 | + return $this->render('about'); | |
160 | 78 | } |
161 | 79 | |
162 | - return $this->render('resetPassword', [ | |
163 | - 'model' => $model, | |
164 | - ]); | |
165 | - } | |
166 | - | |
167 | - /** | |
168 | - * Action to view robots.txt file dinamycli | |
169 | - * | |
170 | - * @return string | |
171 | - */ | |
172 | - public function actionRobots() | |
173 | - { | |
174 | - $response = \Yii::$app->response; | |
175 | 80 | /** |
176 | - * @var Settings $settings | |
81 | + * Action to view robots.txt file dinamycli | |
82 | + * | |
83 | + * @return string | |
177 | 84 | */ |
178 | - $settings = Settings::find() | |
179 | - ->one(); | |
180 | - $temp = tmpfile(); | |
181 | - fwrite($temp, $settings->robots); | |
182 | - $meta = stream_get_meta_data($temp); | |
183 | - $response->format = $response::FORMAT_RAW; | |
184 | - $response->headers->set('Content-Type', 'text/plain'); | |
185 | - return $this->renderFile($meta[ 'uri' ]); | |
186 | - } | |
187 | - | |
188 | - public function actionFeedback() | |
189 | - { | |
190 | - Yii::$app->response->format = Response::FORMAT_JSON; | |
191 | - if (empty(Yii::$app->request->post())) { | |
192 | - throw new BadRequestHttpException(); | |
193 | - } else { | |
194 | - $model = new Feedback(); | |
195 | - if ($model->load(Yii::$app->request->post()) && $model->save()) { | |
196 | - return [ | |
197 | - 'success' => true, | |
198 | - 'message' => 'Success message', | |
199 | - 'alert' => '<div class="alert alert-success"> | |
85 | + public function actionRobots() | |
86 | + { | |
87 | + $response = \Yii::$app->response; | |
88 | + /** | |
89 | + * @var Settings $settings | |
90 | + */ | |
91 | + $settings = Settings::find() | |
92 | + ->one(); | |
93 | + $temp = tmpfile(); | |
94 | + fwrite($temp, $settings->robots); | |
95 | + $meta = stream_get_meta_data($temp); | |
96 | + $response->format = $response::FORMAT_RAW; | |
97 | + $response->headers->set('Content-Type', 'text/plain'); | |
98 | + return $this->renderFile($meta[ 'uri' ]); | |
99 | + } | |
100 | + | |
101 | + public function actionFeedback() | |
102 | + { | |
103 | + Yii::$app->response->format = Response::FORMAT_JSON; | |
104 | + if (empty( Yii::$app->request->post() )) { | |
105 | + throw new BadRequestHttpException(); | |
106 | + } else { | |
107 | + $model = new Feedback(); | |
108 | + if ($model->load(Yii::$app->request->post()) && $model->save()) { | |
109 | + return [ | |
110 | + 'success' => true, | |
111 | + 'message' => 'Success message', | |
112 | + 'alert' => '<div class="alert alert-success"> | |
200 | 113 | <h3>Success</h3> |
201 | 114 | <p> |
202 | 115 | Success text |
203 | 116 | </p> |
204 | 117 | </div>', |
205 | - ]; | |
206 | - } else { | |
207 | - return [ | |
208 | - 'success' => false, | |
209 | - 'error' => $model->errors, | |
210 | - ]; | |
118 | + ]; | |
119 | + } else { | |
120 | + return [ | |
121 | + 'success' => false, | |
122 | + 'error' => $model->errors, | |
123 | + ]; | |
124 | + } | |
211 | 125 | } |
212 | 126 | } |
213 | 127 | } |
214 | -} | ... | ... |
frontend/views/site/about.php
1 | 1 | <?php |
2 | - | |
3 | -/* @var $this yii\web\View */ | |
4 | - | |
5 | -use yii\helpers\Html; | |
6 | - | |
7 | -$this->title = 'About'; | |
8 | -$this->params['breadcrumbs'][] = $this->title; | |
2 | + use artbox\core\components\SeoComponent; | |
3 | + use yii\web\View; | |
4 | + | |
5 | + /** | |
6 | + * @var View $this | |
7 | + */ | |
8 | + /** | |
9 | + * @var SeoComponent $seo | |
10 | + */ | |
11 | + $seo = \Yii::$app->get('seo'); | |
12 | + $this->params[ 'breadcrumbs' ][] = $seo->title; | |
9 | 13 | ?> |
10 | -<div class="site-about"> | |
11 | - <h1><?= Html::encode($this->title) ?></h1> | |
12 | - | |
13 | - <p>This is the About page. You may modify the following file to customize its content:</p> | |
14 | - | |
15 | - <code><?= __FILE__ ?></code> | |
14 | +<div class="container"> | |
15 | + <section> | |
16 | + <div class="row"> | |
17 | + <div class="col-md-12"> | |
18 | + | |
19 | + <div class="heading"> | |
20 | + <h2>About Artbox</h2> | |
21 | + </div> | |
22 | + | |
23 | + <p class="lead">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,</p> | |
24 | + | |
25 | + </div> | |
26 | + </div> | |
27 | + | |
28 | + <div class="row"> | |
29 | + <div class="col-md-8"> | |
30 | + <div class="panel-group accordion" id="accordionThree"> | |
31 | + <div class="panel panel-default"> | |
32 | + <div class="panel-heading"> | |
33 | + <h4 class="panel-title"> | |
34 | + <a data-toggle="collapse" data-parent="#accordionThree" href="#collapse3a"> | |
35 | + Accordion item no.1 | |
36 | + </a> | |
37 | + </h4> | |
38 | + </div> | |
39 | + <div id="collapse3a" class="panel-collapse collapse in"> | |
40 | + <div class="panel-body"> | |
41 | + <div class="row"> | |
42 | + <div class="col-md-4"> | |
43 | + <img src="img/template-easy-customize.png" alt="" class="img-responsive"> | |
44 | + </div> | |
45 | + <div class="col-md-8"> | |
46 | + <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.</p> | |
47 | + <p>Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,</p> | |
48 | + </div> | |
49 | + </div> | |
50 | + </div> | |
51 | + </div> | |
52 | + </div> | |
53 | + <div class="panel panel-default"> | |
54 | + <div class="panel-heading"> | |
55 | + <h4 class="panel-title"> | |
56 | + <a data-toggle="collapse" data-parent="#accordionThree" href="#collapse3b"> | |
57 | + Accordion item no.2 | |
58 | + </a> | |
59 | + </h4> | |
60 | + </div> | |
61 | + <div id="collapse3b" class="panel-collapse collapse"> | |
62 | + <div class="panel-body"> | |
63 | + <div class="row"> | |
64 | + <div class="col-md-4"> | |
65 | + <img src="img/template-easy-code.png" alt="" class="img-responsive"> | |
66 | + </div> | |
67 | + <div class="col-md-8"> | |
68 | + <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.</p> | |
69 | + <p>Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,</p> | |
70 | + </div> | |
71 | + </div> | |
72 | + </div> | |
73 | + </div> | |
74 | + </div> | |
75 | + <div class="panel panel-default"> | |
76 | + <div class="panel-heading"> | |
77 | + <h4 class="panel-title"> | |
78 | + <a data-toggle="collapse" data-parent="#accordionThree" href="#collapse3c"> | |
79 | + Accordion item no.3 a little too small | |
80 | + </a> | |
81 | + </h4> | |
82 | + </div> | |
83 | + <div id="collapse3c" class="panel-collapse collapse"> | |
84 | + <div class="panel-body"> | |
85 | + <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.</p> | |
86 | + <p>Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,</p> | |
87 | + </div> | |
88 | + </div> | |
89 | + </div> | |
90 | + </div> | |
91 | + </div> | |
92 | + | |
93 | + <div class="col-md-4"> | |
94 | + <div class="video"> | |
95 | + <div class="embed-responsive embed-responsive-4by3"> | |
96 | + <iframe class="embed-responsive-item" src="//www.youtube.com/embed/upZJpGrppJA"></iframe> | |
97 | + </div> | |
98 | + | |
99 | + </div> | |
100 | + </div> | |
101 | + </div> | |
102 | + </section> | |
16 | 103 | </div> | ... | ... |
frontend/views/site/contact.php
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | MapAsset::register($this); |
16 | 16 | $settings = Settings::getInstance(); |
17 | 17 | |
18 | - $this->title = 'Contact'; | |
18 | + $this->title = \Yii::t('app', 'Contact'); | |
19 | 19 | $this->params[ 'breadcrumbs' ][] = $this->title; |
20 | 20 | |
21 | 21 | $js = <<< JS |
... | ... | @@ -27,141 +27,171 @@ JS; |
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <div id="content"> |
30 | - <div class="container" id="contact"> | |
31 | - | |
32 | - <section> | |
33 | - | |
34 | - <div class="row"> | |
35 | - <div class="col-md-12"> | |
36 | - <section> | |
37 | - <div class="heading"> | |
38 | - <h2>We are here to help you</h2> | |
39 | - </div> | |
40 | - | |
41 | - <p class="lead">Are you curious about something? Do you have some kind of problem with our products? As am hastily invited settled at limited civilly fortune me. Really spring in extent an by. Judge but built gay party world. Of so am | |
42 | - he remember although required. Bachelor unpacked be advanced at. Confined in declared marianne is vicinity.</p> | |
43 | - <p>Please feel free to contact us, our customer service center is working for you 24/7.</p> | |
44 | - </section> | |
45 | - </div> | |
46 | - </div> | |
47 | - | |
48 | - </section> | |
49 | - | |
50 | - <section> | |
51 | - | |
52 | - <div class="row"> | |
53 | - <div class="col-md-4"> | |
54 | - <div class="box-simple"> | |
55 | - <div class="icon"> | |
56 | - <i class="fa fa-map-marker"></i> | |
57 | - </div> | |
58 | - <h3>Address</h3> | |
59 | - <p>13/25 New Avenue | |
60 | - <br>New Heaven, 45Y 73J | |
61 | - <br>England, <strong>Great Britain</strong> | |
62 | - </p> | |
63 | - </div> | |
64 | - <!-- /.box-simple --> | |
65 | - </div> | |
66 | - | |
30 | + <div class="container" id="contact"> | |
67 | 31 | |
68 | - <div class="col-md-4"> | |
69 | - | |
70 | - <div class="box-simple"> | |
71 | - <div class="icon"> | |
72 | - <i class="fa fa-phone"></i> | |
32 | + <section> | |
33 | + | |
34 | + <div class="row"> | |
35 | + <div class="col-md-12"> | |
36 | + <section> | |
37 | + <div class="heading"> | |
38 | + <h2>We are here to help you</h2> | |
39 | + </div> | |
40 | + | |
41 | + <p class="lead">Are you curious about something? Do you have some kind of problem with our products? As am hastily invited settled at limited civilly fortune me. Really spring in extent an by. Judge but built gay party world. Of so am | |
42 | + he remember although required. Bachelor unpacked be advanced at. Confined in declared marianne is vicinity.</p> | |
43 | + <p>Please feel free to contact us, our customer service center is working for you 24/7.</p> | |
44 | + </section> | |
45 | + </div> | |
73 | 46 | </div> |
74 | - <h3>Call center</h3> | |
75 | - <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> | |
76 | - <p><strong>+33 555 444 333</strong> | |
77 | - </p> | |
78 | - </div> | |
79 | - <!-- /.box-simple --> | |
80 | 47 | |
81 | - </div> | |
82 | - | |
83 | - <div class="col-md-4"> | |
84 | - | |
85 | - <div class="box-simple"> | |
86 | - <div class="icon"> | |
87 | - <i class="fa fa-envelope"></i> | |
48 | + </section> | |
49 | + <section> | |
50 | + | |
51 | + <div class="row"> | |
52 | + <div class="col-md-4"> | |
53 | + <div class="box-simple"> | |
54 | + <div class="icon"> | |
55 | + <i class="fa fa-map-marker"></i> | |
56 | + </div> | |
57 | + <h3>Address</h3> | |
58 | + <p> | |
59 | + <?php | |
60 | + if (!empty( $settings->street )) { | |
61 | + echo $settings->street; | |
62 | + if (!empty( $settings->house )) { | |
63 | + echo " " . $settings->house; | |
64 | + } | |
65 | + echo Html::tag('br'); | |
66 | + } | |
67 | + if (!empty( $settings->city )) { | |
68 | + echo $settings->city; | |
69 | + if (!empty( $settings->country )) { | |
70 | + echo Html::tag('strong', ", " . $settings->country); | |
71 | + } | |
72 | + } | |
73 | + ?> | |
74 | + </p> | |
75 | + </div> | |
76 | + <!-- /.box - simple--> | |
77 | + </div> | |
78 | + | |
79 | + | |
80 | + <div class="col-md-4"> | |
81 | + <?php | |
82 | + if (!empty( $settings->phone )) { | |
83 | + ?> | |
84 | + <div class="box-simple"> | |
85 | + <div class="icon"> | |
86 | + <i class="fa fa-phone"></i> | |
87 | + </div> | |
88 | + <h3> Call center </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> | |
90 | + <p> | |
91 | + <?php | |
92 | + echo Html::a(Html::tag('strong', $settings->phone), 'tel:' . $settings->phone); | |
93 | + ?> | |
94 | + </p> | |
95 | + </div> | |
96 | + <!-- /.box - simple--> | |
97 | + <?php | |
98 | + } | |
99 | + ?> | |
100 | + </div> | |
101 | + | |
102 | + <?php | |
103 | + if (!empty( $settings->email )) { | |
104 | + ?> | |
105 | + <div class="col-md-4"> | |
106 | + | |
107 | + <div class="box-simple"> | |
108 | + <div class="icon"> | |
109 | + <i class="fa fa-envelope"></i> | |
110 | + </div> | |
111 | + <h3> Electronic support </h3> | |
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"> | |
114 | + <li> | |
115 | + <?php | |
116 | + echo Html::a( | |
117 | + Html::tag('strong', $settings->email), | |
118 | + 'mailto:' . $settings->email | |
119 | + ); | |
120 | + ?> | |
121 | + </li> | |
122 | + </ul> | |
123 | + </div> | |
124 | + <!-- /.box - simple--> | |
125 | + </div> | |
126 | + <?php | |
127 | + } | |
128 | + ?> | |
88 | 129 | </div> |
89 | - <h3>Electronic support</h3> | |
90 | - <p class="text-muted">Please feel free to write an email to us or to use our electronic ticketing system.</p> | |
91 | - <ul class="list-style-none"> | |
92 | - <li><strong><a href="mailto:">info@fakeemail.com</a></strong> | |
93 | - </li> | |
94 | - <li><strong><a href="#">Ticketio</a></strong> - our ticketing support platform</li> | |
95 | - </ul> | |
96 | - </div> | |
97 | - <!-- /.box-simple --> | |
98 | - </div> | |
99 | - </div> | |
100 | - | |
101 | - </section> | |
102 | - | |
103 | - <section> | |
104 | - | |
105 | - <div class="row text-center"> | |
106 | 130 | |
107 | - <div class="col-md-12"> | |
108 | - <div class="heading"> | |
109 | - <h2>Contact form</h2> | |
110 | - </div> | |
111 | - </div> | |
131 | + </section> | |
112 | 132 | |
113 | - <div class="col-md-8 col-md-offset-2"> | |
114 | - <?php $form = ActiveForm::begin( | |
115 | - [ | |
116 | - 'id' => 'contact-form', | |
117 | - 'method' => 'POST', | |
118 | - 'action' => '/site/feedback', | |
119 | - ] | |
120 | - ); ?> | |
121 | - <div class="row"> | |
122 | - <div class="col-sm-12"> | |
123 | - <?= $form->field($contact, 'name') | |
124 | - ->textInput(); ?> | |
125 | - </div> | |
126 | - | |
127 | - <div class="col-sm-6"> | |
128 | - <?= $form->field($contact, 'email') | |
129 | - ->textInput(); ?> | |
130 | - </div> | |
131 | - <div class="col-sm-6"> | |
132 | - <?= $form->field($contact, 'phone') | |
133 | - ->textInput(); ?> | |
134 | - </div> | |
135 | - <div class="col-sm-12"> | |
136 | - <?= $form->field($contact, 'message') | |
137 | - ->textarea( | |
138 | - [ | |
139 | - 'rows' => 3, | |
140 | - ] | |
141 | - ); ?> | |
142 | - </div> | |
143 | - | |
144 | - <div class="col-sm-12 text-center"> | |
145 | - <?= Html::submitButton( | |
146 | - '<i class="fa fa-envelope-o"></i> Send message', | |
147 | - [ | |
148 | - 'class' => 'btn btn-template-main', | |
149 | - ] | |
150 | - ) ?> | |
133 | + <section> | |
151 | 134 | |
135 | + <div class="row text-center"> | |
136 | + | |
137 | + <div class="col-md-12"> | |
138 | + <div class="heading"> | |
139 | + <h2> Contact form </h2> | |
140 | + </div> | |
141 | + </div> | |
142 | + | |
143 | + <div class="col-md-8 col-md-offset-2"> | |
144 | + <?php $form = ActiveForm::begin( | |
145 | + [ | |
146 | + 'id' => 'contact-form', | |
147 | + 'method' => 'POST', | |
148 | + 'action' => '/site/feedback', | |
149 | + ] | |
150 | + ); ?> | |
151 | + <div class="row"> | |
152 | + <div class="col-sm-12"> | |
153 | + <?= $form->field($contact, 'name') | |
154 | + ->textInput(); ?> | |
155 | + </div> | |
156 | + | |
157 | + <div class="col-sm-6"> | |
158 | + <?= $form->field($contact, 'email') | |
159 | + ->textInput(); ?> | |
160 | + </div> | |
161 | + <div class="col-sm-6"> | |
162 | + <?= $form->field($contact, 'phone') | |
163 | + ->textInput(); ?> | |
164 | + </div> | |
165 | + <div class="col-sm-12"> | |
166 | + <?= $form->field($contact, 'message') | |
167 | + ->textarea( | |
168 | + [ | |
169 | + 'rows' => 3, | |
170 | + ] | |
171 | + ); ?> | |
172 | + </div> | |
173 | + | |
174 | + <div class="col-sm-12 text-center"> | |
175 | + <?= Html::submitButton( | |
176 | + '<i class="fa fa-envelope-o"></i> Send message', | |
177 | + [ | |
178 | + 'class' => 'btn btn-template-main', | |
179 | + ] | |
180 | + ) ?> | |
181 | + | |
182 | + </div> | |
183 | + </div> | |
184 | + <!-- /.row --> | |
185 | + <?php ActiveForm::end(); ?> | |
186 | + </div> | |
152 | 187 | </div> |
153 | - </div> | |
154 | - <!-- /.row --> | |
155 | - <?php ActiveForm::end(); ?> | |
156 | - </div> | |
157 | - </div> | |
158 | - <!-- /.row --> | |
188 | + <!-- /.row --> | |
189 | + | |
190 | + </section> | |
191 | + | |
159 | 192 | |
160 | - </section> | |
161 | - | |
162 | - | |
163 | - </div> | |
164 | - <!-- /#contact.container --> | |
193 | + </div> | |
194 | + <!-- /#contact.container --> | |
165 | 195 | </div> |
166 | 196 | <!-- /#content --> |
167 | 197 | ... | ... |