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; ?> - field($model, 'mail', ['enableLabel' => false])->textInput(['autofocus' => true, 'placeholder' => $model->getAttributeLabel('mail')]) ?> + field($model, 'mail', ['enableLabel' => false, 'options' => ['class' => 'mb-2']])->textInput(['autofocus' => true, 'placeholder' => $model->getAttributeLabel('mail')]) ?> field($model, 'pswd', ['enableLabel' => false])->passwordInput(['placeholder' => $model->getAttributeLabel('pswd')]) ?>
diff --git a/mirzaev/skillparts/system/views/profile/index.php b/mirzaev/skillparts/system/views/profile/index.php index ebfddc5..96ac545 100644 --- a/mirzaev/skillparts/system/views/profile/index.php +++ b/mirzaev/skillparts/system/views/profile/index.php @@ -1,16 +1,16 @@
diff --git a/mirzaev/skillparts/system/views/profile/supplies.php b/mirzaev/skillparts/system/views/profile/supplies.php index 497acb5..d254f52 100644 --- a/mirzaev/skillparts/system/views/profile/supplies.php +++ b/mirzaev/skillparts/system/views/profile/supplies.php @@ -13,7 +13,7 @@ use app\models\Supply;