implement registration in backend

This commit is contained in:
Roland Schneider
2018-12-30 23:04:06 +01:00
parent b2bb210cee
commit e3b6bc08a7
32 changed files with 794 additions and 276 deletions

View File

@@ -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)
{