Commit f5b3baf11106a72ab5b554bf731fd002f49ea50e
1 parent
207522e8
access in admin
Showing
44 changed files
with
893 additions
and
179 deletions
Show diff stats
backend/controllers/AccountsController.php
| @@ -8,28 +8,45 @@ use common\models\DicCities; | @@ -8,28 +8,45 @@ use common\models\DicCities; | ||
| 8 | use Yii; | 8 | use Yii; |
| 9 | use common\models\Accounts; | 9 | use common\models\Accounts; |
| 10 | use common\models\AccountsSearch; | 10 | use common\models\AccountsSearch; |
| 11 | + | ||
| 11 | use yii\web\Controller; | 12 | use yii\web\Controller; |
| 12 | use yii\web\NotFoundHttpException; | 13 | use yii\web\NotFoundHttpException; |
| 13 | use yii\filters\VerbFilter; | 14 | use yii\filters\VerbFilter; |
| 14 | - | 15 | +use yii\filters\AccessControl; |
| 15 | /** | 16 | /** |
| 16 | * AccountsController implements the CRUD actions for Accounts model. | 17 | * AccountsController implements the CRUD actions for Accounts model. |
| 17 | */ | 18 | */ |
| 18 | class AccountsController extends Controller | 19 | class AccountsController extends Controller |
| 19 | { | 20 | { |
| 20 | public $layout = "/column"; | 21 | public $layout = "/column"; |
| 22 | + /** | ||
| 23 | + * @inheritdoc | ||
| 24 | + */ | ||
| 21 | public function behaviors() | 25 | public function behaviors() |
| 22 | { | 26 | { |
| 23 | return [ | 27 | return [ |
| 28 | + 'access' => [ | ||
| 29 | + 'class' => AccessControl::className(), | ||
| 30 | + 'rules' => [ | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 33 | + 'allow' => true, | ||
| 34 | + ], | ||
| 35 | + [ | ||
| 36 | + 'actions' => ['logout', 'index'], | ||
| 37 | + 'allow' => true, | ||
| 38 | + 'roles' => ['@'], | ||
| 39 | + ], | ||
| 40 | + ], | ||
| 41 | + ], | ||
| 24 | 'verbs' => [ | 42 | 'verbs' => [ |
| 25 | 'class' => VerbFilter::className(), | 43 | 'class' => VerbFilter::className(), |
| 26 | 'actions' => [ | 44 | 'actions' => [ |
| 27 | - 'delete' => ['post'], | 45 | + 'logout' => ['post'], |
| 28 | ], | 46 | ], |
| 29 | ], | 47 | ], |
| 30 | ]; | 48 | ]; |
| 31 | } | 49 | } |
| 32 | - | ||
| 33 | /** | 50 | /** |
| 34 | * Lists all Accounts models. | 51 | * Lists all Accounts models. |
| 35 | * @return mixed | 52 | * @return mixed |
backend/controllers/AccountsVinController.php
| @@ -8,19 +8,37 @@ use common\models\AccountsVinSearch; | @@ -8,19 +8,37 @@ use common\models\AccountsVinSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * AccountsVinController implements the CRUD actions for AccountsVin model. | 14 | * AccountsVinController implements the CRUD actions for AccountsVin model. |
| 14 | */ | 15 | */ |
| 15 | class AccountsVinController extends Controller | 16 | class AccountsVinController extends Controller |
| 16 | { public $layout = "/column"; | 17 | { public $layout = "/column"; |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
backend/controllers/ArtHistoryController.php
| @@ -8,6 +8,7 @@ use common\models\ArtHistorySearch; | @@ -8,6 +8,7 @@ use common\models\ArtHistorySearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * ArtHistoryController implements the CRUD actions for ArtHistory model. | 14 | * ArtHistoryController implements the CRUD actions for ArtHistory model. |
| @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | ||
| 15 | class ArtHistoryController extends Controller | 16 | class ArtHistoryController extends Controller |
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 18 | public function behaviors() | 22 | public function behaviors() |
| 19 | { | 23 | { |
| 20 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 21 | 'verbs' => [ | 39 | 'verbs' => [ |
| 22 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 23 | 'actions' => [ | 41 | 'actions' => [ |
| 24 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 25 | ], | 43 | ], |
| 26 | ], | 44 | ], |
| 27 | ]; | 45 | ]; |
backend/controllers/BrandsController.php
| @@ -8,6 +8,7 @@ use common\models\BrandsSearch; | @@ -8,6 +8,7 @@ use common\models\BrandsSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * BrandsController implements the CRUD actions for Brands model. | 14 | * BrandsController implements the CRUD actions for Brands model. |
| @@ -16,13 +17,30 @@ class BrandsController extends Controller | @@ -16,13 +17,30 @@ class BrandsController extends Controller | ||
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 18 | 19 | ||
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
backend/controllers/BrandsReplaceController.php
| @@ -8,6 +8,7 @@ use common\models\BrandsReplaceSearch; | @@ -8,6 +8,7 @@ use common\models\BrandsReplaceSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * BrandsReplaceController implements the CRUD actions for BrandsReplace model. | 14 | * BrandsReplaceController implements the CRUD actions for BrandsReplace model. |
| @@ -16,13 +17,30 @@ class BrandsReplaceController extends Controller | @@ -16,13 +17,30 @@ class BrandsReplaceController extends Controller | ||
| 16 | { | 17 | { |
| 17 | 18 | ||
| 18 | public $layout = "/column"; | 19 | public $layout = "/column"; |
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
backend/controllers/CartController.php
| @@ -8,6 +8,7 @@ use common\models\CartBillsSearch; | @@ -8,6 +8,7 @@ use common\models\CartBillsSearch; | ||
| 8 | use backend\components\base\BaseController; | 8 | use backend\components\base\BaseController; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * CartController implements the CRUD actions for CartBills model. | 14 | * CartController implements the CRUD actions for CartBills model. |
| @@ -15,7 +16,34 @@ use yii\filters\VerbFilter; | @@ -15,7 +16,34 @@ use yii\filters\VerbFilter; | ||
| 15 | class CartController extends BaseController | 16 | class CartController extends BaseController |
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 18 | - | 19 | + /** |
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 22 | + public function behaviors() | ||
| 23 | + { | ||
| 24 | + return [ | ||
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + 'verbs' => [ | ||
| 40 | + 'class' => VerbFilter::className(), | ||
| 41 | + 'actions' => [ | ||
| 42 | + 'logout' => ['post'], | ||
| 43 | + ], | ||
| 44 | + ], | ||
| 45 | + ]; | ||
| 46 | + } | ||
| 19 | /** | 47 | /** |
| 20 | * Lists all CartBills models. | 48 | * Lists all CartBills models. |
| 21 | * @return mixed | 49 | * @return mixed |
backend/controllers/CatController.php
| @@ -8,24 +8,41 @@ use common\models\CatSearch; | @@ -8,24 +8,41 @@ use common\models\CatSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * CatController implements the CRUD actions for Cat model. | 14 | * CatController implements the CRUD actions for Cat model. |
| 14 | */ | 15 | */ |
| 15 | class CatController extends Controller | 16 | class CatController extends Controller |
| 16 | { | 17 | { |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
| 27 | } | 45 | } |
| 28 | - | ||
| 29 | /** | 46 | /** |
| 30 | * Lists all Cat models. | 47 | * Lists all Cat models. |
| 31 | * @return mixed | 48 | * @return mixed |
backend/controllers/CrossingUploadController.php
| @@ -10,6 +10,7 @@ namespace backend\controllers; | @@ -10,6 +10,7 @@ namespace backend\controllers; | ||
| 10 | 10 | ||
| 11 | use backend\components\base\BaseController; | 11 | use backend\components\base\BaseController; |
| 12 | use common\components\CustomVarDamp; | 12 | use common\components\CustomVarDamp; |
| 13 | +use yii\filters\VerbFilter; | ||
| 13 | use yii\filters\AccessControl; | 14 | use yii\filters\AccessControl; |
| 14 | use backend\models\UploadFileCrossingForm; | 15 | use backend\models\UploadFileCrossingForm; |
| 15 | use backend\models\DetailsCrosses; | 16 | use backend\models\DetailsCrosses; |
| @@ -20,31 +21,35 @@ class CrossingUploadController extends BaseController | @@ -20,31 +21,35 @@ class CrossingUploadController extends BaseController | ||
| 20 | { | 21 | { |
| 21 | public $layout = "/column"; | 22 | public $layout = "/column"; |
| 22 | 23 | ||
| 23 | - /** | ||
| 24 | - * @inheritdoc | ||
| 25 | - */ | ||
| 26 | - public function behaviors() | 24 | + |
| 25 | + /** | ||
| 26 | + * @inheritdoc | ||
| 27 | + */ | ||
| 28 | + public function behaviors() | ||
| 27 | { | 29 | { |
| 28 | return [ | 30 | return [ |
| 29 | 'access' => [ | 31 | 'access' => [ |
| 30 | 'class' => AccessControl::className(), | 32 | 'class' => AccessControl::className(), |
| 31 | 'rules' => [ | 33 | 'rules' => [ |
| 32 | [ | 34 | [ |
| 33 | - 'actions' => ['index', 'result'], | 35 | + 'actions' => ['login', 'error', 'download-photo','delete-image','result' ], |
| 36 | + 'allow' => true, | ||
| 37 | + ], | ||
| 38 | + [ | ||
| 39 | + 'actions' => ['logout', 'index'], | ||
| 34 | 'allow' => true, | 40 | 'allow' => true, |
| 35 | 'roles' => ['@'], | 41 | 'roles' => ['@'], |
| 36 | ], | 42 | ], |
| 37 | ], | 43 | ], |
| 38 | ], | 44 | ], |
| 39 | -// 'verbs' => [ | ||
| 40 | -// 'class' => VerbFilter::className(), | ||
| 41 | -// 'actions' => [ | ||
| 42 | -// 'logout' => ['post'], | ||
| 43 | -// ], | ||
| 44 | -// ], | 45 | + 'verbs' => [ |
| 46 | + 'class' => VerbFilter::className(), | ||
| 47 | + 'actions' => [ | ||
| 48 | + 'logout' => ['post'], | ||
| 49 | + ], | ||
| 50 | + ], | ||
| 45 | ]; | 51 | ]; |
| 46 | } | 52 | } |
| 47 | - | ||
| 48 | /** | 53 | /** |
| 49 | * @inheritdoc | 54 | * @inheritdoc |
| 50 | */ | 55 | */ |
backend/controllers/CurrencyController.php
| @@ -8,6 +8,7 @@ use common\models\CurrencySearch; | @@ -8,6 +8,7 @@ use common\models\CurrencySearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * CurrencyController implements the CRUD actions for Currency model. | 14 | * CurrencyController implements the CRUD actions for Currency model. |
| @@ -15,18 +16,34 @@ use yii\filters\VerbFilter; | @@ -15,18 +16,34 @@ use yii\filters\VerbFilter; | ||
| 15 | class CurrencyController extends Controller | 16 | class CurrencyController extends Controller |
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 18 | public function behaviors() | 22 | public function behaviors() |
| 19 | { | 23 | { |
| 20 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 21 | 'verbs' => [ | 39 | 'verbs' => [ |
| 22 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 23 | 'actions' => [ | 41 | 'actions' => [ |
| 24 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 25 | ], | 43 | ], |
| 26 | ], | 44 | ], |
| 27 | ]; | 45 | ]; |
| 28 | } | 46 | } |
| 29 | - | ||
| 30 | /** | 47 | /** |
| 31 | * Lists all Currency models. | 48 | * Lists all Currency models. |
| 32 | * @return mixed | 49 | * @return mixed |
backend/controllers/DeliveriesController.php
| @@ -8,6 +8,7 @@ use common\models\DeliveriesSearch; | @@ -8,6 +8,7 @@ use common\models\DeliveriesSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * DeliveriesController implements the CRUD actions for Deliveries model. | 14 | * DeliveriesController implements the CRUD actions for Deliveries model. |
| @@ -16,13 +17,30 @@ class DeliveriesController extends Controller | @@ -16,13 +17,30 @@ class DeliveriesController extends Controller | ||
| 16 | { | 17 | { |
| 17 | 18 | ||
| 18 | public $layout = "/column"; | 19 | public $layout = "/column"; |
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
backend/controllers/DetailsController.php
| @@ -8,6 +8,7 @@ use common\models\DetailsSearch; | @@ -8,6 +8,7 @@ use common\models\DetailsSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * DetailsController implements the CRUD actions for Details model. | 14 | * DetailsController implements the CRUD actions for Details model. |
| @@ -16,13 +17,30 @@ class DetailsController extends Controller | @@ -16,13 +17,30 @@ class DetailsController extends Controller | ||
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 18 | 19 | ||
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
backend/controllers/DetailsCrossesController.php
| @@ -8,6 +8,7 @@ use common\models\DetailsCrossesSearch; | @@ -8,6 +8,7 @@ use common\models\DetailsCrossesSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * DetailsCrossesController implements the CRUD actions for DetailsCrosses model. | 14 | * DetailsCrossesController implements the CRUD actions for DetailsCrosses model. |
| @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | ||
| 15 | class DetailsCrossesController extends Controller | 16 | class DetailsCrossesController extends Controller |
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 18 | public function behaviors() | 22 | public function behaviors() |
| 19 | { | 23 | { |
| 20 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 21 | 'verbs' => [ | 39 | 'verbs' => [ |
| 22 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 23 | 'actions' => [ | 41 | 'actions' => [ |
| 24 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 25 | ], | 43 | ], |
| 26 | ], | 44 | ], |
| 27 | ]; | 45 | ]; |
backend/controllers/DetailsDescriptionController.php
| @@ -11,6 +11,7 @@ use yii\data\ActiveDataProvider; | @@ -11,6 +11,7 @@ use yii\data\ActiveDataProvider; | ||
| 11 | use yii\web\HttpException; | 11 | use yii\web\HttpException; |
| 12 | use yii\web\NotFoundHttpException; | 12 | use yii\web\NotFoundHttpException; |
| 13 | use yii\filters\VerbFilter; | 13 | use yii\filters\VerbFilter; |
| 14 | +use yii\filters\AccessControl; | ||
| 14 | 15 | ||
| 15 | /** | 16 | /** |
| 16 | * DetailsDescriptionController implements the CRUD actions for DetailsDescription model. | 17 | * DetailsDescriptionController implements the CRUD actions for DetailsDescription model. |
| @@ -19,13 +20,30 @@ class DetailsDescriptionController extends BaseController | @@ -19,13 +20,30 @@ class DetailsDescriptionController extends BaseController | ||
| 19 | { | 20 | { |
| 20 | public $layout = "/column"; | 21 | public $layout = "/column"; |
| 21 | 22 | ||
| 23 | + /** | ||
| 24 | + * @inheritdoc | ||
| 25 | + */ | ||
| 22 | public function behaviors() | 26 | public function behaviors() |
| 23 | { | 27 | { |
| 24 | return [ | 28 | return [ |
| 29 | + 'access' => [ | ||
| 30 | + 'class' => AccessControl::className(), | ||
| 31 | + 'rules' => [ | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 34 | + 'allow' => true, | ||
| 35 | + ], | ||
| 36 | + [ | ||
| 37 | + 'actions' => ['logout', 'index'], | ||
| 38 | + 'allow' => true, | ||
| 39 | + 'roles' => ['@'], | ||
| 40 | + ], | ||
| 41 | + ], | ||
| 42 | + ], | ||
| 25 | 'verbs' => [ | 43 | 'verbs' => [ |
| 26 | 'class' => VerbFilter::className(), | 44 | 'class' => VerbFilter::className(), |
| 27 | 'actions' => [ | 45 | 'actions' => [ |
| 28 | - 'delete' => ['post'], | 46 | + 'logout' => ['post'], |
| 29 | ], | 47 | ], |
| 30 | ], | 48 | ], |
| 31 | ]; | 49 | ]; |
backend/controllers/DicStatusesController.php
| @@ -8,6 +8,7 @@ use common\models\DicStatusesSearch; | @@ -8,6 +8,7 @@ use common\models\DicStatusesSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * DicStatusesController implements the CRUD actions for DicStatuses model. | 14 | * DicStatusesController implements the CRUD actions for DicStatuses model. |
| @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | ||
| 15 | class DicStatusesController extends Controller | 16 | class DicStatusesController extends Controller |
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 18 | public function behaviors() | 22 | public function behaviors() |
| 19 | { | 23 | { |
| 20 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 21 | 'verbs' => [ | 39 | 'verbs' => [ |
| 22 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 23 | 'actions' => [ | 41 | 'actions' => [ |
| 24 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 25 | ], | 43 | ], |
| 26 | ], | 44 | ], |
| 27 | ]; | 45 | ]; |
backend/controllers/EmailsController.php
| @@ -8,19 +8,37 @@ use common\models\EmailsSearch; | @@ -8,19 +8,37 @@ use common\models\EmailsSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * EmailsController implements the CRUD actions for Emails model. | 14 | * EmailsController implements the CRUD actions for Emails model. |
| 14 | */ | 15 | */ |
| 15 | class EmailsController extends Controller | 16 | class EmailsController extends Controller |
| 16 | { | 17 | { |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
backend/controllers/ImportersController.php
| @@ -8,6 +8,7 @@ use backend\models\ImportersSearch; | @@ -8,6 +8,7 @@ use backend\models\ImportersSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * ImportersController implements the CRUD actions for Importers model. | 14 | * ImportersController implements the CRUD actions for Importers model. |
| @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | ||
| 15 | class ImportersController extends Controller | 16 | class ImportersController extends Controller |
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 18 | public function behaviors() | 22 | public function behaviors() |
| 19 | { | 23 | { |
| 20 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 21 | 'verbs' => [ | 39 | 'verbs' => [ |
| 22 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 23 | 'actions' => [ | 41 | 'actions' => [ |
| 24 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 25 | ], | 43 | ], |
| 26 | ], | 44 | ], |
| 27 | ]; | 45 | ]; |
backend/controllers/ImportersPrefixController.php
| @@ -8,6 +8,7 @@ use backend\models\ImportersPrefixSearch; | @@ -8,6 +8,7 @@ use backend\models\ImportersPrefixSearch; | ||
| 8 | use backend\components\base\BaseController; | 8 | use backend\components\base\BaseController; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * ImportersPrefixController implements the CRUD actions for ImportersPrefix model. | 14 | * ImportersPrefixController implements the CRUD actions for ImportersPrefix model. |
| @@ -15,14 +16,30 @@ use yii\filters\VerbFilter; | @@ -15,14 +16,30 @@ use yii\filters\VerbFilter; | ||
| 15 | class ImportersPrefixController extends BaseController | 16 | class ImportersPrefixController extends BaseController |
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 18 | - | 19 | + /** |
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 19 | public function behaviors() | 22 | public function behaviors() |
| 20 | { | 23 | { |
| 21 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 22 | 'verbs' => [ | 39 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 41 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 26 | ], | 43 | ], |
| 27 | ], | 44 | ], |
| 28 | ]; | 45 | ]; |
backend/controllers/ManufacturersController.php
| @@ -8,6 +8,7 @@ use common\models\ManufacturersSearch; | @@ -8,6 +8,7 @@ use common\models\ManufacturersSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * ManufacturersController implements the CRUD actions for Manufacturers model. | 14 | * ManufacturersController implements the CRUD actions for Manufacturers model. |
| @@ -16,18 +17,34 @@ class ManufacturersController extends Controller | @@ -16,18 +17,34 @@ class ManufacturersController extends Controller | ||
| 16 | { | 17 | { |
| 17 | 18 | ||
| 18 | public $layout = "/column"; | 19 | public $layout = "/column"; |
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
| 29 | } | 47 | } |
| 30 | - | ||
| 31 | /** | 48 | /** |
| 32 | * Lists all Manufacturers models. | 49 | * Lists all Manufacturers models. |
| 33 | * @return mixed | 50 | * @return mixed |
backend/controllers/MarginsController.php
| @@ -8,6 +8,7 @@ use common\models\MarginsSearch; | @@ -8,6 +8,7 @@ use common\models\MarginsSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * MarginsController implements the CRUD actions for Margins model. | 14 | * MarginsController implements the CRUD actions for Margins model. |
| @@ -16,13 +17,30 @@ class MarginsController extends Controller | @@ -16,13 +17,30 @@ class MarginsController extends Controller | ||
| 16 | { | 17 | { |
| 17 | 18 | ||
| 18 | public $layout = "/column"; | 19 | public $layout = "/column"; |
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
backend/controllers/MarginsGroupsController.php
| @@ -10,6 +10,7 @@ use common\models\MarginsGroupsSearch; | @@ -10,6 +10,7 @@ use common\models\MarginsGroupsSearch; | ||
| 10 | use yii\web\Controller; | 10 | use yii\web\Controller; |
| 11 | use yii\web\NotFoundHttpException; | 11 | use yii\web\NotFoundHttpException; |
| 12 | use yii\filters\VerbFilter; | 12 | use yii\filters\VerbFilter; |
| 13 | +use yii\filters\AccessControl; | ||
| 13 | 14 | ||
| 14 | /** | 15 | /** |
| 15 | * MarginsGroupsController implements the CRUD actions for MarginsGroups model. | 16 | * MarginsGroupsController implements the CRUD actions for MarginsGroups model. |
| @@ -18,13 +19,30 @@ class MarginsGroupsController extends Controller | @@ -18,13 +19,30 @@ class MarginsGroupsController extends Controller | ||
| 18 | { | 19 | { |
| 19 | 20 | ||
| 20 | public $layout = "/column"; | 21 | public $layout = "/column"; |
| 22 | + /** | ||
| 23 | + * @inheritdoc | ||
| 24 | + */ | ||
| 21 | public function behaviors() | 25 | public function behaviors() |
| 22 | { | 26 | { |
| 23 | return [ | 27 | return [ |
| 28 | + 'access' => [ | ||
| 29 | + 'class' => AccessControl::className(), | ||
| 30 | + 'rules' => [ | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 33 | + 'allow' => true, | ||
| 34 | + ], | ||
| 35 | + [ | ||
| 36 | + 'actions' => ['logout', 'index'], | ||
| 37 | + 'allow' => true, | ||
| 38 | + 'roles' => ['@'], | ||
| 39 | + ], | ||
| 40 | + ], | ||
| 41 | + ], | ||
| 24 | 'verbs' => [ | 42 | 'verbs' => [ |
| 25 | 'class' => VerbFilter::className(), | 43 | 'class' => VerbFilter::className(), |
| 26 | 'actions' => [ | 44 | 'actions' => [ |
| 27 | - 'delete' => ['post'], | 45 | + 'logout' => ['post'], |
| 28 | ], | 46 | ], |
| 29 | ], | 47 | ], |
| 30 | ]; | 48 | ]; |
backend/controllers/MarginsImportersController.php
| @@ -8,6 +8,7 @@ use common\models\MarginsImportersSearch; | @@ -8,6 +8,7 @@ use common\models\MarginsImportersSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | use backend\models\Importers; | 12 | use backend\models\Importers; |
| 12 | use common\models\Margins; | 13 | use common\models\Margins; |
| 13 | 14 | ||
| @@ -19,18 +20,34 @@ class MarginsImportersController extends Controller | @@ -19,18 +20,34 @@ class MarginsImportersController extends Controller | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | public $layout = "/column"; | 22 | public $layout = "/column"; |
| 23 | + /** | ||
| 24 | + * @inheritdoc | ||
| 25 | + */ | ||
| 22 | public function behaviors() | 26 | public function behaviors() |
| 23 | { | 27 | { |
| 24 | return [ | 28 | return [ |
| 29 | + 'access' => [ | ||
| 30 | + 'class' => AccessControl::className(), | ||
| 31 | + 'rules' => [ | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 34 | + 'allow' => true, | ||
| 35 | + ], | ||
| 36 | + [ | ||
| 37 | + 'actions' => ['logout', 'index'], | ||
| 38 | + 'allow' => true, | ||
| 39 | + 'roles' => ['@'], | ||
| 40 | + ], | ||
| 41 | + ], | ||
| 42 | + ], | ||
| 25 | 'verbs' => [ | 43 | 'verbs' => [ |
| 26 | 'class' => VerbFilter::className(), | 44 | 'class' => VerbFilter::className(), |
| 27 | 'actions' => [ | 45 | 'actions' => [ |
| 28 | - 'delete' => ['post'], | 46 | + 'logout' => ['post'], |
| 29 | ], | 47 | ], |
| 30 | ], | 48 | ], |
| 31 | ]; | 49 | ]; |
| 32 | } | 50 | } |
| 33 | - | ||
| 34 | /** | 51 | /** |
| 35 | * Lists all MarginsImporters models. | 52 | * Lists all MarginsImporters models. |
| 36 | * @return mixed | 53 | * @return mixed |
backend/controllers/MarginsImportersImportController.php
| @@ -10,6 +10,7 @@ use common\models\MarginsImportersImportSearch; | @@ -10,6 +10,7 @@ use common\models\MarginsImportersImportSearch; | ||
| 10 | use yii\web\Controller; | 10 | use yii\web\Controller; |
| 11 | use yii\web\NotFoundHttpException; | 11 | use yii\web\NotFoundHttpException; |
| 12 | use yii\filters\VerbFilter; | 12 | use yii\filters\VerbFilter; |
| 13 | +use yii\filters\AccessControl; | ||
| 13 | 14 | ||
| 14 | /** | 15 | /** |
| 15 | * MarginsImportersImportController implements the CRUD actions for MarginsImportersImport model. | 16 | * MarginsImportersImportController implements the CRUD actions for MarginsImportersImport model. |
| @@ -19,13 +20,30 @@ class MarginsImportersImportController extends Controller | @@ -19,13 +20,30 @@ class MarginsImportersImportController extends Controller | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | public $layout = "/column"; | 22 | public $layout = "/column"; |
| 23 | + /** | ||
| 24 | + * @inheritdoc | ||
| 25 | + */ | ||
| 22 | public function behaviors() | 26 | public function behaviors() |
| 23 | { | 27 | { |
| 24 | return [ | 28 | return [ |
| 29 | + 'access' => [ | ||
| 30 | + 'class' => AccessControl::className(), | ||
| 31 | + 'rules' => [ | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 34 | + 'allow' => true, | ||
| 35 | + ], | ||
| 36 | + [ | ||
| 37 | + 'actions' => ['logout', 'index'], | ||
| 38 | + 'allow' => true, | ||
| 39 | + 'roles' => ['@'], | ||
| 40 | + ], | ||
| 41 | + ], | ||
| 42 | + ], | ||
| 25 | 'verbs' => [ | 43 | 'verbs' => [ |
| 26 | 'class' => VerbFilter::className(), | 44 | 'class' => VerbFilter::className(), |
| 27 | 'actions' => [ | 45 | 'actions' => [ |
| 28 | - 'delete' => ['post'], | 46 | + 'logout' => ['post'], |
| 29 | ], | 47 | ], |
| 30 | ], | 48 | ], |
| 31 | ]; | 49 | ]; |
backend/controllers/NewsController.php
| @@ -10,6 +10,7 @@ use common\models\NewsSearch; | @@ -10,6 +10,7 @@ use common\models\NewsSearch; | ||
| 10 | use yii\web\Controller; | 10 | use yii\web\Controller; |
| 11 | use yii\web\NotFoundHttpException; | 11 | use yii\web\NotFoundHttpException; |
| 12 | use yii\filters\VerbFilter; | 12 | use yii\filters\VerbFilter; |
| 13 | +use yii\filters\AccessControl; | ||
| 13 | use yii\web\UploadedFile; | 14 | use yii\web\UploadedFile; |
| 14 | use backend\components\ImgResizer; | 15 | use backend\components\ImgResizer; |
| 15 | 16 | ||
| @@ -20,13 +21,30 @@ class NewsController extends Controller | @@ -20,13 +21,30 @@ class NewsController extends Controller | ||
| 20 | { | 21 | { |
| 21 | 22 | ||
| 22 | public $layout = "/column"; | 23 | public $layout = "/column"; |
| 24 | + /** | ||
| 25 | + * @inheritdoc | ||
| 26 | + */ | ||
| 23 | public function behaviors() | 27 | public function behaviors() |
| 24 | { | 28 | { |
| 25 | return [ | 29 | return [ |
| 30 | + 'access' => [ | ||
| 31 | + 'class' => AccessControl::className(), | ||
| 32 | + 'rules' => [ | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 35 | + 'allow' => true, | ||
| 36 | + ], | ||
| 37 | + [ | ||
| 38 | + 'actions' => ['logout', 'index'], | ||
| 39 | + 'allow' => true, | ||
| 40 | + 'roles' => ['@'], | ||
| 41 | + ], | ||
| 42 | + ], | ||
| 43 | + ], | ||
| 26 | 'verbs' => [ | 44 | 'verbs' => [ |
| 27 | 'class' => VerbFilter::className(), | 45 | 'class' => VerbFilter::className(), |
| 28 | 'actions' => [ | 46 | 'actions' => [ |
| 29 | - 'delete' => ['post'], | 47 | + 'logout' => ['post'], |
| 30 | ], | 48 | ], |
| 31 | ], | 49 | ], |
| 32 | ]; | 50 | ]; |
backend/controllers/OfficesController.php
| @@ -9,24 +9,41 @@ use common\models\OfficesSearch; | @@ -9,24 +9,41 @@ use common\models\OfficesSearch; | ||
| 9 | use yii\web\Controller; | 9 | use yii\web\Controller; |
| 10 | use yii\web\NotFoundHttpException; | 10 | use yii\web\NotFoundHttpException; |
| 11 | use yii\filters\VerbFilter; | 11 | use yii\filters\VerbFilter; |
| 12 | +use yii\filters\AccessControl; | ||
| 12 | 13 | ||
| 13 | /** | 14 | /** |
| 14 | * OfficesController implements the CRUD actions for Offices model. | 15 | * OfficesController implements the CRUD actions for Offices model. |
| 15 | */ | 16 | */ |
| 16 | class OfficesController extends Controller | 17 | class OfficesController extends Controller |
| 17 | { public $layout = "/column"; | 18 | { public $layout = "/column"; |
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 18 | public function behaviors() | 22 | public function behaviors() |
| 19 | { | 23 | { |
| 20 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 21 | 'verbs' => [ | 39 | 'verbs' => [ |
| 22 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 23 | 'actions' => [ | 41 | 'actions' => [ |
| 24 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 25 | ], | 43 | ], |
| 26 | ], | 44 | ], |
| 27 | ]; | 45 | ]; |
| 28 | } | 46 | } |
| 29 | - | ||
| 30 | /** | 47 | /** |
| 31 | * Lists all Offices models. | 48 | * Lists all Offices models. |
| 32 | * @return mixed | 49 | * @return mixed |
backend/controllers/PageController.php
| @@ -8,19 +8,37 @@ use common\models\PageSearch; | @@ -8,19 +8,37 @@ use common\models\PageSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * PageController implements the CRUD actions for Page model. | 14 | * PageController implements the CRUD actions for Page model. |
| 14 | */ | 15 | */ |
| 15 | class PageController extends Controller | 16 | class PageController extends Controller |
| 16 | { | 17 | { |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
backend/controllers/ParserController.php
| @@ -38,17 +38,22 @@ class ParserController extends BaseController | @@ -38,17 +38,22 @@ class ParserController extends BaseController | ||
| 38 | 'class' => AccessControl::className(), | 38 | 'class' => AccessControl::className(), |
| 39 | 'rules' => [ | 39 | 'rules' => [ |
| 40 | [ | 40 | [ |
| 41 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 42 | + 'allow' => true, | ||
| 43 | + ], | ||
| 44 | + [ | ||
| 45 | + 'actions' => ['logout', 'index'], | ||
| 41 | 'allow' => true, | 46 | 'allow' => true, |
| 42 | 'roles' => ['@'], | 47 | 'roles' => ['@'], |
| 43 | ], | 48 | ], |
| 44 | ], | 49 | ], |
| 45 | ], | 50 | ], |
| 46 | -// 'verbs' => [ | ||
| 47 | -// 'class' => VerbFilter::className(), | ||
| 48 | -// 'actions' => [ | ||
| 49 | -// 'logout' => ['post'], | ||
| 50 | -// ], | ||
| 51 | -// ], | 51 | + 'verbs' => [ |
| 52 | + 'class' => VerbFilter::className(), | ||
| 53 | + 'actions' => [ | ||
| 54 | + 'logout' => ['post'], | ||
| 55 | + ], | ||
| 56 | + ], | ||
| 52 | ]; | 57 | ]; |
| 53 | } | 58 | } |
| 54 | 59 |
backend/controllers/PartnersController.php
| @@ -8,24 +8,41 @@ use common\models\PartnersSearch; | @@ -8,24 +8,41 @@ use common\models\PartnersSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * PartnersController implements the CRUD actions for Partners model. | 14 | * PartnersController implements the CRUD actions for Partners model. |
| 14 | */ | 15 | */ |
| 15 | class PartnersController extends Controller | 16 | class PartnersController extends Controller |
| 16 | { | 17 | { |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
| 27 | } | 45 | } |
| 28 | - | ||
| 29 | /** | 46 | /** |
| 30 | * Lists all Partners models. | 47 | * Lists all Partners models. |
| 31 | * @return mixed | 48 | * @return mixed |
backend/controllers/PayMessagesController.php
| @@ -8,19 +8,37 @@ use common\models\PayMessagesSearch; | @@ -8,19 +8,37 @@ use common\models\PayMessagesSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * PayMessagesController implements the CRUD actions for PayMessages model. | 14 | * PayMessagesController implements the CRUD actions for PayMessages model. |
| 14 | */ | 15 | */ |
| 15 | class PayMessagesController extends Controller | 16 | class PayMessagesController extends Controller |
| 16 | { | 17 | { |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
backend/controllers/PriceMailingController.php
| @@ -8,19 +8,36 @@ use common\models\PriceMailingSearch; | @@ -8,19 +8,36 @@ use common\models\PriceMailingSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | - | 11 | +use yii\filters\AccessControl; |
| 12 | /** | 12 | /** |
| 13 | * PriceMailingController implements the CRUD actions for PriceMailing model. | 13 | * PriceMailingController implements the CRUD actions for PriceMailing model. |
| 14 | */ | 14 | */ |
| 15 | class PriceMailingController extends Controller | 15 | class PriceMailingController extends Controller |
| 16 | { | 16 | { |
| 17 | + /** | ||
| 18 | + * @inheritdoc | ||
| 19 | + */ | ||
| 17 | public function behaviors() | 20 | public function behaviors() |
| 18 | { | 21 | { |
| 19 | return [ | 22 | return [ |
| 23 | + 'access' => [ | ||
| 24 | + 'class' => AccessControl::className(), | ||
| 25 | + 'rules' => [ | ||
| 26 | + [ | ||
| 27 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 28 | + 'allow' => true, | ||
| 29 | + ], | ||
| 30 | + [ | ||
| 31 | + 'actions' => ['logout', 'index'], | ||
| 32 | + 'allow' => true, | ||
| 33 | + 'roles' => ['@'], | ||
| 34 | + ], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 20 | 'verbs' => [ | 37 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 38 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 39 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 40 | + 'logout' => ['post'], |
| 24 | ], | 41 | ], |
| 25 | ], | 42 | ], |
| 26 | ]; | 43 | ]; |
backend/controllers/RgGrupController.php
| @@ -14,6 +14,7 @@ use common\components\CustomVarDamp; | @@ -14,6 +14,7 @@ use common\components\CustomVarDamp; | ||
| 14 | use common\components\parsers\MailAttachmentsSaver; | 14 | use common\components\parsers\MailAttachmentsSaver; |
| 15 | use common\models\Margins; | 15 | use common\models\Margins; |
| 16 | use common\models\MarginsGroups; | 16 | use common\models\MarginsGroups; |
| 17 | +use yii\filters\VerbFilter; | ||
| 17 | use yii\filters\AccessControl; | 18 | use yii\filters\AccessControl; |
| 18 | use Yii; | 19 | use Yii; |
| 19 | use yii\web\UploadedFile; | 20 | use yii\web\UploadedFile; |
| @@ -35,17 +36,22 @@ class RgGrupController extends BaseController | @@ -35,17 +36,22 @@ class RgGrupController extends BaseController | ||
| 35 | 'class' => AccessControl::className(), | 36 | 'class' => AccessControl::className(), |
| 36 | 'rules' => [ | 37 | 'rules' => [ |
| 37 | [ | 38 | [ |
| 39 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 40 | + 'allow' => true, | ||
| 41 | + ], | ||
| 42 | + [ | ||
| 43 | + 'actions' => ['logout', 'index'], | ||
| 38 | 'allow' => true, | 44 | 'allow' => true, |
| 39 | 'roles' => ['@'], | 45 | 'roles' => ['@'], |
| 40 | ], | 46 | ], |
| 41 | ], | 47 | ], |
| 42 | ], | 48 | ], |
| 43 | -// 'verbs' => [ | ||
| 44 | -// 'class' => VerbFilter::className(), | ||
| 45 | -// 'actions' => [ | ||
| 46 | -// 'logout' => ['post'], | ||
| 47 | -// ], | ||
| 48 | -// ], | 49 | + 'verbs' => [ |
| 50 | + 'class' => VerbFilter::className(), | ||
| 51 | + 'actions' => [ | ||
| 52 | + 'logout' => ['post'], | ||
| 53 | + ], | ||
| 54 | + ], | ||
| 49 | ]; | 55 | ]; |
| 50 | } | 56 | } |
| 51 | 57 |
backend/controllers/SettingsMerchantsListController.php
| @@ -8,19 +8,37 @@ use common\models\SettingsMerchantsListSearch; | @@ -8,19 +8,37 @@ use common\models\SettingsMerchantsListSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * SettingsMerchantsListController implements the CRUD actions for SettingsMerchantsList model. | 14 | * SettingsMerchantsListController implements the CRUD actions for SettingsMerchantsList model. |
| 14 | */ | 15 | */ |
| 15 | class SettingsMerchantsListController extends Controller | 16 | class SettingsMerchantsListController extends Controller |
| 16 | { | 17 | { |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
backend/controllers/SiteController.php
| @@ -65,6 +65,7 @@ class SiteController extends BaseController | @@ -65,6 +65,7 @@ class SiteController extends BaseController | ||
| 65 | 65 | ||
| 66 | public function actionLogin() | 66 | public function actionLogin() |
| 67 | { | 67 | { |
| 68 | + $this->layout = '/none'; | ||
| 68 | if (!\Yii::$app->user->isGuest) { | 69 | if (!\Yii::$app->user->isGuest) { |
| 69 | return $this->goHome(); | 70 | return $this->goHome(); |
| 70 | } | 71 | } |
backend/controllers/SliderController.php
| @@ -8,24 +8,41 @@ use common\models\SliderSearch; | @@ -8,24 +8,41 @@ use common\models\SliderSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * SliderController implements the CRUD actions for Slider model. | 14 | * SliderController implements the CRUD actions for Slider model. |
| 14 | */ | 15 | */ |
| 15 | class SliderController extends Controller | 16 | class SliderController extends Controller |
| 16 | { | 17 | { |
| 18 | + /** | ||
| 19 | + * @inheritdoc | ||
| 20 | + */ | ||
| 17 | public function behaviors() | 21 | public function behaviors() |
| 18 | { | 22 | { |
| 19 | return [ | 23 | return [ |
| 24 | + 'access' => [ | ||
| 25 | + 'class' => AccessControl::className(), | ||
| 26 | + 'rules' => [ | ||
| 27 | + [ | ||
| 28 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 29 | + 'allow' => true, | ||
| 30 | + ], | ||
| 31 | + [ | ||
| 32 | + 'actions' => ['logout', 'index'], | ||
| 33 | + 'allow' => true, | ||
| 34 | + 'roles' => ['@'], | ||
| 35 | + ], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 20 | 'verbs' => [ | 38 | 'verbs' => [ |
| 21 | 'class' => VerbFilter::className(), | 39 | 'class' => VerbFilter::className(), |
| 22 | 'actions' => [ | 40 | 'actions' => [ |
| 23 | - 'delete' => ['post'], | 41 | + 'logout' => ['post'], |
| 24 | ], | 42 | ], |
| 25 | ], | 43 | ], |
| 26 | ]; | 44 | ]; |
| 27 | } | 45 | } |
| 28 | - | ||
| 29 | /** | 46 | /** |
| 30 | * Lists all Slider models. | 47 | * Lists all Slider models. |
| 31 | * @return mixed | 48 | * @return mixed |
backend/controllers/TeamController.php
| @@ -8,6 +8,7 @@ use common\models\TeamSearch; | @@ -8,6 +8,7 @@ use common\models\TeamSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * TeamController implements the CRUD actions for Team model. | 14 | * TeamController implements the CRUD actions for Team model. |
| @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | @@ -15,13 +16,30 @@ use yii\filters\VerbFilter; | ||
| 15 | class TeamController extends Controller | 16 | class TeamController extends Controller |
| 16 | { | 17 | { |
| 17 | public $layout = '/column'; | 18 | public $layout = '/column'; |
| 19 | + /** | ||
| 20 | + * @inheritdoc | ||
| 21 | + */ | ||
| 18 | public function behaviors() | 22 | public function behaviors() |
| 19 | { | 23 | { |
| 20 | return [ | 24 | return [ |
| 25 | + 'access' => [ | ||
| 26 | + 'class' => AccessControl::className(), | ||
| 27 | + 'rules' => [ | ||
| 28 | + [ | ||
| 29 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 30 | + 'allow' => true, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'actions' => ['logout', 'index'], | ||
| 34 | + 'allow' => true, | ||
| 35 | + 'roles' => ['@'], | ||
| 36 | + ], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 21 | 'verbs' => [ | 39 | 'verbs' => [ |
| 22 | 'class' => VerbFilter::className(), | 40 | 'class' => VerbFilter::className(), |
| 23 | 'actions' => [ | 41 | 'actions' => [ |
| 24 | - 'delete' => ['post'], | 42 | + 'logout' => ['post'], |
| 25 | ], | 43 | ], |
| 26 | ], | 44 | ], |
| 27 | ]; | 45 | ]; |
backend/controllers/TeamGroupController.php
| @@ -8,6 +8,7 @@ use common\models\TeamGroupSearch; | @@ -8,6 +8,7 @@ use common\models\TeamGroupSearch; | ||
| 8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
| 11 | +use yii\filters\AccessControl; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * TeamGroupController implements the CRUD actions for TeamGroup model. | 14 | * TeamGroupController implements the CRUD actions for TeamGroup model. |
| @@ -16,13 +17,30 @@ class TeamGroupController extends Controller | @@ -16,13 +17,30 @@ class TeamGroupController extends Controller | ||
| 16 | { | 17 | { |
| 17 | 18 | ||
| 18 | public $layout = '/column'; | 19 | public $layout = '/column'; |
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
backend/controllers/UserController.php
| @@ -5,6 +5,7 @@ namespace backend\controllers; | @@ -5,6 +5,7 @@ namespace backend\controllers; | ||
| 5 | use Yii; | 5 | use Yii; |
| 6 | use backend\models\User; | 6 | use backend\models\User; |
| 7 | use backend\models\UserSearch; | 7 | use backend\models\UserSearch; |
| 8 | +use yii\filters\AccessControl; | ||
| 8 | use yii\web\Controller; | 9 | use yii\web\Controller; |
| 9 | use yii\web\NotFoundHttpException; | 10 | use yii\web\NotFoundHttpException; |
| 10 | use yii\filters\VerbFilter; | 11 | use yii\filters\VerbFilter; |
| @@ -16,13 +17,30 @@ class UserController extends Controller | @@ -16,13 +17,30 @@ class UserController extends Controller | ||
| 16 | { | 17 | { |
| 17 | public $layout = "/column"; | 18 | public $layout = "/column"; |
| 18 | 19 | ||
| 20 | + /** | ||
| 21 | + * @inheritdoc | ||
| 22 | + */ | ||
| 19 | public function behaviors() | 23 | public function behaviors() |
| 20 | { | 24 | { |
| 21 | return [ | 25 | return [ |
| 26 | + 'access' => [ | ||
| 27 | + 'class' => AccessControl::className(), | ||
| 28 | + 'rules' => [ | ||
| 29 | + [ | ||
| 30 | + 'actions' => ['login', 'error', 'download-photo','delete-image' ], | ||
| 31 | + 'allow' => true, | ||
| 32 | + ], | ||
| 33 | + [ | ||
| 34 | + 'actions' => ['logout', 'index'], | ||
| 35 | + 'allow' => true, | ||
| 36 | + 'roles' => ['@'], | ||
| 37 | + ], | ||
| 38 | + ], | ||
| 39 | + ], | ||
| 22 | 'verbs' => [ | 40 | 'verbs' => [ |
| 23 | 'class' => VerbFilter::className(), | 41 | 'class' => VerbFilter::className(), |
| 24 | 'actions' => [ | 42 | 'actions' => [ |
| 25 | - 'delete' => ['post'], | 43 | + 'logout' => ['post'], |
| 26 | ], | 44 | ], |
| 27 | ], | 45 | ], |
| 28 | ]; | 46 | ]; |
backend/views/layouts/column.php
| @@ -320,7 +320,7 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -320,7 +320,7 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 320 | ['label' => 'Бренды', 'url' => ['brands/index']], | 320 | ['label' => 'Бренды', 'url' => ['brands/index']], |
| 321 | ['label' => 'Марки авто', 'url' => ['manufacturers/index']], | 321 | ['label' => 'Марки авто', 'url' => ['manufacturers/index']], |
| 322 | ['label' => 'Статусы заказов', 'url' => ['currency/index']], | 322 | ['label' => 'Статусы заказов', 'url' => ['currency/index']], |
| 323 | - ['label' => 'Типы доставок', 'url' => ['currency/index']], | 323 | + ['label' => 'Типы доставок', 'url' => ['deliveries/index']], |
| 324 | ['label' => 'Категории товаров', 'url' => ['currency/index']], | 324 | ['label' => 'Категории товаров', 'url' => ['currency/index']], |
| 325 | ['label' => 'Vin коды', 'url' => ['currency/index']], | 325 | ['label' => 'Vin коды', 'url' => ['currency/index']], |
| 326 | ['label' => 'Запросы по номеру', 'url' => ['currency/index']], | 326 | ['label' => 'Запросы по номеру', 'url' => ['currency/index']], |
common/models/Accounts.php
| @@ -48,6 +48,10 @@ use Yii; | @@ -48,6 +48,10 @@ use Yii; | ||
| 48 | class Accounts extends \yii\db\ActiveRecord | 48 | class Accounts extends \yii\db\ActiveRecord |
| 49 | { | 49 | { |
| 50 | 50 | ||
| 51 | + public $re_pass; | ||
| 52 | + public $surname; | ||
| 53 | + public $verifyCode; | ||
| 54 | + | ||
| 51 | /** | 55 | /** |
| 52 | * @inheritdoc | 56 | * @inheritdoc |
| 53 | */ | 57 | */ |
| @@ -71,16 +75,19 @@ class Accounts extends \yii\db\ActiveRecord | @@ -71,16 +75,19 @@ class Accounts extends \yii\db\ActiveRecord | ||
| 71 | { | 75 | { |
| 72 | return [ | 76 | return [ |
| 73 | [['if_manager', 'margin_id', 'country', 'city', 'rating', 'is_active', 'is_firm', 'office_id', 'is_scribe', 'set_manager_id', 'car', 'mod', 'deliveries', 'scode'], 'integer'], | 77 | [['if_manager', 'margin_id', 'country', 'city', 'rating', 'is_active', 'is_firm', 'office_id', 'is_scribe', 'set_manager_id', 'car', 'mod', 'deliveries', 'scode'], 'integer'], |
| 74 | - [['email', 'pass', 'name', 'phones', 'comment', 'dt', 'set_manager_id'], 'required'], | 78 | + [['company','email', 'pass', 'name','surname', 'phones', 'comment', 'dt', 'set_manager_id'], 'required'], |
| 75 | [['comment'], 'string'], | 79 | [['comment'], 'string'], |
| 76 | [['balance'], 'number'], | 80 | [['balance'], 'number'], |
| 77 | - [['email', 'name', 'firm_site'], 'string', 'max' => 150], | ||
| 78 | - [['pass'], 'string', 'max' => 30], | 81 | + [['email', 'name','surname', 'firm_site'], 'string', 'max' => 150], |
| 82 | + [['pass','re_pass'], 'string', 'max' => 30], | ||
| 79 | [['phones', 'phones2', 'phones3'], 'string', 'max' => 50], | 83 | [['phones', 'phones2', 'phones3'], 'string', 'max' => 50], |
| 80 | [['address', 'firm_inn', 'firm_bank'], 'string', 'max' => 254], | 84 | [['address', 'firm_inn', 'firm_bank'], 'string', 'max' => 254], |
| 81 | [['last_loginin'], 'string', 'max' => 15], | 85 | [['last_loginin'], 'string', 'max' => 15], |
| 82 | [['snumb', 'firm_ur_adr', 'firm_fiz_adr', 'firm_code_eg', 'firm_rs', 'firm_mfo', 'company'], 'string', 'max' => 255], | 86 | [['snumb', 'firm_ur_adr', 'firm_fiz_adr', 'firm_code_eg', 'firm_rs', 'firm_mfo', 'company'], 'string', 'max' => 255], |
| 83 | - [['email'], 'unique'] | 87 | + [['email'], 'unique'], |
| 88 | + [['email'], 'email'], | ||
| 89 | + ['re_pass', 'compare', 'compareAttribute' => 'pass'], | ||
| 90 | + ['verifyCode', 'captcha'], | ||
| 84 | ]; | 91 | ]; |
| 85 | } | 92 | } |
| 86 | 93 |
common/models/MarginsGroupsSearch.php
| @@ -21,7 +21,6 @@ class MarginsGroupsSearch extends MarginsGroups | @@ -21,7 +21,6 @@ class MarginsGroupsSearch extends MarginsGroups | ||
| 21 | return [ | 21 | return [ |
| 22 | [['id',], 'integer'], | 22 | [['id',], 'integer'], |
| 23 | [['group', 'timestamp', 'importer_id', 'margin_id'], 'safe'], | 23 | [['group', 'timestamp', 'importer_id', 'margin_id'], 'safe'], |
| 24 | - [['koef'], 'number'], | ||
| 25 | ]; | 24 | ]; |
| 26 | } | 25 | } |
| 27 | 26 | ||
| @@ -64,12 +63,11 @@ class MarginsGroupsSearch extends MarginsGroups | @@ -64,12 +63,11 @@ class MarginsGroupsSearch extends MarginsGroups | ||
| 64 | $query->andFilterWhere([ | 63 | $query->andFilterWhere([ |
| 65 | 'id' => $this->id, | 64 | 'id' => $this->id, |
| 66 | 'timestamp' => $this->timestamp, | 65 | 'timestamp' => $this->timestamp, |
| 66 | + Margins::tableName().'.name' => $this->margin_id, | ||
| 67 | ]); | 67 | ]); |
| 68 | 68 | ||
| 69 | $query->andFilterWhere(['like', 'group', $this->group]); | 69 | $query->andFilterWhere(['like', 'group', $this->group]); |
| 70 | $query->andFilterWhere(['like', Importers::tableName().'.name', $this->importer_id]); | 70 | $query->andFilterWhere(['like', Importers::tableName().'.name', $this->importer_id]); |
| 71 | - $query->andFilterWhere(['like', Margins::tableName().'.name', $this->margin_id]); | ||
| 72 | - $query->andFilterWhere(['like', MarginsGroups::tableName().'.koef', $this->koef]); | ||
| 73 | 71 | ||
| 74 | return $dataProvider; | 72 | return $dataProvider; |
| 75 | } | 73 | } |
frontend/views/layouts/main.php
| @@ -13,6 +13,12 @@ use common\widgets\Alert; | @@ -13,6 +13,12 @@ use common\widgets\Alert; | ||
| 13 | use \yii\widgets\Menu; | 13 | use \yii\widgets\Menu; |
| 14 | use \yii\helpers\Url; | 14 | use \yii\helpers\Url; |
| 15 | use common\models\Callback; | 15 | use common\models\Callback; |
| 16 | +use \common\models\Accounts; | ||
| 17 | +use \yii\helpers\ArrayHelper; | ||
| 18 | +use \common\models\DicCities; | ||
| 19 | +use \common\models\Deliveries; | ||
| 20 | +use yii\captcha\Captcha; | ||
| 21 | + | ||
| 16 | ?> | 22 | ?> |
| 17 | <?php $this->beginPage() ?> | 23 | <?php $this->beginPage() ?> |
| 18 | <!DOCTYPE html> | 24 | <!DOCTYPE html> |
| @@ -380,133 +386,230 @@ use common\models\Callback; | @@ -380,133 +386,230 @@ use common\models\Callback; | ||
| 380 | </div> | 386 | </div> |
| 381 | <div class="modal-body1"> | 387 | <div class="modal-body1"> |
| 382 | <div id="modal_form_registration" > | 388 | <div id="modal_form_registration" > |
| 383 | - <form action="" method="post" id="registration_form"> | ||
| 384 | - <h3>Заявка на регистрацию</h3> | ||
| 385 | - <div class="purple_registration active_button" style=" border-radius:12px 0 0 0 " id="person"><p>Частное лицо</p></div><div id="company" class="purple_registration"><p>Оптовик</p></div> | ||
| 386 | - <div class="registration_holder"> | ||
| 387 | - | ||
| 388 | - <div class="registration_for_person"> | ||
| 389 | - | ||
| 390 | - | ||
| 391 | - <input type="text" name="familyname" id="family_name" placeholder="Фамилия | ||
| 392 | - " minlength="2" required=""><span class='star'>*</span> | ||
| 393 | 389 | ||
| 394 | - <input name="name" id="name" placeholder="Имя" minlength="2" type="text" required=""><span class='star1'>*</span> | ||
| 395 | - <input type="email" name="email" id="email_registration" placeholder="email" minlength="10" required=""><span class='star2'>*</span> | ||
| 396 | 390 | ||
| 397 | - <input type="phone" name="telephone" id="telephone_registration" placeholder="Телефон" minlength="7" required=""><span class='star3'>*</span> | ||
| 398 | - <input type="telephone" name="telephone" id="telephone_registration_add" placeholder="Телефон"><span class='star4'>*</span> | ||
| 399 | - <p class="add_telephone" style="font-size: 14px; | ||
| 400 | - margin-right: 12px; | ||
| 401 | - margin-top: 10px;">добавить еще 1 телефон</p> | ||
| 402 | - <p>Фактический адрес</p> | ||
| 403 | - <div class="selectize_item2"> | ||
| 404 | 391 | ||
| 405 | 392 | ||
| 406 | - <select class="area"> | ||
| 407 | - <option value="" disabled="" selected="">Выберите область</option> | ||
| 408 | - <option value="2">Выбери меня!</option> | ||
| 409 | - <option value="3">Выбери меня!</option> | ||
| 410 | - <option value="5">Меня!</option> | ||
| 411 | - <option value="4">Меня</option> | ||
| 412 | - </select> | ||
| 413 | 393 | ||
| 414 | - </div> | ||
| 415 | - <div class="selectize_item2"> | ||
| 416 | - | ||
| 417 | - | ||
| 418 | - <select class="city"> | ||
| 419 | - <option value="" disabled="" selected="">Выберите город</option> | ||
| 420 | - <option value="2">Выбери меня!</option> | ||
| 421 | - <option value="3">Выбери меня!</option> | ||
| 422 | - <option value="5">Меня!</option> | ||
| 423 | - <option value="4">Меня</option> | ||
| 424 | - </select> | ||
| 425 | - | ||
| 426 | - </div> | ||
| 427 | - <div class="selectize_item2"> | ||
| 428 | 394 | ||
| 429 | 395 | ||
| 430 | - <select class="steel1"> | ||
| 431 | - <option value="" disabled="" selected="">Перевозчик</option> | ||
| 432 | - <option value="2">Выбери меня!</option> | ||
| 433 | - <option value="3">Выбери меня!</option> | ||
| 434 | - <option value="5">Меня!</option> | ||
| 435 | - <option value="4">Меня</option> | ||
| 436 | - </select> | ||
| 437 | 396 | ||
| 438 | - </div> | 397 | + <h3>Заявка на регистрацию</h3> |
| 398 | + <div class="purple_registration active_button" style=" border-radius:12px 0 0 0 " id="person"><p>Частное лицо</p></div><div id="company" class="purple_registration"><p>Оптовик</p></div> | ||
| 399 | + <div class="registration_holder"> | ||
| 439 | 400 | ||
| 440 | - <input type="text" placeholder="Введите код" id="code_input" required="4"><span class='star5'>*</span> | ||
| 441 | - <div class="code_generate"> | ||
| 442 | - <img src="/images/code_generator.png"> | ||
| 443 | - </div> | ||
| 444 | - <button class="purple" type="submit" value="Submit">Зарегистрироваться</button> | 401 | + <div class="registration_for_person"> |
| 402 | + <?php $form = ActiveForm::begin(['options' => ['enctype'=> 'multipart/form-data'], 'method'=>'post','action' => '/']); ?> | ||
| 403 | + <?= $form->field(new Accounts(), 'name')->textInput(['maxlength' => 45,'placeholder'=>'Имя'])->label(false) ?> | ||
| 404 | + <?= $form->field(new Accounts(), 'surname')->textInput(['maxlength' => 45,'placeholder'=>'Фамилия'])->label(false) ?> | ||
| 445 | 405 | ||
| 406 | + <?= $form->field(new Accounts(), 'email')->textInput(['maxlength' => 45,'placeholder'=>'E-mail','class'=>'form-control telephone_registration'])->label(false) ?> | ||
| 446 | 407 | ||
| 447 | - </div> | ||
| 448 | - <div class="registration_for_company"> | 408 | + <?= $form->field(new Accounts(), 'pass')->passwordInput(['maxlength' => 45,'placeholder'=>'Пароль','class'=>'form-control telephone_registration'])->label(false) ?> |
| 449 | 409 | ||
| 450 | - <input type="text" name="fullname" id="company_name" placeholder="Компания | ||
| 451 | - " minlength="2" required=""> | ||
| 452 | - <input type="text" name="fullname" id="family_name" placeholder="Фамилия | ||
| 453 | - " minlength="2" required=""><span class='star'>*</span> | 410 | + <?= $form->field(new Accounts(), 're_pass')->passwordInput(['maxlength' => 45,'placeholder'=>'Пароль','class'=>'form-control telephone_registration'])->label(false) ?> |
| 454 | 411 | ||
| 455 | - <input type="" name="name" id="name" placeholder="Имя" minlength="2" required=""><span class='star1'>*</span> | ||
| 456 | - <input type="email" name="email" id="email_registration" placeholder="email" minlength="10" required=""><span class='star3'>*</span> | 412 | + <?= $form->field(new Accounts(), 'country',['options'=>['class'=>'selectize_item2' ]])->dropDownList( |
| 413 | + ArrayHelper::map(DicCities::find()->where(['parent' => 0])->all(), 'id', 'name'), | ||
| 414 | + ['prompt' => 'Выберите область'] | ||
| 415 | + )->label(false); | ||
| 416 | + ?> | ||
| 457 | 417 | ||
| 458 | - <input type="telephone" name="telephone" id="telephone_registration" placeholder="Телефон" minlength="7" required=""><span class='star4'>*</span><span class='star6'>*</span> | ||
| 459 | - <input type="telephone" name="telephone" id="telephone_registration_add1" placeholder="Телефон" style="display:none"> | ||
| 460 | - <p class="add_telephone1" style="font-size: 14px; | ||
| 461 | - margin-right: 12px; | ||
| 462 | - margin-top: 10px;">добавить еще 1 телефон</p> | ||
| 463 | - <p>Фактический адрес</p> | ||
| 464 | - <div class="selectize_item2"> | 418 | + <?= $form->field(new Accounts(), 'country',['options'=>['class'=>'selectize_item2' ]])->dropDownList( |
| 419 | + [], | ||
| 420 | + ['prompt' => 'Выберите город'] | ||
| 421 | + )->label(false); | ||
| 422 | + ?> | ||
| 465 | 423 | ||
| 424 | + <?= $form->field(new Accounts(), 'country',['options'=>['class'=>'selectize_item2' ]])->dropDownList( | ||
| 425 | + ArrayHelper::map(Deliveries::find()->all(), 'id', 'name'), | ||
| 426 | + ['prompt' => 'Выберите тип перевозки'] | ||
| 427 | + )->label(false); | ||
| 428 | + ?> | ||
| 466 | 429 | ||
| 467 | - <select class="area"> | ||
| 468 | - <option value="" disabled="" selected="">Выберите область</option> | ||
| 469 | - <option value="2">Выбери меня!</option> | ||
| 470 | - <option value="3">Выбери меня!</option> | ||
| 471 | - <option value="5">Меня!</option> | ||
| 472 | - <option value="4">Меня</option> | ||
| 473 | - </select> | 430 | + <?= $form->field(new Accounts(), 'verifyCode')->widget(Captcha::className(), [ |
| 431 | + 'options'=>['placeholder'=>'Введите код' ], | ||
| 432 | + 'template' => '<div>{input}</div><div class="row"><div class="col-lg-3">{image}</div></div>', | ||
| 433 | + ])->label(false); ?> | ||
| 474 | 434 | ||
| 435 | + <button class="purple" type="submit" value="Submit">Зарегистрироваться</button> | ||
| 436 | + <?php ActiveForm::end(); ?> | ||
| 475 | </div> | 437 | </div> |
| 476 | - <div class="selectize_item2"> | ||
| 477 | - | ||
| 478 | - | ||
| 479 | - <select class="city"> | ||
| 480 | - <option value="" disabled="" selected="">Выберите город</option> | ||
| 481 | - <option value="2">Выбери меня!</option> | ||
| 482 | - <option value="3">Выбери меня!</option> | ||
| 483 | - <option value="5">Меня!</option> | ||
| 484 | - <option value="4">Меня</option> | ||
| 485 | - </select> | ||
| 486 | - | 438 | + <div class="registration_for_company"> |
| 439 | + <?php $form = ActiveForm::begin(['options' => ['enctype'=> 'multipart/form-data'], 'method'=>'post','action' => '/']); ?> | ||
| 440 | + <?= $form->field(new Accounts(), 'company')->textInput(['maxlength' => 45,'placeholder'=>'Компания'])->label(false) ?> | ||
| 441 | + <?= $form->field(new Accounts(), 'name')->textInput(['maxlength' => 45,'placeholder'=>'Имя'])->label(false) ?> | ||
| 442 | + <?= $form->field(new Accounts(), 'surname')->textInput(['maxlength' => 45,'placeholder'=>'Фамилия'])->label(false) ?> | ||
| 443 | + | ||
| 444 | + <?= $form->field(new Accounts(), 'email')->textInput(['maxlength' => 45,'placeholder'=>'E-mail','class'=>'form-control telephone_registration'])->label(false) ?> | ||
| 445 | + | ||
| 446 | + <?= $form->field(new Accounts(), 'pass')->passwordInput(['maxlength' => 45,'placeholder'=>'Пароль','class'=>'form-control telephone_registration'])->label(false) ?> | ||
| 447 | + | ||
| 448 | + <?= $form->field(new Accounts(), 're_pass')->passwordInput(['maxlength' => 45,'placeholder'=>'Пароль','class'=>'form-control telephone_registration'])->label(false) ?> | ||
| 449 | + | ||
| 450 | + <?= $form->field(new Accounts(), 'country',['options'=>['class'=>'selectize_item2' ]])->dropDownList( | ||
| 451 | + ArrayHelper::map(DicCities::find()->where(['parent' => 0])->all(), 'id', 'name'), | ||
| 452 | + ['prompt' => 'Выберите область'] | ||
| 453 | + )->label(false); | ||
| 454 | + ?> | ||
| 455 | + | ||
| 456 | + <?= $form->field(new Accounts(), 'country',['options'=>['class'=>'selectize_item2' ]])->dropDownList( | ||
| 457 | + [], | ||
| 458 | + ['prompt' => 'Выберите город'] | ||
| 459 | + )->label(false); | ||
| 460 | + ?> | ||
| 461 | + | ||
| 462 | + <?= $form->field(new Accounts(), 'country',['options'=>['class'=>'selectize_item2' ]])->dropDownList( | ||
| 463 | + ArrayHelper::map(Deliveries::find()->all(), 'id', 'name'), | ||
| 464 | + ['prompt' => 'Выберите тип перевозки'] | ||
| 465 | + )->label(false); | ||
| 466 | + ?> | ||
| 467 | + | ||
| 468 | + <?= $form->field(new Accounts(), 'verifyCode')->widget(Captcha::className(), [ | ||
| 469 | + 'options'=>['placeholder'=>'Введите код' ], | ||
| 470 | + 'template' => '<div>{input}</div><div class="row"><div class="col-lg-3">{image}</div></div>', | ||
| 471 | + ])->label(false); ?> | ||
| 472 | + | ||
| 473 | + <button class="purple" type="submit" value="Submit">Зарегистрироваться</button> | ||
| 474 | + <?php ActiveForm::end(); ?> | ||
| 487 | </div> | 475 | </div> |
| 488 | - <div class="selectize_item2"> | 476 | + </div> |
| 477 | + </div> | ||
| 489 | 478 | ||
| 490 | 479 | ||
| 491 | - <select class="steel1"> | ||
| 492 | - <option value="" disabled="" selected="">Перевозчик</option> | ||
| 493 | - <option value="2">Выбери меня!</option> | ||
| 494 | - <option value="3">Выбери меня!</option> | ||
| 495 | - <option value="5">Меня!</option> | ||
| 496 | - <option value="4">Меня</option> | ||
| 497 | - </select> | ||
| 498 | 480 | ||
| 499 | - </div> | ||
| 500 | 481 | ||
| 501 | - <input type="text" placeholder="Введите код" id="code_input" required='4'> | ||
| 502 | - <div class="code_generate"> | ||
| 503 | - <img src="/images/code_generator.png"> | ||
| 504 | - </div><span class='star5'>*</span> | ||
| 505 | - <button class="purple" type="submit" value="Submit">Зарегистрироваться</button> | ||
| 506 | 482 | ||
| 507 | 483 | ||
| 508 | - </div> | ||
| 509 | - </div></form> | 484 | +<!----> |
| 485 | +<!----> | ||
| 486 | +<!-- <form action="" method="post" id="registration_form">--> | ||
| 487 | +<!-- <h3>Заявка на регистрацию</h3>--> | ||
| 488 | +<!-- <div class="purple_registration active_button" style=" border-radius:12px 0 0 0 " id="person"><p>Частное лицо</p></div><div id="company" class="purple_registration"><p>Оптовик</p></div>--> | ||
| 489 | +<!-- <div class="registration_holder">--> | ||
| 490 | +<!----> | ||
| 491 | +<!-- <div class="registration_for_person">--> | ||
| 492 | +<!----> | ||
| 493 | +<!----> | ||
| 494 | +<!-- <input type="text" name="familyname" id="family_name" placeholder="Фамилия--> | ||
| 495 | +<!-- " minlength="2" required=""><span class='star'>*</span>--> | ||
| 496 | +<!----> | ||
| 497 | +<!-- <input name="name" id="name" placeholder="Имя" minlength="2" type="text" required=""><span class='star1'>*</span>--> | ||
| 498 | +<!-- <input type="email" name="email" id="email_registration" placeholder="email" minlength="10" required=""><span class='star2'>*</span>--> | ||
| 499 | +<!----> | ||
| 500 | +<!-- <input type="phone" name="telephone" id="telephone_registration" placeholder="Телефон" minlength="7" required=""><span class='star3'>*</span>--> | ||
| 501 | +<!-- <input type="telephone" name="telephone" id="telephone_registration_add" placeholder="Телефон"><span class='star4'>*</span>--> | ||
| 502 | +<!-- <p class="add_telephone" style="font-size: 14px;--> | ||
| 503 | +<!-- margin-right: 12px;--> | ||
| 504 | +<!-- margin-top: 10px;">добавить еще 1 телефон</p>--> | ||
| 505 | +<!-- <p>Фактический адрес</p>--> | ||
| 506 | +<!-- <div class="selectize_item2">--> | ||
| 507 | +<!----> | ||
| 508 | +<!----> | ||
| 509 | +<!-- <select class="area">--> | ||
| 510 | +<!-- <option value="" disabled="" selected="">Выберите область</option>--> | ||
| 511 | +<!-- <option value="2">Выбери меня!</option>--> | ||
| 512 | +<!-- <option value="3">Выбери меня!</option>--> | ||
| 513 | +<!-- <option value="5">Меня!</option>--> | ||
| 514 | +<!-- <option value="4">Меня</option>--> | ||
| 515 | +<!-- </select>--> | ||
| 516 | +<!----> | ||
| 517 | +<!-- </div>--> | ||
| 518 | +<!-- <div class="selectize_item2">--> | ||
| 519 | +<!----> | ||
| 520 | +<!----> | ||
| 521 | +<!-- <select class="city">--> | ||
| 522 | +<!-- <option value="" disabled="" selected="">Выберите город</option>--> | ||
| 523 | +<!-- <option value="2">Выбери меня!</option>--> | ||
| 524 | +<!-- <option value="3">Выбери меня!</option>--> | ||
| 525 | +<!-- <option value="5">Меня!</option>--> | ||
| 526 | +<!-- <option value="4">Меня</option>--> | ||
| 527 | +<!-- </select>--> | ||
| 528 | +<!----> | ||
| 529 | +<!-- </div>--> | ||
| 530 | +<!-- <div class="selectize_item2">--> | ||
| 531 | +<!----> | ||
| 532 | +<!----> | ||
| 533 | +<!-- <select class="steel1">--> | ||
| 534 | +<!-- <option value="" disabled="" selected="">Перевозчик</option>--> | ||
| 535 | +<!-- <option value="2">Выбери меня!</option>--> | ||
| 536 | +<!-- <option value="3">Выбери меня!</option>--> | ||
| 537 | +<!-- <option value="5">Меня!</option>--> | ||
| 538 | +<!-- <option value="4">Меня</option>--> | ||
| 539 | +<!-- </select>--> | ||
| 540 | +<!----> | ||
| 541 | +<!-- </div>--> | ||
| 542 | +<!----> | ||
| 543 | +<!-- <input type="text" placeholder="Введите код" id="code_input" required="4"><span class='star5'>*</span>--> | ||
| 544 | +<!-- <div class="code_generate">--> | ||
| 545 | +<!-- <img src="/images/code_generator.png">--> | ||
| 546 | +<!-- </div>--> | ||
| 547 | +<!-- <button class="purple" type="submit" value="Submit">Зарегистрироваться</button>--> | ||
| 548 | +<!----> | ||
| 549 | +<!----> | ||
| 550 | +<!-- </div>--> | ||
| 551 | +<!-- <div class="registration_for_company">--> | ||
| 552 | +<!----> | ||
| 553 | +<!-- <input type="text" name="fullname" id="company_name" placeholder="Компания--> | ||
| 554 | +<!-- " minlength="2" required="">--> | ||
| 555 | +<!-- <input type="text" name="fullname" id="family_name" placeholder="Фамилия--> | ||
| 556 | +<!-- " minlength="2" required=""><span class='star'>*</span>--> | ||
| 557 | +<!----> | ||
| 558 | +<!-- <input type="" name="name" id="name" placeholder="Имя" minlength="2" required=""><span class='star1'>*</span>--> | ||
| 559 | +<!-- <input type="email" name="email" id="email_registration" placeholder="email" minlength="10" required=""><span class='star3'>*</span>--> | ||
| 560 | +<!----> | ||
| 561 | +<!-- <input type="telephone" name="telephone" id="telephone_registration" placeholder="Телефон" minlength="7" required=""><span class='star4'>*</span><span class='star6'>*</span>--> | ||
| 562 | +<!-- <input type="telephone" name="telephone" id="telephone_registration_add1" placeholder="Телефон" style="display:none">--> | ||
| 563 | +<!-- <p class="add_telephone1" style="font-size: 14px;--> | ||
| 564 | +<!-- margin-right: 12px;--> | ||
| 565 | +<!-- margin-top: 10px;">добавить еще 1 телефон</p>--> | ||
| 566 | +<!-- <p>Фактический адрес</p>--> | ||
| 567 | +<!-- <div class="selectize_item2">--> | ||
| 568 | +<!----> | ||
| 569 | +<!----> | ||
| 570 | +<!-- <select class="area">--> | ||
| 571 | +<!-- <option value="" disabled="" selected="">Выберите область</option>--> | ||
| 572 | +<!-- <option value="2">Выбери меня!</option>--> | ||
| 573 | +<!-- <option value="3">Выбери меня!</option>--> | ||
| 574 | +<!-- <option value="5">Меня!</option>--> | ||
| 575 | +<!-- <option value="4">Меня</option>--> | ||
| 576 | +<!-- </select>--> | ||
| 577 | +<!----> | ||
| 578 | +<!-- </div>--> | ||
| 579 | +<!-- <div class="selectize_item2">--> | ||
| 580 | +<!----> | ||
| 581 | +<!----> | ||
| 582 | +<!-- <select class="city">--> | ||
| 583 | +<!-- <option value="" disabled="" selected="">Выберите город</option>--> | ||
| 584 | +<!-- <option value="2">Выбери меня!</option>--> | ||
| 585 | +<!-- <option value="3">Выбери меня!</option>--> | ||
| 586 | +<!-- <option value="5">Меня!</option>--> | ||
| 587 | +<!-- <option value="4">Меня</option>--> | ||
| 588 | +<!-- </select>--> | ||
| 589 | +<!----> | ||
| 590 | +<!-- </div>--> | ||
| 591 | +<!-- <div class="selectize_item2">--> | ||
| 592 | +<!----> | ||
| 593 | +<!----> | ||
| 594 | +<!-- <select class="steel1">--> | ||
| 595 | +<!-- <option value="" disabled="" selected="">Перевозчик</option>--> | ||
| 596 | +<!-- <option value="2">Выбери меня!</option>--> | ||
| 597 | +<!-- <option value="3">Выбери меня!</option>--> | ||
| 598 | +<!-- <option value="5">Меня!</option>--> | ||
| 599 | +<!-- <option value="4">Меня</option>--> | ||
| 600 | +<!-- </select>--> | ||
| 601 | +<!----> | ||
| 602 | +<!-- </div>--> | ||
| 603 | +<!----> | ||
| 604 | +<!-- <input type="text" placeholder="Введите код" id="code_input" required='4'>--> | ||
| 605 | +<!-- <div class="code_generate">--> | ||
| 606 | +<!-- <img src="/images/code_generator.png">--> | ||
| 607 | +<!-- </div><span class='star5'>*</span>--> | ||
| 608 | +<!-- <button class="purple" type="submit" value="Submit">Зарегистрироваться</button>--> | ||
| 609 | +<!----> | ||
| 610 | +<!----> | ||
| 611 | +<!-- </div>--> | ||
| 612 | +<!-- </div></form>--> | ||
| 510 | 613 | ||
| 511 | 614 | ||
| 512 | 615 |
frontend/web/css/main.css
| @@ -140,4 +140,6 @@ li a{ | @@ -140,4 +140,6 @@ li a{ | ||
| 140 | display:inline-block; | 140 | display:inline-block; |
| 141 | font-size: 22px; | 141 | font-size: 22px; |
| 142 | margin-bottom: 10px; | 142 | margin-bottom: 10px; |
| 143 | -} | ||
| 144 | \ No newline at end of file | 143 | \ No newline at end of file |
| 144 | +} | ||
| 145 | + | ||
| 146 | +div.required:after {content: " *"; color: #fec831;} | ||
| 145 | \ No newline at end of file | 147 | \ No newline at end of file |
frontend/web/robots.txt