c237629a
Anastasia
first commit
|
1
|
<?php
|
9315e305
Anastasia
- slash redirect
|
2
|
use common\models\SlashRedirect;
|
c237629a
Anastasia
first commit
|
3
|
use frontend\components\UrlManager;
|
82a18a27
alex
Mailer 1
|
4
5
|
use common\models\Settings;
|
982be2a8
alex
Генерация мета те...
|
6
|
|
608117b4
alex
Временно отключил...
|
7
|
|
c237629a
Anastasia
first commit
|
8
9
10
11
12
13
|
$params = array_merge(
require( __DIR__ . '/../../common/config/params.php' ),
require( __DIR__ . '/../../common/config/params-local.php' ),
require( __DIR__ . '/params.php' ),
require( __DIR__ . '/params-local.php' )
);
|
bf086795
alex
Mail fix 2
|
14
|
|
c237629a
Anastasia
first commit
|
15
|
return [
|
c237629a
Anastasia
first commit
|
16
17
18
|
'id' => 'app-frontend',
'homeUrl' => '/',
'basePath' => dirname(__DIR__),
|
545a411b
alex
add autocompress
|
19
|
'bootstrap' => [ 'log','assetsAutoCompress' ],
|
c237629a
Anastasia
first commit
|
20
21
22
23
24
25
26
|
'controllerNamespace' => 'frontend\controllers',
'container' => [
'singletons' => [
'artbox\core\services\Languages' =>'artbox\core\services\Languages',
]
],
'modules' => [
|
b60a88b8
Anastasia
- main page
|
27
|
'feedback' => [
|
c237629a
Anastasia
first commit
|
28
29
|
'class' => 'artbox\core\forms\Module',
'activeRecord' => "artbox\core\models\Feedback",
|
c237629a
Anastasia
first commit
|
30
31
|
'attributes' => [
'name',
|
c237629a
Anastasia
first commit
|
32
|
'phone',
|
b60a88b8
Anastasia
- main page
|
33
|
'message',
|
2f4c5619
alex
Добавил кологку д...
|
34
|
|
c237629a
Anastasia
first commit
|
35
36
37
|
],
'rules' => [
[
|
c237629a
Anastasia
first commit
|
38
|
[
|
c237629a
Anastasia
first commit
|
39
40
41
42
43
44
45
|
'name',
'phone',
],
'required',
]
],
'labels' => [
|
d73fd852
alex
добавил переводы ...
|
46
47
48
|
'name' => \Yii::t('app','Name'),
'message' => \Yii::t('app','Message'),
'phone' => \Yii::t('app','Phone'),
|
c237629a
Anastasia
first commit
|
49
50
51
52
|
],
'inputOptions' => [
'name' => [
|
b60a88b8
Anastasia
- main page
|
53
|
'template' => '<div class="input-wr">{input}</div>'
|
c237629a
Anastasia
first commit
|
54
55
|
],
'phone' => [
|
b60a88b8
Anastasia
- main page
|
56
|
'template' => '<div class="input-wr phones_mask">{input}</div>'
|
c237629a
Anastasia
first commit
|
57
58
59
60
|
],
'message' => [
'type' => 'textarea',
'options' => [],
|
b60a88b8
Anastasia
- main page
|
61
|
'template' => '<div class="input-wr">{input}</div>'
|
c237629a
Anastasia
first commit
|
62
63
|
],
],
|
b60a88b8
Anastasia
- main page
|
64
65
66
|
'buttonTemplate' => '<div class="button-wr">{button}</div>',
'buttonOptions' => [],
'buttonContent' => 'Send',
|
c237629a
Anastasia
first commit
|
67
68
|
'sendEmail' => false,
'ajax' => true,
|
b60a88b8
Anastasia
- main page
|
69
70
|
'formId' => 'feedback-form',
'scenario' => 'callback',
|
c237629a
Anastasia
first commit
|
71
|
'successCallback' => 'function (data) {
|
b60a88b8
Anastasia
- main page
|
72
|
document.getElementById("feedback-form").reset();
|
b53dc2b2
Anastasia
- bug fix
|
73
|
$("#modal_close").click();
|
c237629a
Anastasia
first commit
|
74
|
if (data.status == "success"){
|
b60a88b8
Anastasia
- main page
|
75
|
document.getElementById("feedback-form").reset();
|
b53dc2b2
Anastasia
- bug fix
|
76
|
success();
|
b60a88b8
Anastasia
- main page
|
77
78
|
var data = $("#feedback-form").data(\'yiiActiveForm\');
data.validated = false;
|
c237629a
Anastasia
first commit
|
79
80
81
82
|
}
}',
],
|
b53dc2b2
Anastasia
- bug fix
|
83
|
'contact' => [
|
82a18a27
alex
Mailer 1
|
84
|
'class' => 'frontend\modules\forms\Module',
|
b53dc2b2
Anastasia
- bug fix
|
85
|
'activeRecord' => "artbox\core\models\Feedback",
|
82a18a27
alex
Mailer 1
|
86
|
'alternateMailLogic' => true,
|
4405096a
alex
Изменил вывод чер...
|
87
|
|
b53dc2b2
Anastasia
- bug fix
|
88
89
|
'attributes' => [
'name',
|
365b5721
Anastasia
email to phone in...
|
90
|
'phone',
|
b53dc2b2
Anastasia
- bug fix
|
91
92
93
94
95
96
97
98
99
100
101
102
|
'message',
],
'rules' => [
[
[
'name',
'email',
],
'required',
]
],
'labels' => [
|
d73fd852
alex
добавил переводы ...
|
103
104
|
'name' => \Yii::t('app','Name'),
'message' => \Yii::t('app','Yours question'),
|
365b5721
Anastasia
email to phone in...
|
105
|
'phone' => \Yii::t('app','Phone'),
|
b53dc2b2
Anastasia
- bug fix
|
106
107
108
109
110
111
|
],
'inputOptions' => [
'name' => [
'template' => '<div class="input-wr required">{input}</div>'
],
|
365b5721
Anastasia
email to phone in...
|
112
113
|
'phone' => [
'template' => '<div class="input-wr required phones_mask">{input}</div>'
|
b53dc2b2
Anastasia
- bug fix
|
114
115
116
117
118
119
120
121
122
123
|
],
'message' => [
'type' => 'textarea',
'options' => [],
'template' => '<div class="input-wr">{input}</div>'
],
],
'buttonTemplate' => '<div class="button-wr submit-close-wr-c-a">{button}</div>',
'buttonOptions' => [],
'buttonContent' => 'Send',
|
4405096a
alex
Изменил вывод чер...
|
124
|
'email' => 'alkhonko@gmail.com',
|
982be2a8
alex
Генерация мета те...
|
125
|
'sendEmail' => true,
|
b53dc2b2
Anastasia
- bug fix
|
126
127
|
'ajax' => true,
'formId' => 'contact-form',
|
365b5721
Anastasia
email to phone in...
|
128
|
'scenario' => 'callback',
|
b53dc2b2
Anastasia
- bug fix
|
129
130
131
132
133
134
135
136
137
|
'successCallback' => 'function (data) {
document.getElementById("contact-form").reset();
if (data.status == "success"){
document.getElementById("contact-form").reset();
success();
var data = $("#contact-form").data(\'yiiActiveForm\');
data.validated = false;
}
}',
|
ebde7ea6
Anastasia
- forms
|
138
|
|
b53dc2b2
Anastasia
- bug fix
|
139
|
],
|
ebde7ea6
Anastasia
- forms
|
140
141
142
143
144
145
146
|
'comments' => [
'class' => 'artbox\core\forms\Module',
'activeRecord' => "common\models\Comment",
'attributes' => [
'name',
'email',
'comment',
|
68e72651
Anastasia
- blog
|
147
|
'entity_id',
|
2f4c5619
alex
Добавил кологку д...
|
148
149
|
'entity',
|
ebde7ea6
Anastasia
- forms
|
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
],
'rules' => [
[
[
'name',
'email',
],
'required',
]
],
'labels' => [
'name' => 'ФИО',
'email' => 'Email',
'comment' => 'Ваш отзыв',
|
68e72651
Anastasia
- blog
|
164
|
'entity_id' => false,
|
2f4c5619
alex
Добавил кологку д...
|
165
166
167
|
'entity' => false,
|
ebde7ea6
Anastasia
- forms
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
],
'inputOptions' => [
'name' => [
'template' => '<div class="input-wr required">{input}</div>'
],
'email' => [
'template' => '<div class="input-wr required">{input}</div>'
],
'comment' => [
'type' => 'textarea',
'options' => [],
'template' => '<div class="input-wr">{input}</div>'
],
],
'buttonTemplate' => '<div class="button-wr submit-close-wr-c-a">{button} <div class="submit-close-c-a"><span>Закрыть окно</span></div></div>',
'buttonOptions' => [],
'buttonContent' => 'Отправить отзыв',
'sendEmail' => false,
'ajax' => true,
'formId' => 'comment-form',
'scenario' => 'default',
'successCallback' => 'function (data) {
document.getElementById("comment-form").reset();
var data = $("#comment-form").data(\'yiiActiveForm\');
$("#comment-form").find(".submit-close-c-a span").click();
|
95fc39b2
Anastasia
- forms
|
194
|
$("#comment-form").parent().parent().parent().find(".service-c-a-btns").after("<p>Ваш отзыв появится после проверки модератором</p>")
|
ebde7ea6
Anastasia
- forms
|
195
196
197
198
|
data.validated = false;
}',
],
|
bee35dc9
alex
Remove site/about
|
199
200
|
'questions' => [
|
ebde7ea6
Anastasia
- forms
|
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
'class' => 'artbox\core\forms\Module',
'activeRecord' => "common\models\Question",
'attributes' => [
'name',
'email',
'question',
'service_id'
],
'rules' => [
[
[
'name',
'email',
],
'required',
]
],
'labels' => [
'name' => 'ФИО',
'email' => 'Email',
'question' => 'Ваш вопрос',
'service_id' => false
],
'inputOptions' => [
'name' => [
'template' => '<div class="input-wr required">{input}</div>'
],
'email' => [
'template' => '<div class="input-wr required">{input}</div>'
],
'question' => [
'type' => 'textarea',
'options' => [],
'template' => '<div class="input-wr">{input}</div>'
],
],
'buttonTemplate' => '<div class="button-wr submit-close-wr-c-a">{button} <div class="submit-close-c-a"><span>Закрыть окно</span></div></div>',
'buttonOptions' => [],
'buttonContent' => 'Отправить вопрос',
'sendEmail' => false,
'ajax' => true,
'formId' => 'question-form',
'scenario' => 'question',
'successCallback' => 'function (data) {
|
cc2da9cc
Anastasia
- question page
|
246
|
document.getElementById("question-form").reset();
|
ebde7ea6
Anastasia
- forms
|
247
248
249
250
251
252
253
|
var data = $("#question-form").data(\'yiiActiveForm\');
$("#question-form").find(".submit-close-c-a span").click();
$("#question-form").parent().parent().parent().find(".service-c-a-btns").after("<p>Спасибо за Вваш вопрос. Мы обязательно на него ответим</p>")
data.validated = false;
}',
],
|
fce22ac2
Anastasia
- visits
|
254
255
256
257
258
259
260
261
262
263
264
|
'visit' => [
'class' => 'artbox\core\forms\Module',
'activeRecord' => "common\models\Visit",
'attributes' => [
'name',
'phone',
'email',
'message',
'entity',
|
2f4c5619
alex
Добавил кологку д...
|
265
266
|
'entity_id',
'request_webpage',
|
fce22ac2
Anastasia
- visits
|
267
268
269
270
271
272
273
274
275
276
|
],
'rules' => [
[
[
'phone',
],
'required',
]
],
'labels' => [
|
d73fd852
alex
добавил переводы ...
|
277
278
279
280
|
'name' =>\Yii::t('app','FIO'),
'email' =>\Yii::t('app','Email'),
'phone' => \Yii::t('app','Phone'),
'message' => \Yii::t('app','Message'),
|
fce22ac2
Anastasia
- visits
|
281
|
'entity_id' => false,
|
2f4c5619
alex
Добавил кологку д...
|
282
283
|
'entity' => false,
'request_webpage' => false
|
fce22ac2
Anastasia
- visits
|
284
285
286
287
288
289
290
291
292
|
],
'inputOptions' => [
'entity' => [
'type' => 'hiddenInput'
],
'entity_id' => [
'type' => 'hiddenInput'
],
|
2f4c5619
alex
Добавил кологку д...
|
293
294
295
296
|
'request_webpage' => [
'type' => 'hiddenInput',
'options' =>
[
|
4405096a
alex
Изменил вывод чер...
|
297
|
|
2f4c5619
alex
Добавил кологку д...
|
298
299
300
301
|
'value' => $_SERVER['REQUEST_URI'],
],
],
|
fce22ac2
Anastasia
- visits
|
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
'name' => [
'template' => '<div class="input-wr">{input}</div>'
],
'email' => [
'template' => '<div class="input-wr">{input}</div>'
],
'phone' => [
'template' => '<div class="input-wr required phones_mask">{input}</div>',
'options' => [
'placeholder' => '(0__)___-__-__'
]
],
'message' => [
'type' => 'textarea',
'options' => ['cols' => 30, 'rows'=> 10],
'template' => '<div class="input-wr">{input}</div>'
],
],
|
39392f19
Anastasia
- visit form
|
320
|
'buttonTemplate' => '<div class="button-wr">{button}</div>',
|
fce22ac2
Anastasia
- visits
|
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
'buttonOptions' => [],
'buttonContent' => 'Отправить',
'sendEmail' => false,
'ajax' => true,
'formId' => 'visit-form',
'scenario' => 'default',
'successCallback' => 'function (data) {
document.getElementById("visit-form").reset();
var data = $("#visit-form").data(\'yiiActiveForm\');
data.validated = false;
success();
}',
],
|
c237629a
Anastasia
first commit
|
335
336
|
],
'components' => [
|
b60a88b8
Anastasia
- main page
|
337
338
339
340
341
342
343
|
'assetManager' => [
'bundles' => [
'yii\bootstrap\BootstrapAsset' => [
'basePath' => '@webroot',
'baseUrl' => '@web',
'css' => [],
],
|
43a24059
Anastasia
- servives
|
344
345
346
347
348
|
'frontend\assets\ArtboxModalAsset' => [
'basePath' => '@webroot',
'baseUrl' => '@web',
'css' => [],
],
|
b60a88b8
Anastasia
- main page
|
349
350
351
|
],
'appendTimestamp' => true,
],
|
c237629a
Anastasia
first commit
|
352
353
354
355
|
'request' => [
'csrfParam' => '_csrf-frontend',
'baseUrl' => '',
],
|
82a18a27
alex
Mailer 1
|
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
// 'mailer' => [
// 'class' => 'yii\swiftmailer\Mailer',
// 'viewPath' => '@frontend/mail',
// 'useFileTransport' => false,
//
// 'transport' => [
// 'class' => 'Swift_SmtpTransport',
// 'host' => 'smtp.gmail.com',
// # пока что стоят мои данные, потому что я пробивал свою почту
// # для возможности отправки писем
// 'username' => 'alkhonko@gmail.com',
// 'password' => 'jakirothebest123',
// 'port' => '587',
// 'encryption' => 'tls',
// ],
// ],
|
c237629a
Anastasia
first commit
|
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
|
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_identity-frontend',
'httpOnly' => true,
],
],
'session' => [
// this is the name of the session cookie used for login on the frontend
'name' => 'advanced-frontend',
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => [
'error',
'warning',
],
],
|
982be2a8
alex
Генерация мета те...
|
394
395
396
|
[
'class' => 'yii\log\EmailTarget',
'categories' => ['mail_error'],
|
82a18a27
alex
Mailer 1
|
397
398
399
|
'levels' => [
'error',
'warning',
|
14b9ed76
alex
Mail fix 3
|
400
|
'info'
|
82a18a27
alex
Mailer 1
|
401
|
],
|
982be2a8
alex
Генерация мета те...
|
402
403
404
405
|
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@frontend/mail',
'useFileTransport' => false,
|
82a18a27
alex
Mailer 1
|
406
|
|
982be2a8
alex
Генерация мета те...
|
407
408
409
|
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.gmail.com',
|
f972afc1
alex
Mail fix 4
|
410
411
|
'username' => 'artboxcore@gmail.com',
'password' => 'upfly2000',
|
982be2a8
alex
Генерация мета те...
|
412
413
414
415
416
417
|
'port' => '587',
'encryption' => 'tls',
],
],
'logVars' => [],
'message' => [
|
f972afc1
alex
Mail fix 4
|
418
|
'from' => ['artboxcore@gmail.com' => 'ABClinic'],
|
4405096a
alex
Изменил вывод чер...
|
419
|
'to' => ['artboxcore@gmail.com'],
|
14b9ed76
alex
Mail fix 3
|
420
|
'subject' => 'Ошибка в почтовом адресе ABClinic. Письма не доставляются после обработки одной из форм',
|
982be2a8
alex
Генерация мета те...
|
421
422
|
],
],
|
c237629a
Anastasia
first commit
|
423
424
|
],
],
|
c237629a
Anastasia
first commit
|
425
426
427
428
429
430
431
432
|
'errorHandler' => [
'errorAction' => 'site/error',
],
'urlManager' => [
'class' => UrlManager::className(),
'baseUrl' => '/',
'enablePrettyUrl' => true,
'showScriptName' => false,
|
eaa321f3
alex
301 redirect from...
|
433
|
'rules' => [
|
139caeae
alex
поправил микрораз...
|
434
|
|
eaa321f3
alex
301 redirect from...
|
435
|
],
|
c237629a
Anastasia
first commit
|
436
|
'hideDefaultLanguagePrefix' => true,
|
9315e305
Anastasia
- slash redirect
|
437
438
439
|
'redirects' => [
SlashRedirect::className(),
],
|
c237629a
Anastasia
first commit
|
440
|
],
|
982be2a8
alex
Генерация мета те...
|
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
'assetsAutoCompress' => [
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
'enabled' => false,
'readFileTimeout' => 3,
//Time in seconds for reading each asset file
'jsCompress' => true,
//Enable minification js in html code
'jsCompressFlaggedComments' => true,
//Cut comments during processing js
'cssCompress' => true,
//Enable minification css in html code
'cssFileCompile' => true,
//Turning association css files
'cssFileRemouteCompile' => false,
//Trying to get css files to which the specified path as the remote file, skchat him to her.
'cssFileCompress' => true,
//Enable compression and processing before being stored in the css file
'cssFileBottom' => false,
//Moving down the page css files
'cssFileBottomLoadOnJs' => false,
//Transfer css file down the page and uploading them using js
'jsFileCompile' => true,
//Turning association js files
'jsFileRemouteCompile' => false,
//Trying to get a js files to which the specified path as the remote file, skchat him to her.
'jsFileCompress' => true,
//Enable compression and processing js before saving a file
'jsFileCompressFlaggedComments' => true,
//Cut comments during processing js
'htmlCompress' => true,
//Enable compression html
'noIncludeJsFilesOnPjax' => true,
//Do not connect the js files when all pjax requests
'htmlCompressOptions' => //options for compressing output result
[
'extra' => false,
//use more compact algorithm
'no-comments' => true
//cut all the html comments
],
],
|
c237629a
Anastasia
first commit
|
488
489
490
491
|
],
'params' => $params,
];
|