diff --git a/common/messages/en/app.php b/common/messages/en/app.php new file mode 100644 index 0000000..15c5adc --- /dev/null +++ b/common/messages/en/app.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/common/models/Customer.php b/common/models/Customer.php new file mode 100644 index 0000000..dec9cf4 --- /dev/null +++ b/common/models/Customer.php @@ -0,0 +1,145 @@ + null, + ], + [ + [ + 'gender', + 'status', + 'language_id', + ], + 'integer', + ], + [ + [ 'organization' ], + 'string', + ], + [ + [ + 'conference', + 'geee', + 'gere', + ], + 'boolean', + ], + [ + [ + 'name', + 'secondname', + 'dignity', + 'birth', + 'citizenship', + 'passport', + 'email', + 'image', + ], + 'string', + 'max' => 255, + ], + [ + [ 'gender' ], + 'in', + 'range' => [ + self::MALE, + self::FEMALE, + ], + ], + [ + [ + 'gender', + 'organization', + 'name', + 'secondname', + 'dignity', + 'birth', + 'citizenship', + 'passport', + 'email', + 'image', + ], + 'required', + ], + ['email', 'email'], + ['image', 'file', 'extensions' => ['png', 'jpg', 'gif'], 'maxSize' => 1024*1024*1024*2] + + ]; + } + + /** + * {@inheritdoc} + */ + public function attributeLabels() + { + return [ + 'id' => Yii::t('app', 'ID'), + 'name' => Yii::t('app', 'Name'), + 'secondname' => Yii::t('app', 'Secondname'), + 'dignity' => Yii::t('app', 'Dignity'), + 'gender' => Yii::t('app', 'Gender'), + 'birth' => Yii::t('app', 'Birth'), + 'citizenship' => Yii::t('app', 'Citizenship'), + 'passport' => Yii::t('app', 'Passport'), + 'email' => Yii::t('app', 'Email'), + 'organization' => Yii::t('app', 'Organization'), + 'status' => Yii::t('app', 'Status'), + 'language_id' => Yii::t('app', 'Language ID'), + 'image' => Yii::t('app', 'Image'), + 'conference' => Yii::t('app', 'Conference'), + 'geee' => Yii::t('app', 'Geee'), + 'gere' => Yii::t('app', 'Gere'), + ]; + } + } diff --git a/console/migrations/m180830_105258_create_customer_table.php b/console/migrations/m180830_105258_create_customer_table.php new file mode 100644 index 0000000..27b3f22 --- /dev/null +++ b/console/migrations/m180830_105258_create_customer_table.php @@ -0,0 +1,43 @@ +createTable('customer', [ + 'id' => $this->primaryKey(), + 'name' => $this->string(), + 'secondname' => $this->string(), + 'dignity' => $this->string(), + 'gender' => $this->smallInteger(1), + 'birth' => $this->string(), + 'citizenship' => $this->string(), + 'passport' => $this->string(), + 'email' => $this->string(), + 'organization' => $this->text(), + 'status' => $this->smallInteger(1), + 'language_id' => $this->integer(), + 'image' => $this->string(), + 'conference' => $this->boolean(), + 'geee' => $this->boolean(), + 'gere' => $this->boolean() + + ]); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropTable('customer'); + } +} diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 787c8ca..502ed4f 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -148,4 +148,6 @@ } } } + + } diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 303e71c..faffa52 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -109,8 +109,8 @@
- 9й Міжнародний Форум
з енергетики для сталого розвитку
- 12-18 листопада 2018 року, Київ, Україна + з енергетики для сталого розвитку')?> +
-- libgit2 0.21.4