use yii\widgets\ActiveForm; use yii\helpers\Html; use yii\helpers\Url; use frontend\modules\profile\models\Rentact; use yii\bootstrap\Alert; use frontend\modules\account\Module; use yii\helpers\Json; $this->registerCssFile('/css/reserve-a-car.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()]], 'css-reserve-a-car-theme'); $this->registerCssFile('/js/datepicker/datepicker.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()]], 'css-reserve-a-car-theme2'); $this->registerJsFile('/js/reserve-a-car.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/moment.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/datepicker/datepicker.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerCssFile('/css/magnific.css'); $this->registerJsFile('/js/magnific.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/moment.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $rentact = Rentact::find()->asclients()->where(['system_id' => $systemModel->id])->active()->asArray()->all(); $rentact = Json::encode($rentact); $errors = $rentModel->getErrors(); if (!empty($errors)) { $errorSumText = ''; foreach ($errors as $attr => $errorsAttr) { foreach ($errorsAttr as $errorText) { if (!is_integer($errorText)) { $errorSumText .= $errorText . "<br/>"; } } } if (!empty($errorSumText)) { echo Alert::widget(['options' => ['class' => 'alert-danger', 'style' => 'margin:20px;'], 'body' => $errorSumText]); } }
use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\MaskedInput; use yii\widgets\DetailView; use frontend\components\KirovCalendarClass\KirovCalendarClass; use frontend\modules\profile\models\Rentact; use frontend\modules\profile\models\Busy; use yii\widgets\ActiveForm; use yii\widgets\Pjax; use yii\helpers\Json; $this->registerCssFile('/css/reserve-a-car.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()]], 'css-reserve-a-car-theme'); $this->registerCssFile('/js/datepicker/datepicker.css', ['depends' => [\yii\bootstrap\BootstrapAsset::className()]], 'css-reserve-a-car-theme2'); $this->registerJsFile('/js/reserve-a-car.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/moment.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/datepicker/datepicker.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $rentact = Rentact::find()->where(['system_id' => $model->id])->asArray()->all(); $rentact = Json::encode($rentact); $this->registerCssFile('/css/magnific.css'); $this->registerJsFile('/js/magnific.js', ['depends' => [\yii\web\JqueryAsset::className()]]); $this->registerJsFile('/js/moment.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]); ?> <div class="row"> <?php if ($model->is_aviable) { ?> <div class="row">