implement registration in backend
This commit is contained in:
@@ -5,15 +5,13 @@ namespace backend\controllers;
|
||||
use Yii;
|
||||
use common\models\TicketType;
|
||||
use backend\models\TicketTypeSearch;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
use yii\filters\VerbFilter;
|
||||
use common\models\Account;
|
||||
|
||||
/**
|
||||
* TicketTypeController implements the CRUD actions for TicketType model.
|
||||
*/
|
||||
class TicketTypeController extends \backend\controllers\BackendController
|
||||
class TicketTypeController extends BackendController
|
||||
{
|
||||
|
||||
|
||||
@@ -60,6 +58,7 @@ class TicketTypeController extends \backend\controllers\BackendController
|
||||
* Displays a single TicketType model.
|
||||
* @param integer $id
|
||||
* @return mixed
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public function actionView($id)
|
||||
{
|
||||
@@ -82,6 +81,7 @@ class TicketTypeController extends \backend\controllers\BackendController
|
||||
$model->time_unit_type = TicketType::TIME_UNIT_MONTH;
|
||||
$model->time_unit_count = 1;
|
||||
$model->max_usage_count = 0;
|
||||
$model->max_reservation_count = 0;
|
||||
$accounts = Account::find()->andWhere(['status' => Account::STATUS_ACTIVE])->all();
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
@@ -99,6 +99,7 @@ class TicketTypeController extends \backend\controllers\BackendController
|
||||
* If update is successful, the browser will be redirected to the 'view' page.
|
||||
* @param integer $id
|
||||
* @return mixed
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public function actionUpdate($id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user