Commit 1a05901908fdda2723271a1b598d1f3fe4a928fc
1 parent
c420c609
Доделал мелкие правки
Showing
7 changed files
with
38 additions
and
14 deletions
Show diff stats
common/messages/ru/app.php
| @@ -91,7 +91,6 @@ return [ | @@ -91,7 +91,6 @@ return [ | ||
| 91 | 91 | ||
| 92 | 'Company Title' => 'ArtPlast', | 92 | 'Company Title' => 'ArtPlast', |
| 93 | 93 | ||
| 94 | - | ||
| 95 | 'Description 1' => 'Завод-производитель «Артпласт» предлагает отличный профессиональный скотч. | 94 | 'Description 1' => 'Завод-производитель «Артпласт» предлагает отличный профессиональный скотч. |
| 96 | Наш продукт выдерживает растяжение, высокие нагрузки, | 95 | Наш продукт выдерживает растяжение, высокие нагрузки, |
| 97 | не теряет своих качеств при низких и высоких температурах.', | 96 | не теряет своих качеств при низких и высоких температурах.', |
common/models/Feedback.php
| @@ -129,11 +129,13 @@ | @@ -129,11 +129,13 @@ | ||
| 129 | [ 'email' ], | 129 | [ 'email' ], |
| 130 | 'email', | 130 | 'email', |
| 131 | ], | 131 | ], |
| 132 | - // [ | ||
| 133 | - // [ 'phone' ], | ||
| 134 | - // 'match', | ||
| 135 | - // 'pattern' => '/^\+38\(\d{3}\)\d{3}-\d{2}-\d{2}$/', | ||
| 136 | - // ], | 132 | + [ |
| 133 | + [ 'phone' ], | ||
| 134 | + 'match', | ||
| 135 | + 'pattern' => '/^\+38\(\d{3}\)\d{3}-\d{2}-\d{2}$/', | ||
| 136 | + 'message' => 'test 12345', | ||
| 137 | + 'on' => self::SCENARIO_DEFAULT, | ||
| 138 | + ], | ||
| 137 | [ | 139 | [ |
| 138 | [ | 140 | [ |
| 139 | 'name', | 141 | 'name', |
frontend/assets/AppAsset.php
frontend/config/main.php
| @@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
| 75 | 75 | ||
| 76 | 'contact' => [ | 76 | 'contact' => [ |
| 77 | 'class' => 'artbox\core\forms\Module', | 77 | 'class' => 'artbox\core\forms\Module', |
| 78 | - 'activeRecord' => "artbox\core\models\Feedback", | 78 | + 'activeRecord' => "common\models\Feedback", |
| 79 | 'templateForm' => '<div class="row">{form}</div>', | 79 | 'templateForm' => '<div class="row">{form}</div>', |
| 80 | 'attributes' => [ | 80 | 'attributes' => [ |
| 81 | 'name', | 81 | 'name', |
| @@ -115,11 +115,9 @@ | @@ -115,11 +115,9 @@ | ||
| 115 | ], | 115 | ], |
| 116 | 116 | ||
| 117 | ], | 117 | ], |
| 118 | - 'buttonTemplate' => '<div class="col-sm-12 text-center">{button}</div>', | ||
| 119 | - 'buttonOptions' => [ | ||
| 120 | - 'class' => 'btn btn-template-main', | ||
| 121 | - ], | ||
| 122 | - 'buttonContent' => '<i class="fa fa-envelope-o"></i> Send message', | 118 | + 'buttonTemplate' => '<div class="button-wr">{button}</div>', |
| 119 | + | ||
| 120 | + 'buttonContent' => '<i class="fa fa-envelope-o"></i> Отправить', | ||
| 123 | 'sendEmail' => true, | 121 | 'sendEmail' => true, |
| 124 | 'email' => 'alkhonko@gmail.com', | 122 | 'email' => 'alkhonko@gmail.com', |
| 125 | 'subject' => 'test tt22', | 123 | 'subject' => 'test tt22', |
frontend/mail/layouts/html.php
| 1 | -<p>Поступила новая заявка от пользователя</p> | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | + | ||
| 3 | + | ||
| 4 | + | ||
| 5 | +<h2>Поступила новая заявка от пользователя</h2> | ||
| 6 | +<p><b>Email:</b> <?=$GLOBALS["_POST"]["Feedback"]["email"];?></p> | ||
| 7 | +<p><b>Имя:</b> <?=$GLOBALS["_POST"]["Feedback"]["name"];?></p> | ||
| 8 | +<p><b>Телефон:</b> <?=$GLOBALS["_POST"]["Feedback"]["phone"];?></p> |
frontend/web/js/script.js
| @@ -4,10 +4,28 @@ $(document).ready(function() { | @@ -4,10 +4,28 @@ $(document).ready(function() { | ||
| 4 | modalForms(); | 4 | modalForms(); |
| 5 | openMobMenuNew(); | 5 | openMobMenuNew(); |
| 6 | closeMobMenu(); | 6 | closeMobMenu(); |
| 7 | - | 7 | + phoneMask('#feedback-phone'); |
| 8 | anchor(); | 8 | anchor(); |
| 9 | fixedHeader(); | 9 | fixedHeader(); |
| 10 | 10 | ||
| 11 | + function phoneMask(phoneInput2) { | ||
| 12 | + var phoneInput = phoneInput2; | ||
| 13 | + | ||
| 14 | + if($('body').find(phoneInput).length>0){ | ||
| 15 | + $(phoneInput).mask('+38(000)000-00-00',{placeholder:'+38(0__)___-__-__'}); | ||
| 16 | + $(phoneInput).focus(function () { | ||
| 17 | + if(($(this).val())== '') {$(this).val('+38(0')} | ||
| 18 | + }) | ||
| 19 | + $(phoneInput).focusout(function () { | ||
| 20 | + var phoneVal = $(this).val() | ||
| 21 | + //if(phoneVal == '+38(0' || phoneVal == '+38(' || phoneVal == '+38' || phoneVal == '+3' || phoneVal == '+') {$(this).val('')} | ||
| 22 | + if(phoneVal.length <17) {$(this).val('')} | ||
| 23 | + }) | ||
| 24 | + } | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + | ||
| 11 | function footerBottom(){ | 29 | function footerBottom(){ |
| 12 | var heightHeader = document.getElementById('header_').offsetHeight | 30 | var heightHeader = document.getElementById('header_').offsetHeight |
| 13 | var heightFooter = document.getElementById('footer_').offsetHeight | 31 | var heightFooter = document.getElementById('footer_').offsetHeight |