Finish version/v.0.0.15
This commit is contained in:
commit
4b0d891e46
@ -99,7 +99,8 @@ class CardController extends \backend\controllers\BackendController
|
||||
$model = $this->findModel($id);
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['view', 'id' => $model->id_card]);
|
||||
return $this->redirect(['index']);
|
||||
// return $this->redirect(Yii::$app->request->referrer);
|
||||
} else {
|
||||
return $this->render('update', [
|
||||
'model' => $model,
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
-0.0.15
|
||||
- backend on card saving replace ö to 0
|
||||
- backend on card saving redirect to index
|
||||
-0.0.14
|
||||
- add hidden account
|
||||
- add cart payout/delete per row
|
||||
|
||||
@ -43,7 +43,8 @@ class Card extends \common\models\BaseFitnessActiveRecord
|
||||
[['status', 'type'], 'integer'],
|
||||
[['number'], 'string', 'max' => 20],
|
||||
[['rfid_key'], 'string', 'max' => 25],
|
||||
[['number'], 'unique' ]
|
||||
[['number'], 'unique' ],
|
||||
[['rfid_key','number'] , 'validateAscii']
|
||||
];
|
||||
}
|
||||
|
||||
@ -64,6 +65,12 @@ class Card extends \common\models\BaseFitnessActiveRecord
|
||||
}
|
||||
|
||||
|
||||
public function validateAscii($attribute,$params){
|
||||
if ( !$this->hasErrors($this->$attribute)){
|
||||
$this->$attribute = str_replace("ö", "0", $this->$attribute);
|
||||
}
|
||||
}
|
||||
|
||||
static function statuses() {
|
||||
return [
|
||||
self::STATUS_ACTIVE => Yii::t('common/card', 'Active'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user