diff --git a/frontend/components/FrontendMenuStructure.php b/frontend/components/FrontendMenuStructure.php index e4bef95..058b36e 100644 --- a/frontend/components/FrontendMenuStructure.php +++ b/frontend/components/FrontendMenuStructure.php @@ -26,24 +26,7 @@ class FrontendMenuStructure{ protected function addUserMainMenu(){ - - $userMainMenu = null; - $items = []; - - - $items[] = ['label' => 'Vendégek', 'url' => ['/customer/main'] ]; - - if ( count($items) > 0 ){ - $userMainMenu = ['label' => 'Beállítások', 'url' => null, - 'items' => $items - ]; - } - - if ( isset($userMainMenu)){ - $this->menuItems[] = $userMainMenu; - } - - + $this->menuItems[] = ['label' => 'Recepcio', 'url' => ['/customer/reception'] ]; } diff --git a/frontend/controllers/CustomerController.php b/frontend/controllers/CustomerController.php index 8f156ee..e013318 100644 --- a/frontend/controllers/CustomerController.php +++ b/frontend/controllers/CustomerController.php @@ -4,10 +4,12 @@ namespace frontend\controllers; use Yii; use common\models\Customer; +use frontend\models\ReceptionForm; use frontend\models\CustomerSearch; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; +use yii\base\Object; /** * CustomerController implements the CRUD actions for Customer model. @@ -29,12 +31,21 @@ class CustomerController extends Controller ]; } - public function actionMain(){ + public function actionReception(){ + + $model = new ReceptionForm(); + + if ($model->load(Yii::$app->request->post()) && $model->validate()) { + +// return $this->redirect(['view', 'id' => $model->id_customer]); + } - return $this->render('main',[]); + return $this->render('reception',['model' => $model]); } + + /** * Lists all Customer models. * @return mixed diff --git a/frontend/models/ReceptionForm.php b/frontend/models/ReceptionForm.php new file mode 100644 index 0000000..47b14f9 --- /dev/null +++ b/frontend/models/ReceptionForm.php @@ -0,0 +1,36 @@ + 'Verification Code', + ]; + } + +} diff --git a/frontend/views/customer/_form_reception.php b/frontend/views/customer/_form_reception.php new file mode 100644 index 0000000..524904b --- /dev/null +++ b/frontend/views/customer/_form_reception.php @@ -0,0 +1,66 @@ + + + + +