?> <?php echo $form->field($model, 'address_1')->textarea(['rows' => 6]); ?> <?php echo $form->field($model, 'address_2')->textarea(['rows' => 6]); ?> <?php echo $form->field($model, 'city')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'state_id')->dropDownList(States::listData()); ?> <?php echo $form->field($model, 'license')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'zip_code')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'email')->textInput(['maxlength' => true]); ?> <?php
<?php use yii\helpers\Html; use app\enums\States; use kartik\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel app\modules\admin\models\search\Owner */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Owners Manager'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="Owner-index"> <?php $columns = [['label' => '#', 'attribute' => 'id', 'headerOptions' => ['style' => 'width: 100px;']], 'fullName', 'license', ['attribute' => 'state_id', 'value' => function ($model) { return States::labelById($model->state_id); }, 'filterType' => GridView::FILTER_SELECT2, 'filter' => States::listData(), 'width' => '8%', 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'width' => 150]], 'filterInputOptions' => ['placeholder' => 'Choose State'], 'headerOptions' => ['style' => 'width: 190px;']], 'city', 'zip_code', 'email', 'vehicleName', ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{update} {delete}']]; ?> <?php echo GridView::widget(['id' => 'crud-datatable', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'containerOptions' => ['style' => 'overflow: auto'], 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'pjax' => true, 'columns' => $columns, 'toggleDataOptions' => ['all' => ['icon' => 'resize-full', 'class' => 'btn btn-default', 'label' => Yii::t('app', 'All'), 'title' => Yii::t('app', 'Show all data')], 'page' => ['icon' => 'resize-small', 'class' => 'btn btn-default', 'label' => Yii::t('app', 'Page'), 'title' => Yii::t('app', 'Show first page data')]], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-plus"></i>', ['create'], ['role' => 'modal-remote', 'title' => Yii::t('app', 'Create Owner'), 'class' => 'btn btn-default']) . Html::a('<i class="glyphicon glyphicon-repeat"></i>', [''], ['data-pjax' => 1, 'class' => 'btn btn-default', 'title' => Yii::t('app', 'Reload Grid')]) . '{toggleData}' . '{export}']], 'striped' => true, 'condensed' => true, 'responsive' => true, 'panel' => ['type' => 'primary', 'heading' => '<i class="glyphicon glyphicon-list"></i> ' . $this->title, 'before' => '<em>' . Yii::t('app', '* Resize table columns just like a spreadsheet by dragging the column edges.') . '</em>', 'after' => false]]); ?> </div>
<?php use yii\helpers\Html; use kartik\grid\GridView; use yii\helpers\ArrayHelper; use app\enums\States; /* @var $this yii\web\View */ /* @var $searchModel app\modules\admin\models\search\Record */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Manage Records'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="record-manage"> <?php $columns = [['label' => '#', 'attribute' => 'id', 'headerOptions' => ['style' => 'width: 100px;']], ['attribute' => 'infraction_date', 'format' => 'date', 'headerOptions' => ['style' => 'width: 100px;']], ['attribute' => 'state_id', 'value' => function ($model) { return States::labelById($model->state_id); }, 'filterType' => GridView::FILTER_SELECT2, 'filter' => States::listData(), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'width' => 150]], 'filterInputOptions' => ['placeholder' => 'Choose State'], 'format' => 'raw', 'headerOptions' => ['style' => 'width: 160px;']], ['attribute' => 'license', 'headerOptions' => ['style' => 'width: 100px;']], ['attribute' => 'status_id', 'value' => function ($model) { return $model->statusName; }, 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(\app\models\CaseStatus::find()->orderBy('name')->asArray()->all(), 'id', 'name'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'width' => 250]], 'filterInputOptions' => ['placeholder' => 'Choose State'], 'format' => 'raw', 'headerOptions' => ['style' => 'width: 260px;']], ['attribute' => 'created_at', 'format' => 'date', 'headerOptions' => ['style' => 'width: 100px;']], ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{update} {delete}']]; ?> <?php echo GridView::widget(['id' => 'crud-datatable', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'columns' => $columns, 'toggleDataOptions' => ['all' => ['icon' => 'resize-full', 'class' => 'btn btn-default', 'label' => Yii::t('app', 'All'), 'title' => Yii::t('app', 'Show all data')], 'page' => ['icon' => 'resize-small', 'class' => 'btn btn-default', 'label' => Yii::t('app', 'Page'), 'title' => Yii::t('app', 'Show first page data')]], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', [''], ['data-pjax' => 1, 'class' => 'btn btn-default', 'title' => Yii::t('app', 'Reload Grid')]) . '{toggleData}' . '{export}']], 'striped' => true, 'condensed' => true, 'responsive' => true, 'panel' => ['type' => 'primary', 'heading' => '<i class="glyphicon glyphicon-list"></i> ' . $this->title, 'before' => '<em>' . Yii::t('app', '* Resize table columns just like a spreadsheet by dragging the column edges.') . '</em>', 'after' => false]]); ?> </div>
/** * Returns owner state name. Getting state from States Enum. * @return \yii\db\ActiveQuery */ public function getStateName() { return States::labelById($this->state_id); }
echo $this->render('partials/_chunkInput', ['model' => $model, 'form' => $form, 'attribute' => 'imageOverviewCamera', 'type' => EvidenceFileType::TYPE_IMAGE_OVERVIEW_CAMERA, 'uploadUrl' => $uploadUrl, 'acceptMimeTypes' => $acceptMimeTypes, 'maxFileSize' => $maxFileSize, 'maxChunkSize' => $maxChunkSize, 'dropZone' => $dropZone, 'handleUrl' => $handleUrl]); ?> <?php echo $form->field($model, 'infraction_date')->widget(DatePicker::classname(), ['layout' => '{input}{picker}', 'options' => ['placeholder' => 'Enter infraction date ...'], 'pluginOptions' => ['format' => Yii::$app->params['date.view.format']]]); ?> <?php echo $form->field($model, 'lat')->widget(MaskedInput::classname(), ['mask' => '9[9[9]]\\º 9[9[9]]\' 9[9].9[9[9]]\\" a'])->hint('If the current value less than mask value, please use space key(on the keyboard) in order to move cursor to the next sub field! Latitude example 49º 59\' 36.6" N'); ?> <?php echo $form->field($model, 'lng')->widget(MaskedInput::classname(), ['mask' => '9[9[9]]\\º 9[9[9]]\' 9[9].9[9[9]]\\" a'])->hint('If the current value less than mask value, please use space key(on the keyboard) in order to move cursor to the next sub field! Longitude example 36º 13\' 49.378" E'); ?> <?php echo $form->field($model, 'state_id')->dropDownList(States::listData(), array('prompt' => ' - choose state - ')); ?> <?php echo $form->field($model, 'license')->textInput(['maxlength' => true])->hint('Please enter driver licence.'); ?> <div class="form-group"> <div class="col-lg-offset-3 col-lg-8"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-primary' : 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end();
NRS 484.357 </div> <br> <div> <span class="bold">Date Time:</span> <?php echo Yii::$app->formatter->asDatetime("{$model->infraction_date}", "php:d-m-Y H:i:s"); ?> </span> <br/> <span class="bold">License Plate Number:</span> <?php echo $model->license; ?> <br/> <span class="bold">State:</span> <?php echo \app\enums\States::labelById($model->state_id); ?> <br> <?php if (isset($model->owner)) { ?> <span class="bold">Vehicle Make Model:</span> <?php echo $model->owner->vehicleName; ?> ,<br/> <span class="bold">Vehicle Color:</span><?php echo \app\enums\VehicleColors::labelById($model->owner->vehicle_color_id); ?>