Commit 1a05901908fdda2723271a1b598d1f3fe4a928fc

Authored by alex
1 parent c420c609

Доделал мелкие правки

common/messages/ru/app.php
... ... @@ -91,7 +91,6 @@ return [
91 91  
92 92 'Company Title' => 'ArtPlast',
93 93  
94   -
95 94 'Description 1' => 'Завод-производитель «Артпласт» предлагает отличный профессиональный скотч.
96 95 Наш продукт выдерживает растяжение, высокие нагрузки,
97 96 не теряет своих качеств при низких и высоких температурах.',
... ...
common/models/Feedback.php
... ... @@ -129,11 +129,13 @@
129 129 [ 'email' ],
130 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 141 'name',
... ...
frontend/assets/AppAsset.php
... ... @@ -16,6 +16,7 @@
16 16  
17 17 ];
18 18 public $js = [
  19 + 'js/jquery.mask.min.js',
19 20 "js/script.js",
20 21 "js/markerclusterer.js",
21 22 "js/map.js",
... ...
frontend/config/main.php
... ... @@ -75,7 +75,7 @@
75 75  
76 76 'contact' => [
77 77 'class' => 'artbox\core\forms\Module',
78   - 'activeRecord' => "artbox\core\models\Feedback",
  78 + 'activeRecord' => "common\models\Feedback",
79 79 'templateForm' => '<div class="row">{form}</div>',
80 80 'attributes' => [
81 81 'name',
... ... @@ -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 121 'sendEmail' => true,
124 122 'email' => 'alkhonko@gmail.com',
125 123 'subject' => 'test tt22',
... ...
frontend/mail/layouts/html.php
1   -<p>Поступила новая заявка от пользователя</p>
2 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/jquery.mask.min.js 100644 → 100755
frontend/web/js/script.js
... ... @@ -4,10 +4,28 @@ $(document).ready(function() {
4 4 modalForms();
5 5 openMobMenuNew();
6 6 closeMobMenu();
7   -
  7 + phoneMask('#feedback-phone');
8 8 anchor();
9 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 29 function footerBottom(){
12 30 var heightHeader = document.getElementById('header_').offsetHeight
13 31 var heightFooter = document.getElementById('footer_').offsetHeight
... ...