Commit 83355b321de374246edaab118f17fbf4c6ff9152

Authored by alex
1 parent 4026fed8

Form changed 2

common/messages/en/app.php
... ... @@ -2,15 +2,15 @@
2 2  
3 3 return [
4 4  
5   - 'Name' => 'Name',
  5 + 'Name' => 'Name (as it should appear in official listing)',
6 6 'Secondname' => 'Surname',
7 7 'Dignity' => 'Title',
8 8 'Gender' => 'Gender',
9 9 'Birth' => 'Date of birth',
10   - 'Citizenship' => 'Nationality',
  10 + 'Citizenship' => 'Сountry/organization represented',
11 11 'Passport' => 'Series and passport number',
12   - 'Email' => 'E-mail',
13   - 'Organization' => 'Place of work, position',
  12 + 'Email' => 'Official mailing address (for dispatch of documents)',
  13 + 'Organization' => 'Professional title',
14 14  
15 15 'Participation in events' => 'Participation in events',
16 16 'mark required' => 'mark required',
... ... @@ -83,7 +83,7 @@ return [
83 83 'fax' => 'Fax',
84 84 'Acceptance' => 'Acceptance',
85 85 'Acc text1' => 'I, the undersigned, hereby accept the invitation of the Government of Ukraine and the United Nations (UNECE) to participate in the 9th International Forum on energy for sustainable development, which will take place in Kyiv, Ukraine.',
86   -
  86 + 'Choose' => 'Choose',
87 87  
88 88 ];
89 89 ?>
90 90 \ No newline at end of file
... ...
common/messages/fr/app.php
... ... @@ -3,15 +3,15 @@
3 3  
4 4 return [
5 5  
6   - 'Name' => 'Prénom',
  6 + 'Name' => 'Nom (comme il devrait figurer dans la liste officielle)',
7 7 'Secondname' => 'Nom',
8 8 'Dignity' => 'Le titre',
9 9 'Gender' => 'Devenir',
10 10 'Birth' => 'Date de naissance',
11   - 'Citizenship' => 'La citoyenneté',
  11 + 'Citizenship' => 'Pays / organisation representee',
12 12 'Passport' => 'Série et numéro de passeport',
13   - 'Email' => 'E-mail',
14   - 'Organization' => 'Lieu de travail, la position',
  13 + 'Email' => 'Adresse postale officielle (pour l\'envoi de documents)',
  14 + 'Organization' => 'Titre professionnel',
15 15  
16 16  
17 17 'Conference' => 'Conférence ministérielle',
... ... @@ -85,6 +85,13 @@ return [
85 85 'Acceptance' => 'Acceptation',
86 86 'Acc text1' => 'Je, soussigné, accepte l’invitation du Gouvernement ukrainien et de l’Organisation des Nations Unies (CEE-ONU) à participer au 9ème Forum international sur l’énergie pour le développement durable, qui se tiendra à Kiev, en Ukraine. ',
87 87  
  88 + 'Choose' => 'Sélectionner',
  89 +
  90 +
  91 +
  92 +
  93 +
  94 +
88 95  
89 96  
90 97 ];
91 98 \ No newline at end of file
... ...
common/messages/ru/app.php
... ... @@ -3,15 +3,15 @@
3 3  
4 4 return [
5 5  
6   - 'Name' => 'Имя',
  6 + 'Name' => 'Имя, Фамилия (для официального обращения)',
7 7 'Secondname' => 'Фамилия',
8 8 'Dignity' => 'Титул',
9 9 'Gender' => 'Пол',
10 10 'Birth' => 'Дата рождения',
11   - 'Citizenship' => 'Гражданство',
  11 + 'Citizenship' => 'Страна\организация',
12 12 'Passport' => 'Серия и номер паспорта',
13   - 'Email' => 'Е-мейл',
14   - 'Organization' => 'Место работы, должность',
  13 + 'Email' => 'Официальный почтовый адресс (для отправки документов)',
  14 + 'Organization' => 'Должность',
15 15  
16 16 'Conference' => 'Министерская конференция',
17 17 'Geee' => 'Группа експертов по энергоэффективности (GEEE)',
... ... @@ -81,7 +81,7 @@ return [
81 81 'Acceptance' => 'СОГЛАСИЕ',
82 82 'Acc text1' => 'Я, нижеподписавшийся, настоящим принимаю приглашение правительства Украины и Организации Объединенных Наций (ЕЭК ООН) принять участие в 9-м Международном форуме по энергетике для устойчивого развития, который состоится в Киеве, Украина.',
83 83  
84   -
  84 + 'Choose' => 'Выбрать',
85 85  
86 86  
87 87  
... ...
common/messages/ua/app.php
... ... @@ -3,15 +3,15 @@
3 3  
4 4 return [
5 5  
6   - 'Name' => 'Ім\'я',
  6 + 'Name' => 'Імя, Прізвище (офіційне звернення)',
7 7 'Secondname' => 'Прізвище',
8 8 'Dignity' => 'Титул',
9 9 'Gender' => 'Стать',
10 10 'Birth' => 'Дата народження',
11   - 'Citizenship' => 'Громадянство',
  11 + 'Citizenship' => 'Країна/Організація',
12 12 'Passport' => 'Серія та номер паспорта',
13   - 'Email' => 'Е-мейл',
14   - 'Organization' => 'Місце роботи, посада',
  13 + 'Email' => 'Офіційна поштова адреса (для відправки документів)',
  14 + 'Organization' => 'Посада',
15 15  
16 16 'Conference' => 'Міністерська конференція',
17 17 'Geee' => 'Група експертів з енергоефективності (GEEE)',
... ... @@ -82,7 +82,7 @@ return [
82 82 'Acc text1' => 'Я, що нижче підписався, цим приймаю запрошення уряду України та Організації Об\'єднаних Націй (ЄЕК ООН) взяти участь у 9-му Міжнародному форумі з енергетики для сталого розвитку, який відбудеться в Києві, Україна.',
83 83  
84 84  
85   -
  85 + 'Choose' => 'Вибрати',
86 86  
87 87  
88 88  
... ...
common/models/Customer.php
... ... @@ -45,7 +45,7 @@
45 45 * @property boolean $meal_kashrut
46 46 * @property boolean $meal_vegan
47 47 *
48   - *
  48 + * @property integer $working_lang
49 49 */
50 50 class Customer extends \yii\db\ActiveRecord
51 51 {
... ... @@ -56,6 +56,14 @@
56 56 const STATUS_NEW = 2;
57 57 const STATUS_ACTIVE = 1;
58 58 const STATUS_NO = 0;
  59 +
  60 + const MEAL_1 = 'halal';
  61 + const MEAL_2 = 'kashrut';
  62 + const MEAL_3 = 'vegetarian';
  63 + const MEAL_NONE = 'none';
  64 +
  65 +
  66 +
59 67  
60 68 const MALE = '1';
61 69 const FEMALE = '2';
... ... @@ -87,7 +95,8 @@
87 95 'gender',
88 96 'status',
89 97 'language_id',
90   - 'acceptance'
  98 + 'acceptance',
  99 + 'working_lang'
91 100 ],
92 101 'integer',
93 102 ],
... ...
console/migrations/m180905_131729_customer_add_work_lang_column.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\db\Migration;
  4 +
  5 +/**
  6 + * Class m180905_131729_customer_add_work_lang_column
  7 + */
  8 +class m180905_131729_customer_add_work_lang_column extends Migration
  9 +{
  10 +
  11 + public function up()
  12 + {
  13 + /**
  14 + * рабочий язык
  15 + */
  16 + $this->addColumn('customer','working_lang',$this->integer());
  17 +
  18 + $this->addForeignKey('customer_work_lang',
  19 + 'customer',
  20 + 'working_lang',
  21 + 'language',
  22 + 'id'
  23 + );
  24 + }
  25 +
  26 + public function down()
  27 + {
  28 + $this->dropColumn('customer','working_language');
  29 + }
  30 +
  31 +}
... ...
frontend/views/site/signup.php
... ... @@ -59,8 +59,29 @@ $js=$dp-&gt;getDatepickerJs();
59 59 <?=$form->field($model, 'fax')->textInput(['class' => ''])?>
60 60 </div>
61 61 <div class="input-wr">
62   - <?=$form->field($model, 'phone_own')->textInput(['class' => ''])?>
  62 + <?php echo $form->field($model, 'citizenship')->textInput(['class' => ''])?>
63 63 </div>
  64 +
  65 + <div class="row">
  66 + <div class="col-xs-12 col-sm-6">
  67 + <div class="input-wr">
  68 + <?php echo $form->field($model, 'gender')->dropDownList([
  69 + Customer::MALE => \Yii::t('app', 'Male'),
  70 + Customer::FEMALE => \Yii::t('app', 'Female'),
  71 + ],['class' => ''])?>
  72 + </div>
  73 + </div>
  74 + <div class="col-xs-12 col-sm-6">
  75 + <div class="input-wr">
  76 + <?php echo $form->field($model, 'birth')->textInput(['class' => '_datepicer'])?>
  77 + </div>
  78 + </div>
  79 + </div>
  80 +
  81 +
  82 + <!--<div class="input-wr">
  83 + <?/*=$form->field($model, 'phone_own')->textInput(['class' => ''])*/?>
  84 + </div>-->
64 85 <div class="signup_text1" >
65 86 <b><?php echo \Yii::t('app','Passport details');?></b>
66 87 (<?php echo \Yii::t('app','mark required');?>)</div>
... ... @@ -79,33 +100,47 @@ $js=$dp-&gt;getDatepickerJs();
79 100 </div>
80 101  
81 102 </div>
82   - <div class="col-xs-12 col-sm-12 col-sm-push-1 col-md-push-2">
  103 + <div class="col-xs-12 col-sm-12 col-sm-push-1 col-md-push-2">
  104 + <div class="registr-text">
  105 + <b><?php echo \Yii::t('app','Need visa?');?></b>
  106 + </div>
  107 +
  108 + <div class="input-wr sidebar_checks">
  109 + <?php echo $form->field($model, 'need_visa',[
  110 + 'template' => '{input}{label}',
  111 + ])
  112 + ->checkbox([], false)
  113 + ->label(\Yii::t('app', 'yes'))?>
  114 + </div>
  115 +
  116 + </div>
  117 + <!--<div class="col-xs-12 col-sm-12 col-sm-push-1 col-md-push-2">
83 118 <div class="registr-text">
84   - <b><?php echo \Yii::t('app','Participation in events');?></b>
85   - (<?php echo \Yii::t('app','mark required');?>)</div>
  119 + <b><?php /*echo \Yii::t('app','Participation in events');*/?></b>
  120 + (<?php /*echo \Yii::t('app','mark required');*/?>)</div>
86 121  
87 122 <div class="input-wr sidebar_checks">
88   - <?php echo $form->field($model, 'conference',[
  123 + <?php /*echo $form->field($model, 'conference',[
89 124 'template' => '{input}{label}',
90 125 ])
91 126 ->checkbox([], false)
92   - ->label(\Yii::t('app', 'Conference'))?>
  127 + ->label(\Yii::t('app', 'Conference'))*/?>
93 128 </div>
94 129  
95 130 <div class="input-wr sidebar_checks">
96   - <?php echo $form->field($model, 'geee',[
  131 + <?php /*echo $form->field($model, 'geee',[
97 132 'template' => '{input}{label}',
98 133 ])
99   - ->checkbox([], false)->label(\Yii::t('app', 'Geee'))?>
  134 + ->checkbox([], false)->label(\Yii::t('app', 'Geee'))*/?>
100 135 </div>
101 136  
102 137 <div class="input-wr sidebar_checks">
103   - <?php echo $form->field($model, 'gere',[
  138 + <?php /*echo $form->field($model, 'gere',[
104 139 'template' => '{input}{label}',
105 140 ])
106   - ->checkbox([], false)->label(\Yii::t('app', 'Gere'))?>
  141 + ->checkbox([], false)->label(\Yii::t('app', 'Gere'))*/?>
107 142  
108   - </div> </div>
  143 + </div> </div>-->
109 144  
110 145  
111 146  
... ... @@ -114,121 +149,65 @@ $js=$dp-&gt;getDatepickerJs();
114 149 <b><?php echo \Yii::t('app','Special meal');?></b>
115 150 </div>
116 151  
117   - <div class="input-wr sidebar_checks">
118   - <?php echo $form->field($model, 'meal_halal',[
119   - 'template' => '{input}{label}',
120   - ])
121   - ->checkbox([], false)
122   - ->label(\Yii::t('app', 'Meal1'))?>
123   - </div>
  152 + <div class="input-wr">
  153 + <?php echo $form->field($model, 'special_meal')
  154 + ->dropDownList([
  155 + Customer::MEAL_NONE => \Yii::t('app', "Choose"),
  156 + Customer::MEAL_1 => \Yii::t('app', 'Meal1'),
  157 + Customer::MEAL_2 => \Yii::t('app', 'Meal2'),
  158 + Customer::MEAL_3 => \Yii::t('app', 'Meal3'),
  159 + ]);
124 160  
  161 + ?>
  162 + </div>
  163 +<!--
125 164 <div class="input-wr sidebar_checks">
126   - <?php echo $form->field($model, 'meal_kashrut',[
  165 + <?php /*echo $form->field($model, 'meal_kashrut',[
127 166 'template' => '{input}{label}',
128 167 ])
129   - ->checkbox([], false)->label(\Yii::t('app', 'Meal2'))?>
  168 + ->checkbox([], false)->label(\Yii::t('app', 'Meal2'))*/?>
130 169 </div>
131 170  
132 171 <div class="input-wr sidebar_checks">
133   - <?php echo $form->field($model, 'meal_vegan',[
  172 + <?php /*echo $form->field($model, 'meal_vegan',[
134 173 'template' => '{input}{label}',
135 174 ])
136   - ->checkbox([], false)->label(\Yii::t('app', 'Meal3'))?>
  175 + ->checkbox([], false)->label(\Yii::t('app', 'Meal3'))*/?>
137 176  
  177 + </div>-->
138 178 </div>
139   - </div>
140   -
141   -
142   -
143   -
144   -
145   - <div class="col-xs-12 col-sm-12 col-sm-push-1 col-md-push-2">
146   - <div class="registr-text">
147   - <b><?php echo \Yii::t('app','Need visa?');?></b>
148   - </div>
149   -
150   - <div class="input-wr sidebar_checks">
151   - <?php echo $form->field($model, 'need_visa',[
152   - 'template' => '{input}{label}',
153   - ])
154   - ->checkbox([], false)
155   - ->label(\Yii::t('app', 'yes'))?>
156   - </div>
157   -
158   - </div>
159   -
160   -
161   -
162   -
163   -
164   -
165   -
166   -
167   -
168   -
169   -
170   -
171   -
172   -
173 179  
174 180 <div class="col-xs-12 col-sm-12 col-sm-push-1 col-md-push-2">
175 181 <div class="registr-text">
176 182 <b><?php echo \Yii::t('app','Working language');?></b>
177 183 </div>
  184 + <div class="input-wr">
178 185  
179   - <div class="input-wr sidebar_checks">
180   - <?php echo $form->field($model, 'working_language_ru',[
181   - 'template' => '{input}{label}',
182   - ])
183   - ->checkbox([], false)
184   - ->label(\Yii::t('app', 'RusW'))?>
185   - </div>
  186 + <?php echo $form->field($model, 'working_lang')
  187 + ->dropDownList([
  188 + 2 => \Yii::t('app', "RusW"),
  189 + 1 => \Yii::t('app', 'EngW'),
  190 + 4 => \Yii::t('app', 'FrW'),
  191 + ]);
  192 +
  193 + ?>
186 194  
187   - <div class="input-wr sidebar_checks">
188   - <?php echo $form->field($model, 'working_language_en',[
189   - 'template' => '{input}{label}',
190   - ])
191   - ->checkbox([], false)->label(\Yii::t('app',
192   - 'EngW'))?>
193 195 </div>
194 196  
195   - <div class="input-wr sidebar_checks">
196   - <?php echo $form->field($model, 'working_language_fr',[
197   - 'template' => '{input}{label}',
198   - ])
199   - ->checkbox([], false)->label(\Yii::t('app',
200   - 'FrW'))?>
201 197  
202   - </div>
203 198  
204 199  
205 200  
206 201  
207   - <div class="input-wr">
208   - <?php echo $form->field($model, 'dignity')->textInput(['class' => ''])?>
209   - </div>
210 202  
211 203  
212   - <div class="row">
213   - <div class="col-xs-12 col-sm-6">
214   - <div class="input-wr">
215   - <?php echo $form->field($model, 'gender')->dropDownList([
216   - Customer::MALE => \Yii::t('app', 'Male'),
217   - Customer::FEMALE => \Yii::t('app', 'Female'),
218   - ],['class' => ''])?>
219   - </div>
220   - </div>
221   - <div class="col-xs-12 col-sm-6">
222   - <div class="input-wr">
223   - <?php echo $form->field($model, 'birth')->textInput(['class' => '_datepicer'])?>
224   - </div>
225   - </div>
226   - </div>
227 204  
228   - <div class="input-wr">
229   - <?php echo $form->field($model, 'citizenship')
230   - ->textInput(['class' => ''])?>
231   - </div>
  205 +
  206 +
  207 + <!-- <div class="input-wr">
  208 + <?php /*echo $form->field($model, 'citizenship')
  209 + ->textInput(['class' => ''])*/?>
  210 + </div>-->
232 211  
233 212 </div>
234 213 <div class="col-xs-12 col-sm-12 col-sm-push-1 col-md-push-2">
... ...