Fix customer backend forms , fix site\index
backend create\update customer forms must display the same as the frontend forms site\index action should be friendly and related to this app
This commit is contained in:
@@ -75,7 +75,12 @@ class CardController extends \backend\controllers\BackendController
|
||||
$model->status = Card::STATUS_ACTIVE;
|
||||
$model->type = Card::TYPE_RFID;
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['view', 'id' => $model->id_card]);
|
||||
\Yii::$app->session->setFlash( 'success','Card created!' );
|
||||
if ( isset($_POST['create_next'])){
|
||||
return $this->redirect(['create' ]);
|
||||
}else{
|
||||
return $this->redirect(['view', 'id' => $model->id_card]);
|
||||
}
|
||||
} else {
|
||||
return $this->render('create', [
|
||||
'model' => $model,
|
||||
|
||||
Reference in New Issue
Block a user