Commit 9d70b8a62ddfe06e47cd0bb89483a3c030b38e90
1 parent
d74c8480
1) добавил новые документы программы выставки
2) изменил поля в форме 3) настроил в соответствии с п.2 письмо нам, и админку
Showing
15 changed files
with
70 additions
and
9 deletions
Show diff stats
backend/views/request/update.php
| ... | ... | @@ -53,6 +53,8 @@ |
| 53 | 53 | ->textInput() ?> |
| 54 | 54 | <?= $form->field($model, 'email') |
| 55 | 55 | ?> |
| 56 | + <?= $form->field($model, 'post_address') | |
| 57 | + ->textInput() ?> | |
| 56 | 58 | <?= $form->field($model, 'phone_office') |
| 57 | 59 | ->textInput() ?> |
| 58 | 60 | <?= $form->field($model, 'phone_other') |
| ... | ... | @@ -93,6 +95,7 @@ |
| 93 | 95 | <?= $form->field($model, 'special_meal') |
| 94 | 96 | ->textInput() ?> |
| 95 | 97 | |
| 98 | + | |
| 96 | 99 | <?php echo $form->field($model, 'working_lang') |
| 97 | 100 | ->dropDownList([ |
| 98 | 101 | 2 => \Yii::t('app', "RusW"), | ... | ... |
common/config/params.php
| 1 | 1 | <?php |
| 2 | 2 | return [ |
| 3 | - 'adminEmail' => 'admin@example.com', | |
| 4 | - 'supportEmail' => 'support@example.com', | |
| 3 | + 'adminEmail' => 'admin@example.com', | |
| 4 | + 'supportEmail' => 'support@example.com', | |
| 5 | 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 | 26 | private function initJsDatePicker(){ |
| 27 | 27 | $this->result['ru']=<<<JS |
| 28 | 28 | $( '._datepicer' ).datepicker({ |
| 29 | + yearRange: '1940:2030', | |
| 29 | 30 | changeMonth: true, |
| 30 | 31 | changeYear: true, |
| 31 | 32 | dateFormat: 'dd.mm.yy', |
| ... | ... | @@ -43,6 +44,7 @@ $( '._datepicer' ).datepicker({ |
| 43 | 44 | JS; |
| 44 | 45 | $this->result['en']=<<<JS |
| 45 | 46 | $( '._datepicer' ).datepicker({ |
| 47 | + yearRange: '1940:2030', | |
| 46 | 48 | changeMonth: true, |
| 47 | 49 | changeYear: true, |
| 48 | 50 | dateFormat: 'dd.mm.yy', |
| ... | ... | @@ -60,6 +62,7 @@ $( '._datepicer' ).datepicker({ |
| 60 | 62 | JS; |
| 61 | 63 | $this->result['ua']=<<<JS |
| 62 | 64 | $( '._datepicer' ).datepicker({ |
| 65 | + yearRange: '1940:2030', | |
| 63 | 66 | changeMonth: true, |
| 64 | 67 | changeYear: true, |
| 65 | 68 | dateFormat: 'dd.mm.yy', |
| ... | ... | @@ -77,6 +80,7 @@ $( '._datepicer' ).datepicker({ |
| 77 | 80 | JS; |
| 78 | 81 | $this->result['fr']=<<<JS |
| 79 | 82 | $( '._datepicer' ).datepicker({ |
| 83 | + yearRange: '1940:2030', | |
| 80 | 84 | changeMonth: true, |
| 81 | 85 | changeYear: true, |
| 82 | 86 | dateFormat: 'dd.mm.yy', | ... | ... |
common/mail/request.php
| ... | ... | @@ -22,6 +22,10 @@ |
| 22 | 22 | </tr> |
| 23 | 23 | <tr> |
| 24 | 24 | <td><b>Официальный почтовый адресс</b> :</td> |
| 25 | + <td><?= $formatter->asText($model->post_address) ?></td> | |
| 26 | + </tr> | |
| 27 | + <tr> | |
| 28 | + <td><b>Email</b> :</td> | |
| 25 | 29 | <td><?= $formatter->asText($model->email) ?></td> |
| 26 | 30 | </tr> |
| 27 | 31 | <tr> | ... | ... |
common/messages/en/app.php
| ... | ... | @@ -9,7 +9,8 @@ return [ |
| 9 | 9 | 'Birth' => 'Date of birth', |
| 10 | 10 | 'Citizenship' => 'Сountry/organization represented', |
| 11 | 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 | 14 | 'Organization' => 'Professional title', |
| 14 | 15 | |
| 15 | 16 | 'Participation in events' => 'Participation in events', | ... | ... |
common/messages/fr/app.php
| ... | ... | @@ -10,7 +10,8 @@ return [ |
| 10 | 10 | 'Birth' => 'Date de naissance', |
| 11 | 11 | 'Citizenship' => 'Pays / organisation representee', |
| 12 | 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 | 15 | 'Organization' => 'Titre professionnel', |
| 15 | 16 | |
| 16 | 17 | ... | ... |
common/messages/ru/app.php
| ... | ... | @@ -10,7 +10,8 @@ return [ |
| 10 | 10 | 'Birth' => 'Дата рождения', |
| 11 | 11 | 'Citizenship' => 'Страна\организация', |
| 12 | 12 | 'Passport' => 'Серия и номер паспорта', |
| 13 | - 'Email' => 'Официальный почтовый адресс (для отправки документов)', | |
| 13 | + 'Post address' => 'Официальный почтовый адресс (для отправки документов)', | |
| 14 | + 'Email' => 'Е-мейл', | |
| 14 | 15 | 'Organization' => 'Должность', |
| 15 | 16 | |
| 16 | 17 | 'Conference' => 'Министерская конференция', | ... | ... |
common/messages/ua/app.php
| ... | ... | @@ -10,7 +10,8 @@ return [ |
| 10 | 10 | 'Birth' => 'Дата народження', |
| 11 | 11 | 'Citizenship' => 'Країна/Організація', |
| 12 | 12 | 'Passport' => 'Серія та номер паспорта', |
| 13 | - 'Email' => 'Офіційна поштова адреса (для відправки документів)', | |
| 13 | + 'Post address' => 'Офіційна поштова адреса (для відправки документів)', | |
| 14 | + 'Email' => 'Е-мейл', | |
| 14 | 15 | 'Organization' => 'Посада', |
| 15 | 16 | |
| 16 | 17 | 'Conference' => 'Міністерська конференція', | ... | ... |
common/models/Customer.php
| ... | ... | @@ -46,6 +46,7 @@ |
| 46 | 46 | * @property boolean $meal_vegan |
| 47 | 47 | * |
| 48 | 48 | * @property integer $working_lang |
| 49 | + * @property string $post_address ==> официальный почтовый адрес | |
| 49 | 50 | */ |
| 50 | 51 | class Customer extends \yii\db\ActiveRecord |
| 51 | 52 | { |
| ... | ... | @@ -135,6 +136,7 @@ |
| 135 | 136 | 'passport_number', |
| 136 | 137 | 'passport_date', |
| 137 | 138 | 'passport_valid', |
| 139 | + 'post_address' | |
| 138 | 140 | ], |
| 139 | 141 | 'string', |
| 140 | 142 | 'max' => 255, |
| ... | ... | @@ -168,6 +170,7 @@ |
| 168 | 170 | 'citizenship', |
| 169 | 171 | #'passport', |
| 170 | 172 | 'email', |
| 173 | + 'post_address', | |
| 171 | 174 | 'passport_number', |
| 172 | 175 | 'passport_date', |
| 173 | 176 | 'passport_place', |
| ... | ... | @@ -179,6 +182,9 @@ |
| 179 | 182 | ], |
| 180 | 183 | 'required', |
| 181 | 184 | ], |
| 185 | + [['phone_office', | |
| 186 | + 'phone_other' | |
| 187 | + ],'match','pattern'=>'#^[\d\s]+$#'], | |
| 182 | 188 | [ |
| 183 | 189 | ['acceptance'], |
| 184 | 190 | 'compare', |
| ... | ... | @@ -224,6 +230,7 @@ |
| 224 | 230 | 'acceptance' => Yii::t('app', 'acceptance'), |
| 225 | 231 | 'working_lang' => Yii::t('app', 'Working language'), |
| 226 | 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
frontend/views/layouts/main.php
| ... | ... | @@ -76,6 +76,9 @@ |
| 76 | 76 | JS; |
| 77 | 77 | $this->registerJs($js, View::POS_READY); |
| 78 | 78 | } |
| 79 | + $currentLang=\artbox\core\models\Language::getCurrent()->url; | |
| 80 | + | |
| 81 | + | |
| 79 | 82 | ?> |
| 80 | 83 | |
| 81 | 84 | <?php $this->beginPage() ?> |
| ... | ... | @@ -149,7 +152,7 @@ JS; |
| 149 | 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 | 156 | target="_blank" |
| 154 | 157 | <?php if(\Yii::$app->devicedetect->isMobile()){ |
| 155 | 158 | ?> | ... | ... |
frontend/views/site/signup.php
| ... | ... | @@ -45,9 +45,13 @@ $js=$dp->getDatepickerJs(); |
| 45 | 45 | <div class="input-wr"> |
| 46 | 46 | <?=$form->field($model, 'email')->textInput(['class' => ''])?> |
| 47 | 47 | </div> |
| 48 | - | |
| 49 | 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 | 55 | </div> |
| 52 | 56 | |
| 53 | 57 | <div class="input-wr"> | ... | ... |
No preview for this file type
No preview for this file type