Commit 9d70b8a62ddfe06e47cd0bb89483a3c030b38e90

Authored by alex
1 parent d74c8480

1) добавил новые документы программы выставки

2) изменил поля в форме
3) настроил в соответствии с п.2 письмо нам, и админку
backend/views/request/update.php
@@ -53,6 +53,8 @@ @@ -53,6 +53,8 @@
53 ->textInput() ?> 53 ->textInput() ?>
54 <?= $form->field($model, 'email') 54 <?= $form->field($model, 'email')
55 ?> 55 ?>
  56 + <?= $form->field($model, 'post_address')
  57 + ->textInput() ?>
56 <?= $form->field($model, 'phone_office') 58 <?= $form->field($model, 'phone_office')
57 ->textInput() ?> 59 ->textInput() ?>
58 <?= $form->field($model, 'phone_other') 60 <?= $form->field($model, 'phone_other')
@@ -93,6 +95,7 @@ @@ -93,6 +95,7 @@
93 <?= $form->field($model, 'special_meal') 95 <?= $form->field($model, 'special_meal')
94 ->textInput() ?> 96 ->textInput() ?>
95 97
  98 +
96 <?php echo $form->field($model, 'working_lang') 99 <?php echo $form->field($model, 'working_lang')
97 ->dropDownList([ 100 ->dropDownList([
98 2 => \Yii::t('app', "RusW"), 101 2 => \Yii::t('app', "RusW"),
common/config/params.php
1 <?php 1 <?php
2 return [ 2 return [
3 - 'adminEmail' => 'admin@example.com',  
4 - 'supportEmail' => 'support@example.com', 3 + 'adminEmail' => 'admin@example.com',
  4 + 'supportEmail' => 'support@example.com',
5 'user.passwordResetTokenExpire' => 3600, 5 'user.passwordResetTokenExpire' => 3600,
  6 + 'pdf_instruction' => [
  7 + 'ru' => 'Kyiv_-_EM_and_9th_Forum_-_OverviewHyper_MASTER_07-5_Clean.pdf',
  8 + 'en' => 'Kyiv_-_EM_and_9th_Forum_-_OverviewHyper_MASTER_07-5_Clean.pdf',
  9 + 'ua' => 'Ukraine - EM and 9th Forum-UKR.pdf',
  10 + 'fr' => 'fr_agenda.pdf',
  11 + ]
6 ]; 12 ];
common/helpers/datePickerData.php
@@ -26,6 +26,7 @@ class datePickerData @@ -26,6 +26,7 @@ class datePickerData
26 private function initJsDatePicker(){ 26 private function initJsDatePicker(){
27 $this->result['ru']=<<<JS 27 $this->result['ru']=<<<JS
28 $( '._datepicer' ).datepicker({ 28 $( '._datepicer' ).datepicker({
  29 + yearRange: '1940:2030',
29 changeMonth: true, 30 changeMonth: true,
30 changeYear: true, 31 changeYear: true,
31 dateFormat: 'dd.mm.yy', 32 dateFormat: 'dd.mm.yy',
@@ -43,6 +44,7 @@ $( &#39;._datepicer&#39; ).datepicker({ @@ -43,6 +44,7 @@ $( &#39;._datepicer&#39; ).datepicker({
43 JS; 44 JS;
44 $this->result['en']=<<<JS 45 $this->result['en']=<<<JS
45 $( '._datepicer' ).datepicker({ 46 $( '._datepicer' ).datepicker({
  47 + yearRange: '1940:2030',
46 changeMonth: true, 48 changeMonth: true,
47 changeYear: true, 49 changeYear: true,
48 dateFormat: 'dd.mm.yy', 50 dateFormat: 'dd.mm.yy',
@@ -60,6 +62,7 @@ $( &#39;._datepicer&#39; ).datepicker({ @@ -60,6 +62,7 @@ $( &#39;._datepicer&#39; ).datepicker({
60 JS; 62 JS;
61 $this->result['ua']=<<<JS 63 $this->result['ua']=<<<JS
62 $( '._datepicer' ).datepicker({ 64 $( '._datepicer' ).datepicker({
  65 + yearRange: '1940:2030',
63 changeMonth: true, 66 changeMonth: true,
64 changeYear: true, 67 changeYear: true,
65 dateFormat: 'dd.mm.yy', 68 dateFormat: 'dd.mm.yy',
@@ -77,6 +80,7 @@ $( &#39;._datepicer&#39; ).datepicker({ @@ -77,6 +80,7 @@ $( &#39;._datepicer&#39; ).datepicker({
77 JS; 80 JS;
78 $this->result['fr']=<<<JS 81 $this->result['fr']=<<<JS
79 $( '._datepicer' ).datepicker({ 82 $( '._datepicer' ).datepicker({
  83 + yearRange: '1940:2030',
80 changeMonth: true, 84 changeMonth: true,
81 changeYear: true, 85 changeYear: true,
82 dateFormat: 'dd.mm.yy', 86 dateFormat: 'dd.mm.yy',
common/mail/request.php
@@ -22,6 +22,10 @@ @@ -22,6 +22,10 @@
22 </tr> 22 </tr>
23 <tr> 23 <tr>
24 <td><b>Официальный почтовый адресс</b> :</td> 24 <td><b>Официальный почтовый адресс</b> :</td>
  25 + <td><?= $formatter->asText($model->post_address) ?></td>
  26 + </tr>
  27 + <tr>
  28 + <td><b>Email</b> :</td>
25 <td><?= $formatter->asText($model->email) ?></td> 29 <td><?= $formatter->asText($model->email) ?></td>
26 </tr> 30 </tr>
27 <tr> 31 <tr>
common/messages/en/app.php
@@ -9,7 +9,8 @@ return [ @@ -9,7 +9,8 @@ return [
9 'Birth' => 'Date of birth', 9 'Birth' => 'Date of birth',
10 'Citizenship' => 'Сountry/organization represented', 10 'Citizenship' => 'Сountry/organization represented',
11 'Passport' => 'Series and passport number', 11 'Passport' => 'Series and passport number',
12 - 'Email' => 'Official mailing address (for dispatch of documents)', 12 + 'Post address' => 'Official mailing address (for dispatch of documents)',
  13 + 'Email' => 'E-mail',
13 'Organization' => 'Professional title', 14 'Organization' => 'Professional title',
14 15
15 'Participation in events' => 'Participation in events', 16 'Participation in events' => 'Participation in events',
common/messages/fr/app.php
@@ -10,7 +10,8 @@ return [ @@ -10,7 +10,8 @@ return [
10 'Birth' => 'Date de naissance', 10 'Birth' => 'Date de naissance',
11 'Citizenship' => 'Pays / organisation representee', 11 'Citizenship' => 'Pays / organisation representee',
12 'Passport' => 'Série et numéro de passeport', 12 'Passport' => 'Série et numéro de passeport',
13 - 'Email' => 'Adresse postale officielle (pour l\'envoi de documents)', 13 + 'Post address' => 'Adresse postale officielle (pour l\'envoi de documents)',
  14 + 'Email' => 'E-mail',
14 'Organization' => 'Titre professionnel', 15 'Organization' => 'Titre professionnel',
15 16
16 17
common/messages/ru/app.php
@@ -10,7 +10,8 @@ return [ @@ -10,7 +10,8 @@ return [
10 'Birth' => 'Дата рождения', 10 'Birth' => 'Дата рождения',
11 'Citizenship' => 'Страна\организация', 11 'Citizenship' => 'Страна\организация',
12 'Passport' => 'Серия и номер паспорта', 12 'Passport' => 'Серия и номер паспорта',
13 - 'Email' => 'Официальный почтовый адресс (для отправки документов)', 13 + 'Post address' => 'Официальный почтовый адресс (для отправки документов)',
  14 + 'Email' => 'Е-мейл',
14 'Organization' => 'Должность', 15 'Organization' => 'Должность',
15 16
16 'Conference' => 'Министерская конференция', 17 'Conference' => 'Министерская конференция',
common/messages/ua/app.php
@@ -10,7 +10,8 @@ return [ @@ -10,7 +10,8 @@ return [
10 'Birth' => 'Дата народження', 10 'Birth' => 'Дата народження',
11 'Citizenship' => 'Країна/Організація', 11 'Citizenship' => 'Країна/Організація',
12 'Passport' => 'Серія та номер паспорта', 12 'Passport' => 'Серія та номер паспорта',
13 - 'Email' => 'Офіційна поштова адреса (для відправки документів)', 13 + 'Post address' => 'Офіційна поштова адреса (для відправки документів)',
  14 + 'Email' => 'Е-мейл',
14 'Organization' => 'Посада', 15 'Organization' => 'Посада',
15 16
16 'Conference' => 'Міністерська конференція', 17 'Conference' => 'Міністерська конференція',
common/models/Customer.php
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
46 * @property boolean $meal_vegan 46 * @property boolean $meal_vegan
47 * 47 *
48 * @property integer $working_lang 48 * @property integer $working_lang
  49 + * @property string $post_address ==> официальный почтовый адрес
49 */ 50 */
50 class Customer extends \yii\db\ActiveRecord 51 class Customer extends \yii\db\ActiveRecord
51 { 52 {
@@ -135,6 +136,7 @@ @@ -135,6 +136,7 @@
135 'passport_number', 136 'passport_number',
136 'passport_date', 137 'passport_date',
137 'passport_valid', 138 'passport_valid',
  139 + 'post_address'
138 ], 140 ],
139 'string', 141 'string',
140 'max' => 255, 142 'max' => 255,
@@ -168,6 +170,7 @@ @@ -168,6 +170,7 @@
168 'citizenship', 170 'citizenship',
169 #'passport', 171 #'passport',
170 'email', 172 'email',
  173 + 'post_address',
171 'passport_number', 174 'passport_number',
172 'passport_date', 175 'passport_date',
173 'passport_place', 176 'passport_place',
@@ -179,6 +182,9 @@ @@ -179,6 +182,9 @@
179 ], 182 ],
180 'required', 183 'required',
181 ], 184 ],
  185 + [['phone_office',
  186 + 'phone_other'
  187 + ],'match','pattern'=>'#^[\d\s]+$#'],
182 [ 188 [
183 ['acceptance'], 189 ['acceptance'],
184 'compare', 190 'compare',
@@ -224,6 +230,7 @@ @@ -224,6 +230,7 @@
224 'acceptance' => Yii::t('app', 'acceptance'), 230 'acceptance' => Yii::t('app', 'acceptance'),
225 'working_lang' => Yii::t('app', 'Working language'), 231 'working_lang' => Yii::t('app', 'Working language'),
226 'special_meal' => Yii::t('app', 'Special meal'), 232 'special_meal' => Yii::t('app', 'Special meal'),
  233 + 'post_address' => Yii::t('app', 'Post address'),
227 234
228 ]; 235 ];
229 } 236 }
console/migrations/m180906_190153_customer_add_column_post.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\db\Migration;
  4 +
  5 +/**
  6 + * Class m180906_190153_customer_add_column_post
  7 + */
  8 +class m180906_190153_customer_add_column_post extends Migration
  9 +{
  10 +
  11 + public function up()
  12 + {
  13 + $this->addColumn('customer','post_address',
  14 + $this->string(255)
  15 + ->comment("Официальный почтовый адрес"));
  16 + }
  17 +
  18 + public function down()
  19 + {
  20 + $this->dropColumn('customer','post_address');
  21 + }
  22 +
  23 +}
frontend/controllers/SiteController.php
@@ -200,6 +200,9 @@ @@ -200,6 +200,9 @@
200 200
201 return $this->redirect([ 'site/index' ]); 201 return $this->redirect([ 'site/index' ]);
202 } 202 }
  203 + else{
  204 + die(var_dump($model->errors));
  205 + }
203 206
204 } 207 }
205 return $this->render( 208 return $this->render(
frontend/views/layouts/main.php
@@ -76,6 +76,9 @@ @@ -76,6 +76,9 @@
76 JS; 76 JS;
77 $this->registerJs($js, View::POS_READY); 77 $this->registerJs($js, View::POS_READY);
78 } 78 }
  79 + $currentLang=\artbox\core\models\Language::getCurrent()->url;
  80 +
  81 +
79 ?> 82 ?>
80 83
81 <?php $this->beginPage() ?> 84 <?php $this->beginPage() ?>
@@ -149,7 +152,7 @@ JS; @@ -149,7 +152,7 @@ JS;
149 if($category->id==4){ 152 if($category->id==4){
150 ?> 153 ?>
151 154
152 - <a href="/pdf/Kyiv_-_EM_and_9th_Forum_-_OverviewHyper_MASTER_07-5_Clean.pdf" 155 + <a href="/pdf/<?=\Yii::$app->params['pdf_instruction'][$currentLang];?>"
153 target="_blank" 156 target="_blank"
154 <?php if(\Yii::$app->devicedetect->isMobile()){ 157 <?php if(\Yii::$app->devicedetect->isMobile()){
155 ?> 158 ?>
frontend/views/site/signup.php
@@ -45,9 +45,13 @@ $js=$dp-&gt;getDatepickerJs(); @@ -45,9 +45,13 @@ $js=$dp-&gt;getDatepickerJs();
45 <div class="input-wr"> 45 <div class="input-wr">
46 <?=$form->field($model, 'email')->textInput(['class' => ''])?> 46 <?=$form->field($model, 'email')->textInput(['class' => ''])?>
47 </div> 47 </div>
48 -  
49 <div class="input-wr"> 48 <div class="input-wr">
50 - <?=$form->field($model, 'phone_office')->textInput(['class' => ''])?> 49 + <?=$form->field($model, 'post_address')->textInput(['class' => ''])?>
  50 + </div>
  51 + <div class="input-wr">
  52 + <?=$form->field($model, 'phone_office')
  53 + ->textInput(['class' => ''])
  54 + ?>
51 </div> 55 </div>
52 56
53 <div class="input-wr"> 57 <div class="input-wr">
frontend/web/pdf/Ukraine - EM and 9th Forum-UKR.pdf 0 → 100644
No preview for this file type
frontend/web/pdf/fr_agenda.pdf 0 → 100644
No preview for this file type