<?php echo $form->field($model, 'phone_number'); ?> <?php echo $form->field($model, 'website'); ?> <?php // echo $form->field($model, 'location') ?> <!-- Country --> <?php $listDataCountry = yii\helpers\ArrayHelper::map(common\models\Country::find()->where(['is_status' => 1])->all(), 'id', 'country'); ?> <?php echo $form->field($model, 'country_id', ['inputOptions' => ['class' => 'form-control']])->dropDownList($listDataCountry, ['prompt' => Yii::t('app', '-- Select Country --'), 'onchange' => ' $.get("' . yii\helpers\Url::toRoute(['dependent/getregion']) . '", { id: $(this).val() }) .done(function(data){ $("#' . Html::getInputId($model, 'region_id') . '").html( data ); });']); ?> <!-- Region --> <?php $listDataRegion = yii\helpers\ArrayHelper::map(common\models\Region::find()->all(), 'id', 'region'); ?>
?> </div> </div> <div class="row"> <div class="col-lg-12"> <h3 class="box-title" style="padding-bottom: 20px"> <i class="fa fa-th-list"></i> <?php echo Yii::t('app', 'List City'); ?> </h3> <div class="box view-item"> <div class="box-body"> <div class="city-index"> <?php yii\widgets\Pjax::begin(); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'city', ['attribute' => 'region_id', 'value' => 'region.region', 'filter' => yii\helpers\ArrayHelper::map(common\models\Region::find()->where(['is_status' => 1])->all(), 'id', 'region')], ['attribute' => 'country_id', 'value' => 'country.country', 'filter' => yii\helpers\ArrayHelper::map(common\models\Country::find()->where(['is_status' => 1])->all(), 'id', 'country')], ['attribute' => 'is_status', 'class' => '\\pheme\\grid\\ToggleColumn', 'enableAjax' => false, 'filter' => ['1' => 'Active', '0' => 'Not Active']], ['class' => 'common\\components\\CustomActionColumn']]]); ?> <?php yii\widgets\Pjax::end(); ?> </div> </div> </div> </div> </div>