auth email api
This commit is contained in:
@ -135,6 +135,13 @@ class ModuleShopClientController extends AdminController
|
||||
'subject' => "Код авторизации",
|
||||
"from_name" => $_ENV['APP_NAME']
|
||||
]);
|
||||
|
||||
$this->cgView->render('enter_code.php', ['email' => $address]);
|
||||
}
|
||||
|
||||
public function actionCodeCheck(): void
|
||||
{
|
||||
Debug::dd(123);
|
||||
}
|
||||
|
||||
}
|
@ -16,6 +16,7 @@ App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){
|
||||
App::$collector->get('/delete', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionDelete']);
|
||||
App::$collector->get('/update', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionUpdate']);
|
||||
App::$collector->post('/auth', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionAuth']);
|
||||
App::$collector->post('/code_check', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionCodeCheck']);
|
||||
});
|
||||
});
|
||||
});
|
36
kernel/modules/module_shop_client/views/enter_code.php
Normal file
36
kernel/modules/module_shop_client/views/enter_code.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $email
|
||||
*/
|
||||
use itguild\forms\ActiveForm;
|
||||
|
||||
\kernel\widgets\ModuleTabsWidget::create()->run();
|
||||
|
||||
echo \kernel\helpers\Html::h(2, "Введите код подтверждения отправленный на почту \"$email\"");
|
||||
|
||||
$form = new ActiveForm();
|
||||
$form->beginForm("/admin/module_shop_client/code_check/");
|
||||
|
||||
$form->field(\itguild\forms\inputs\TextInput::class, 'code', [
|
||||
'class' => "form-control",
|
||||
'placeholder' => 'Код',
|
||||
])
|
||||
->setLabel("Код")
|
||||
->render();
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<?php
|
||||
$form->field(\itguild\forms\inputs\Button::class, name: "btn-submit", params: [
|
||||
'class' => "btn btn-primary ",
|
||||
'value' => 'Отправить',
|
||||
'typeInput' => 'submit'
|
||||
])
|
||||
->render();
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
$form->endForm();
|
Reference in New Issue
Block a user