From 1cbecb415bdba3d6af43b5ad41c8b936497a274b Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Fri, 8 Apr 2016 21:48:53 +0200 Subject: [PATCH 1/3] add user status --- backend/models/UserCreate.php | 4 +++- backend/models/UserSearch.php | 2 +- backend/models/UserUpdate.php | 5 +++++ backend/views/user/_form.php | 3 +++ backend/views/user/index.php | 2 +- common/models/User.php | 1 + 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/backend/models/UserCreate.php b/backend/models/UserCreate.php index 710765c..671cc14 100644 --- a/backend/models/UserCreate.php +++ b/backend/models/UserCreate.php @@ -33,6 +33,8 @@ class UserCreate extends User{ [['role'], 'required'], [['role'], 'string', 'max' => 20], + ['status', 'default', 'value' => self::STATUS_ACTIVE], + ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]], ]; } @@ -47,7 +49,7 @@ class UserCreate extends User{ public function attributeLabels(){ return [ - + 'status' => 'Státusz', 'email' =>'E-mail', 'username' =>'Felhasználónév', 'created_at' =>'Létrehozás dátuma', diff --git a/backend/models/UserSearch.php b/backend/models/UserSearch.php index bbf528d..2600490 100644 --- a/backend/models/UserSearch.php +++ b/backend/models/UserSearch.php @@ -47,7 +47,7 @@ class UserSearch extends User 'query' => $query, ]); - $query->andWhere(['status' => User::STATUS_ACTIVE]); + //$query->andWhere(['status' => User::STATUS_ACTIVE]); $this->load($params); diff --git a/backend/models/UserUpdate.php b/backend/models/UserUpdate.php index 03a47f8..1ef004a 100644 --- a/backend/models/UserUpdate.php +++ b/backend/models/UserUpdate.php @@ -33,6 +33,10 @@ class UserUpdate extends User { ], [['role'], 'required'], [['role'], 'string', 'max' => 20], + + ['status', 'default', 'value' => self::STATUS_ACTIVE], + ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]], + ]; } @@ -51,6 +55,7 @@ class UserUpdate extends User { public function attributeLabels() { return [ + 'status' => 'Státusz', 'email' => 'E-mail', 'username' => 'Felhasználónév', 'created_at' => 'Létrehozás dátuma', diff --git a/backend/views/user/_form.php b/backend/views/user/_form.php index 7a8afe7..70a6870 100644 --- a/backend/views/user/_form.php +++ b/backend/views/user/_form.php @@ -5,6 +5,7 @@ use yii\widgets\ActiveForm; use yii\grid\GridView; use yii\data\ArrayDataProvider; use common\components\RoleDefinition; +use common\models\User; /* @var $this yii\web\View */ /* @var $model common\models\User */ @@ -25,6 +26,8 @@ asort($roleOptions); field($model, 'username')->textInput() ?> field($model, 'email')->textInput() ?> + field($model, 'status') + ->dropDownList(User::statuses())->hint("Csak aktív felhasználó tud bejelentkezni") ?> field($model, 'password_plain')->passwordInput() ?> field($model, 'password_repeat')->passwordInput() ?> field($model, 'role')->dropDownList($roleOptions) ?> diff --git a/backend/views/user/index.php b/backend/views/user/index.php index 6ecfb7f..deb5200 100644 --- a/backend/views/user/index.php +++ b/backend/views/user/index.php @@ -31,7 +31,7 @@ $this->params['breadcrumbs'][] = $this->title; 'username', 'email:email', 'created_at:datetime', - + ['attribute' => 'status' , 'value' => 'statusHuman'], [ 'attribute' => 'role', 'value' => function ($model){ diff --git a/common/models/User.php b/common/models/User.php index d61b17f..ce1414d 100644 --- a/common/models/User.php +++ b/common/models/User.php @@ -212,6 +212,7 @@ class User extends ActiveRecord implements IdentityInterface public function attributeLabels(){ return [ + 'status' => 'Státusz', 'username' => Yii::t('backend/user', 'Username'), 'email' => Yii::t('backend/user', 'E-Mail'), 'created_at' => Yii::t('backend/user', 'Created at'), From f6b4fbdb8e6314865efad1fe9ec166a13b8c3d13 Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Fri, 8 Apr 2016 21:50:39 +0200 Subject: [PATCH 2/3] change version --- changelog.txt | 2 ++ common/config/params.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 3135475..a3f0875 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,5 @@ +-0.0.61 + - add user status edit -0.0.60 - allow ticket installment request, when status is sent -0.0.59 diff --git a/common/config/params.php b/common/config/params.php index 02cd0a5..1e032ec 100644 --- a/common/config/params.php +++ b/common/config/params.php @@ -4,7 +4,7 @@ return [ 'supportEmail' => 'rocho02@gmail.com', 'infoEmail' => 'info@rocho-net.hu', 'user.passwordResetTokenExpire' => 3600, - 'version' => 'v0.0.60', + 'version' => 'v0.0.61', 'company' => 'movar',//gyor 'company_name' => "Freimann Kft.", 'product_visiblity' => 'account',// on reception which products to display. account or global From 440b7bb787588f7aa853d9b060ef38a7dca0105a Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Fri, 8 Apr 2016 23:03:48 +0200 Subject: [PATCH 3/3] add botond daily --- botond_daily.sh | 2 ++ changelog.txt | 2 ++ common/config/params.php | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 botond_daily.sh diff --git a/botond_daily.sh b/botond_daily.sh new file mode 100644 index 0000000..f2e0bd8 --- /dev/null +++ b/botond_daily.sh @@ -0,0 +1,2 @@ + +php /var/www/virtual/fitnessadmin.hu/htdocs/fitness-web/yii ticket/index \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index a3f0875..86e9b1e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,5 @@ +-0.0.62 + - add botond daily -0.0.61 - add user status edit -0.0.60 diff --git a/common/config/params.php b/common/config/params.php index 1e032ec..3c3bad0 100644 --- a/common/config/params.php +++ b/common/config/params.php @@ -4,7 +4,7 @@ return [ 'supportEmail' => 'rocho02@gmail.com', 'infoEmail' => 'info@rocho-net.hu', 'user.passwordResetTokenExpire' => 3600, - 'version' => 'v0.0.61', + 'version' => 'v0.0.62', 'company' => 'movar',//gyor 'company_name' => "Freimann Kft.", 'product_visiblity' => 'account',// on reception which products to display. account or global