diff --git a/mirzaev/skillparts/system/controllers/AuthenticationController.php b/mirzaev/skillparts/system/controllers/AuthenticationController.php index e0987ac..fa94f4f 100644 --- a/mirzaev/skillparts/system/controllers/AuthenticationController.php +++ b/mirzaev/skillparts/system/controllers/AuthenticationController.php @@ -2,11 +2,15 @@ namespace app\controllers; +use app\models\AccountForm; + use Yii; use yii\web\Controller; use yii\web\Response; use yii\filters\AccessControl; -use app\models\AccountForm; + +use Throwable; +use Exception; class AuthenticationController extends Controller { @@ -54,7 +58,19 @@ class AuthenticationController extends Controller // Запись ответа $return['redirect'] = '/' . $cookies['redirect']; - $return['main'] = $this->renderPartial($return['redirect'] . '/index'); + + try { + if (empty($return['main'] = $this->renderPartial($return['redirect']))) { + throw new Exception('Представление найдено, но вернуло пустой результат'); + } + } catch (Throwable $t) { + $return['main'] = $this->renderPartial($return['redirect'] . '/index'); + } + + // Генерация и запись + // $controller = 'app\\controllers\\' . ucfirst($cookies['redirect']) . 'Controller'; + // $action = 'action' . ucfirst($cookies['redirect_action']); + // $return['main'] = (new $controller())->$action(); // Очистка cookie unset(Yii::$app->response->cookies['redirect']); diff --git a/mirzaev/skillparts/system/models/Supply.php b/mirzaev/skillparts/system/models/Supply.php index 3882a26..39ddb37 100644 --- a/mirzaev/skillparts/system/models/Supply.php +++ b/mirzaev/skillparts/system/models/Supply.php @@ -6,15 +6,12 @@ namespace app\models; use Yii; -use app\models\Account; use app\models\Product; use app\models\SupplyEdgeProduct; use app\models\traits\Xml2Array; use carono\exchange1c\interfaces\ProductInterface; -use mirzaev\yii2\arangodb\Query; - /** * Поставка (выгрузка товаров от поставщиков) * diff --git a/mirzaev/skillparts/system/views/account.php b/mirzaev/skillparts/system/views/account.php index 9dcc74b..b072564 100644 --- a/mirzaev/skillparts/system/views/account.php +++ b/mirzaev/skillparts/system/views/account.php @@ -28,7 +28,7 @@ use app\models\AccountForm; $model = $model ?? new AccountForm; ?> - = $form->field($model, 'mail', ['enableLabel' => false])->textInput(['autofocus' => true, 'placeholder' => $model->getAttributeLabel('mail')]) ?> + = $form->field($model, 'mail', ['enableLabel' => false, 'options' => ['class' => 'mb-2']])->textInput(['autofocus' => true, 'placeholder' => $model->getAttributeLabel('mail')]) ?> = $form->field($model, 'pswd', ['enableLabel' => false])->passwordInput(['placeholder' => $model->getAttributeLabel('pswd')]) ?>