From 54a26acc22bf28ad44dbffdd338e84324284f4cf Mon Sep 17 00:00:00 2001 From: dozer111 Date: Wed, 1 Aug 2018 16:24:26 +0300 Subject: [PATCH] Поменял везде AliasableTrait на свой. Исправил баг, что нельзя было в врачах выбрать картингку --- backend/controllers/DoctorController.php | 6 ++++-- common/models/Doctor.php | 2 +- common/models/Package.php | 2 +- common/models/Service.php | 4 ++-- common/models/blog/Article.php | 2 +- common/models/blog/Category.php | 2 +- common/models/blog/Tag.php | 4 ++-- common/models/page/Page.php | 2 +- frontend/web/css/newStyle.css | 0 9 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 frontend/web/css/newStyle.css diff --git a/backend/controllers/DoctorController.php b/backend/controllers/DoctorController.php index 87a06b6..0190748 100644 --- a/backend/controllers/DoctorController.php +++ b/backend/controllers/DoctorController.php @@ -150,10 +150,12 @@ protected static function fieldsConfig() { - return [ + + return [ 'model' => Doctor::className(), 'hasAlias' => true, - 'languageFields' => [ + + 'languageFields' => [ [ 'name' => 'name', 'type' => Form::STRING, diff --git a/common/models/Doctor.php b/common/models/Doctor.php index ef67709..1832a6d 100644 --- a/common/models/Doctor.php +++ b/common/models/Doctor.php @@ -68,7 +68,7 @@ class Doctor extends \yii\db\ActiveRecord { return [ [['service_id', 'sort'], 'default', 'value' => null], - [['service_id', 'sort'], 'integer'], + [['service_id', 'sort', 'image_id'], 'integer'], [['status'], 'boolean'], [['service_id'], 'exist', 'skipOnError' => true, 'targetClass' => Service::className(), 'targetAttribute' => ['service_id' => 'id']], ]; diff --git a/common/models/Package.php b/common/models/Package.php index b4f857d..87808ad 100644 --- a/common/models/Package.php +++ b/common/models/Package.php @@ -3,7 +3,7 @@ namespace common\models; use artbox\core\models\Image; -use artbox\core\models\traits\AliasableTrait; +use backend\traits\AliasableTrait; use Yii; use artbox\core\models\Language; use yii\behaviors\TimestampBehavior; diff --git a/common/models/Service.php b/common/models/Service.php index 6e76dd8..fd28205 100644 --- a/common/models/Service.php +++ b/common/models/Service.php @@ -2,9 +2,9 @@ namespace common\models; -use artbox\core\models\Alias; + use artbox\core\models\Image; -use artbox\core\models\traits\AliasableTrait; +use backend\traits\AliasableTrait; use backend\behaviors\LevelBehavior; use Yii; use artbox\core\models\Language; diff --git a/common/models/blog/Article.php b/common/models/blog/Article.php index f3fac93..4e74ebd 100755 --- a/common/models/blog/Article.php +++ b/common/models/blog/Article.php @@ -3,7 +3,7 @@ namespace common\models\blog; use artbox\core\models\Image; - use artbox\core\models\traits\AliasableTrait; + use backend\traits\AliasableTrait; use common\models\Comment; use yii\behaviors\TimestampBehavior; use yii\db\ActiveRecord; diff --git a/common/models/blog/Category.php b/common/models/blog/Category.php index af7db14..b31bcc9 100755 --- a/common/models/blog/Category.php +++ b/common/models/blog/Category.php @@ -3,7 +3,7 @@ namespace common\models\blog; use artbox\core\models\Image; - use artbox\core\models\traits\AliasableTrait; + use backend\traits\AliasableTrait; use yii\db\ActiveQuery; use yii\db\ActiveRecord; use artbox\core\models\Language; diff --git a/common/models/blog/Tag.php b/common/models/blog/Tag.php index ab5185c..714624f 100755 --- a/common/models/blog/Tag.php +++ b/common/models/blog/Tag.php @@ -1,8 +1,8 @@