public function run() { $out = ''; $countryDropdown = Select2::widget(['name' => 'country', 'value' => '', 'data' => Country::dropdown(), 'options' => ['label' => 'yaya', 'placeholder' => 'Select Country ...', 'id' => 'country-selection']]); $locationDropdown = $this->form->field($this->model, 'location_id')->label(false)->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'options' => ['id' => 'location-selection'], 'select2Options' => ['pluginOptions' => ['allowClear' => TRUE]], 'pluginOptions' => ['depends' => ['country-selection'], 'placeholder' => 'Select Location', 'url' => Url::to(['/location/admin/load'])]]); $this->_printField($countryDropdown, $out); $this->_printField($locationDropdown, $out); return $out; }
?> <div class="assing-term-form"> <?php Pjax::begin(['enablePushState' => false, 'id' => 'form-give-term']); $form = ActiveForm::begin(['id' => 'assing_term_form']); echo $form->field($model, 'ghd_id')->dropDownList(ArrayHelper::map(Yii::$app->user->identity->teacher->teacherHasDiscipline, 'groupHasDiscipline.id', 'groupHasDiscipline.discGroupSem'), ['prompt' => '-Выберите дисциплину -', 'id' => 'ghdcat-id'])->label('Дисциплина'); /* echo $form->field($model2,'group')->widget(DepDrop::classname(), [ 'options'=>['id'=>'subcat-id'], 'pluginOptions'=>[ 'depends'=>['ghdcat-id'], 'placeholder'=>'Select...', 'url'=>Url::to(['/work/groupfromdiscipline']) ] ])->label('Группа'); */ echo $form->field($model, 'student_id')->widget(DepDrop::classname(), ['pluginOptions' => ['depends' => ['ghdcat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/work/studentfromghd'])]])->label('Студент'); ?> <div class="form-group"> <?php echo Html::submitButton('Добавить', ['class' => 'btn btn-success']); ?> </div> <?php ActiveForm::end(); Pjax::end(); ?> </div>
public function depDrop($url, $items = [], $depends = [], $options = []) { $items = self::modelsToOptions($items); $allowClear = ArrayHelper::getValue($options, 'allowClear', true); $placeholder = null; if (!is_null($prompt = ArrayHelper::getValue($options, 'prompt'))) { $placeholder = $prompt; $items = ArrayHelper::merge([null => ''], $items); } ArrayHelper::remove($options, 'placeholder'); ArrayHelper::remove($options, 'allowClear'); ArrayHelper::remove($options, 'prompt'); return $this->widget(DepDrop::classname(), ['options' => $options, 'type' => \kartik\depdrop\DepDrop::TYPE_SELECT2, 'data' => $items, 'select2Options' => ['pluginOptions' => ['allowClear' => $allowClear]], 'pluginOptions' => ['depends' => $depends, 'url' => $url, 'placeholder' => $placeholder]]); }
<div class="col-xs-9"> <!-- Tab panes --> <div class="tab-content"> <div class="tab-pane <?php if ($tableActive == 1) { echo 'active'; } ?> " id="tab-event-based"> <?php echo $form->field($model, 'event', ['selectors' => ['input' => '#which-event']])->widget(DepDrop::classname(), ['options' => ['id' => 'which-event'], 'pluginOptions' => ['depends' => ['relation'], 'placeholder' => 'Select...', 'url' => Url::to(['/messages/getevent'])]]); ?> <?php echo $form->field($model, 'sendon', ['selectors' => ['input' => '#send-on']])->widget(DepDrop::classname(), ['options' => ['id' => 'send-on'], 'pluginOptions' => ['depends' => ['which-event'], 'placeholder' => 'Select...', 'url' => Url::to(['/messages/getsendtype'])]]); ?> <div class="form-group field-checklistschedule-at_time"> <label class="control-label" for="checklistschedule-at_time">At</label> <?php echo Html::activeDropDownList($model, 'at_hour', $model->hour_list); ?> <?php echo Html::activeDropDownList($model, 'at_minute', $model->minute_list); ?> </div> </div> <div class="tab-pane <?php if ($tableActive == 2) { echo 'active';
<div class="col-md-2" style="padding-right:5px;"> <?php $topik = new \common\models\Topik(); echo $form->field($topik, 'nama')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['wilayah-nama'], 'url' => Url::to(['/site/child-topik']), 'loadingText' => 'Loading Topik..', 'placeholder' => 'Topik']])->label(''); ?> </div> <div class="col-md-2" style="padding-right:5px;"> <?php $variabel = new \common\models\Variabel(); echo $form->field($variabel, 'nama')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['topik-nama'], 'url' => Url::to(['/site/child-variabel']), 'loadingText' => 'Loading Variabel ...', 'placeholder' => 'Variabel']])->label(''); ?> </div> <div class="col-md-2" style="padding-right:5px;"> <?php $kategori = new \common\models\Kategori(); echo $form->field($kategori, 'nama')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['variabel-nama'], 'url' => Url::to(['/site/child-kategori']), 'loadingText' => 'Loading kategori ...', 'placeholder' => 'Kategori']])->label(''); ?> </div> <div class="col-md-2" style="padding-right:5px;"> <?php echo Html::button('<i class="glyphicon glyphicon-play"></i> Generate', ['onclick' => 'calldatabaru()', 'class' => 'btn btn-success btn-sm', 'style' => 'margin-top:22px']); ?> </div> </div> </div> </div> <div class="row"> <?php /* <div class="col-md-4" style="padding-right:5px;">
<?php use yii\helpers\Url; /** * @var yii\web\View $this * @var bariew\templateAbstractModule\models\Config $model * @var yii\widgets\ActiveForm $form */ ?> <?php echo $form->field($model, 'type')->dropDownList($model->typeList()); ?> <?php echo $form->field($model, 'address')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'model_class')->widget(\kartik\select2\Select2::classname(), ['data' => $model->modelClassList(), 'options' => ['prompt' => '', 'class' => 'form-control', 'onchange' => ' $.post( "' . Url::toRoute(["model-variables"]) . '", $(this).parents("form").serialize(), function(data) { $(".configVariables").html(data); } )']]); echo $form->field($model, 'model_event')->widget(\kartik\depdrop\DepDrop::classname(), ['data' => $model->modelEventList(), 'options' => ['class' => 'form-control'], 'type' => \kartik\depdrop\DepDrop::TYPE_DEFAULT, 'pluginOptions' => ['depends' => ['config-model_class'], 'url' => Url::toRoute(['events']), 'loadingText' => '', 'initialize' => true]]);
<h4 class="box-title"><?php echo Yii::t('app', 'Location'); ?> </h4> </div> <div class="box-body"> <div class="row"> <div class="col-md-6"> <?php echo $form->field($model, 'region_id')->dropDownList(Region::getList(), ['id' => 'region_id', 'prompt' => '']); ?> </div> <div class="col-md-6"> <?php echo $form->field($model, 'district_id')->widget(DepDrop::classname(), ['data' => District::getList($model->region_id), 'options' => ['id' => 'district_id'], 'pluginOptions' => ['depends' => ['region_id'], 'placeholder' => false, 'url' => Url::to(['/personal/district-list'])]]); ?> </div> </div> <div class="row"> <div class="col-md-6"> <?php echo $form->field($model, 'address', ['template' => "{label}\n<div class=\"input-group\">{input}\n<span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"button\"><span class=\"glyphicon glyphicon-refresh\" aria-hidden=\"true\"></span></button></span></div>\n{hint}\n{error}"])->textInput(['maxlength' => true]); ?> </div> <div class="col-md-6"> <?php echo $form->field($model, 'gps', ['template' => "{label}\n<div class=\"input-group\">{input}\n<span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"button\"><span class=\"glyphicon glyphicon-refresh\" aria-hidden=\"true\"></span></button></span></div>\n{hint}\n{error}"])->textInput(['maxlength' => true]); ?> </div>
echo $form->field($model, 'teacherHasDiscipline')->widget(MultipleInput::className(), ['min' => 1, 'columns' => [['name' => 'teacher_id', 'type' => 'dropDownList', 'defaultValue' => 1, 'items' => ArrayHelper::map(\common\models\Teacher::find()->all(), 'id', 'user.fullname')]]]); ?> <?php echo $form->field($model, 'discipline_id')->dropDownList(ArrayHelper::map(Discipline::find()->all(), 'id', 'name')); ?> <?php echo $model->isNewRecord ? $form->field($model, 'group_id')->dropDownList(ArrayHelper::map(Group::find()->all(), 'id', 'name'), ['prompt' => '-Группа-', 'onchange' => ' $.post( "' . Yii::$app->urlManager->createUrl('group-has-discipline/semlist?id=') . '"+$(this).val(), function( data ) { $( "select#grouphasdiscipline-semester_id" ).html( data ); }); ', 'class' => 'form-control']) : ""; ?> <?php echo $model->isNewRecord ? $form->field($model, 'semester_number')->widget(DepDrop::classname(), ['options' => ['id' => 'semester_number'], 'pluginOptions' => ['depends' => ['grouphasdiscipline-group_id'], 'placeholder' => 'Выберите группу...', 'url' => Url::to(['/group-has-discipline/semesters'])]]) : $form->field($model, 'semester_number')->dropDownList($semesterList); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
echo $form->field($model, 'client_id')->dropDownList(ArrayHelper::map($clients, 'id', 'name'), ['prompt' => 'Elegir cliente', 'id' => 'client_id']); ?> <?php if ($model->isNewRecord) { ?> <div class="form-group"> <?php echo Html::submitButton('Crear cliente', ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'add-client']); ?> </div> <?php } ?> <?php echo $form->field($model, 'client_contact_id')->widget(DepDrop::classname(), ['data' => $model->client ? Client::getDefaultContactsArray() + $model->client->getContactsArray() : Client::getDefaultContactsArray(), 'pluginOptions' => ['placeholder' => Client::CONTACT_DROPDOWN_PLACEHOLDER, 'depends' => ['client_id'], 'url' => Url::to(['/client/get-contacts'])]]); ?> <?php echo $form->field($model, 'title')->textInput(); ?> <?php echo $form->field($model, 'status')->dropDownList(Estimate::statusLabels()); ?> <?php echo $form->field($model, 'request_date')->widget(\yii\jui\DatePicker::classname(), ['options' => ['class' => 'form-control']]); ?> <?php
<?php echo $form->field($model, 'school', ['selectors' => ['input' => '#cat-id']])->dropDownList(School::getDropDownList(), ['id' => 'cat-id', 'prompt' => 'Выберите школу']); ?> <!--?= $form->field($model, 'school')->dropDownList(['1'=>'test','2'=>School::getDropDownList()], ['id'=>'cat-id'])?--> <?php echo Html::hiddenInput('input-type-1', $model->group, ['id' => 'input-type-1']); ?> <?php echo Html::hiddenInput('input-type-2', 'Additional value 2', ['id' => 'input-type-2']); ?> <?php echo $form->field($model, 'group', ['selectors' => ['input' => '#subcat-id']])->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'options' => ['id' => 'subcat-id'], 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => Yii::t('registration', 'Groups'), 'initialize' => true, 'url' => Url::to(['/registration/subcat']), 'params' => ['input-type-1', 'input-type-2'], 'loadingText' => Yii::t('registration', 'Loading...')]]); ?> <?php echo $form->field($model, 'comment'); ?> <br> <?php echo $form->field($model, 'captcha')->widget(Captcha::className(), ['template' => '<div class=\\"col-lg-3\\">{image} <a href="javascript:;" id="ebancapcha">' . Yii::t('registration', 'Reload Captcha') . '</a></div><div class=\\"col-lg-3\\">{input}</div>']); ?> <br>
<?php echo $form->errorSummary($new); ?> <div class="row"> <div class="col-sm-3"> <?php echo $form->field($new, 'cadena_id')->dropDownList($cadenas, ['prompt' => 'Selecciona Cadena']); ?> </div> <div class="col-sm-3"> <?php //echo $form->field($new, 'almacen_id')->dropDownList($almacenes,['prompt'=>'Selecciona Almacén']) ?> <?php echo $form->field($new, 'almacen_id')->widget(DepDrop::classname(), ['id' => 'registro-almacen_id', 'pluginOptions' => ['depends' => ['registro-cadena_id'], 'placeholder' => 'Selecciona Almacen...', 'url' => Url::to(['/registro/almacen/almacenes-cadena'])]]); ?> </div> <div class="col-sm-3"> <?php echo $form->field($new, 'categoria_id')->dropDownList($categorias, ['prompt' => 'Selecciona Categoría']); ?> </div> <div class="col-sm-3"> <div class="form-group field-registro-fecha required"> <?php echo '<label>Fecha</label>'; ?> <?php echo DatePicker::widget(['model' => $new, 'attribute' => 'fecha', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]); ?>
<div class="city-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'country_id')->dropDownList(Country::getDropDownArray(), ['prompt' => Yii::t('geo', 'Choose country')])->label(Yii::t('geo', 'Country')); ?> <?php echo $form->field($model, 'region_id')->widget(DepDrop::classname(), ['options' => ['id' => 'region_id'], 'pluginOptions' => ['depends' => [Html::getInputId($model, 'country_id')], 'placeholder' => Yii::t('geo', 'Choose region'), 'url' => Url::to(['/geo/admin/city/region'])]]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('geo', 'Create') : Yii::t('geo', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
</div> <div class="row"> <div class="col-lg-6"> <?php echo $form->field($model, 'article_type_id')->textInput(); ?> </div> <div class="col-lg-6"> <?php echo $form->field($model, 'main_tag')->dropDownList(Tags::getAllTags(), ['id' => 'main_tag', 'prompt' => 'Select Main Tag']); ?> </div> <div class="col-lg-6"> <?php echo $form->field($model, 'sub_tag')->widget(DepDrop::classname(), ['options' => ['id' => 'sub_tag'], 'pluginOptions' => ['depends' => ['main_tag'], 'placeholder' => 'Select Sub Tag..', 'url' => Url::to(['/tags/subtags'])]]); ?> </div> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
?> <div class="lesson-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $model->isNewRecord ? $form->field($model, 'ghd_id')->dropDownList(ArrayHelper::map(GroupHasDiscipline::find()->all(), 'id', 'groupSemDisc'), ['prompt' => '--Выберите дисциплину--']) : ""; ?> <?php echo $model->isNewRecord ? $form->field($model, 'thd_id')->widget(DepDrop::classname(), ['options' => ['id' => 'thd_id-id'], 'pluginOptions' => ['depends' => ['lesson-ghd_id'], 'placeholder' => '...', 'url' => Url::to(['/lesson/thd'])]]) : $form->field($model, 'thd_id')->dropDownList(ArrayHelper::map($model->groupHasDiscipline->teacherHasDiscipline, 'teacher.id', 'teacher.user.fullname')); ?> <?php echo $form->field($model, 'lesson_type_id')->dropDownList(ArrayHelper::map(LessonType::find()->all(), 'id', 'name')); ?> <?php echo $form->field($model, 'week')->dropDownList(['1' => 1, '2' => 2]); ?> <?php echo $form->field($model, 'day')->dropDownList(Lesson::getDaysList()); ?> <?php
<?php echo $form->field($modelProvinsi, 'id_prov')->label('Provinsi Name')->dropDownList($provinsi, ['prompt' => 'Pilih']); ?> <?php if (!$model->isNewRecord) { ?> <?php echo Html::hiddenInput('id_kab', $model->id_kab, ['id' => 'id_kab']); ?> <?php } ?> <?php echo $form->field($model, 'id_kab')->label('Kabupaten Name')->widget(DepDrop::classname(), ['pluginOptions' => ['depends' => ['provinsi-id_prov'], 'placeholder' => 'Pilih', 'initialize' => true, 'params' => ['id_kab'], 'url' => Url::to(['/api/kabupaten'])]]); ?> <?php echo $form->field($model, 'nama')->label('Kecamatan Name')->textInput(['maxlength' => true]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success btn-flat btn-lg' : 'btn btn-primary btn-flat btn-lg']); ?> <?php echo Html::resetButton('Cancel', ['class' => 'btn btn-default btn-flat btn-lg']); ?> <?php echo Html::a('Back', ['index'], ['class' => 'btn btn-warning btn-flat btn-lg']);
<?php echo $form->field($model, 'mobile2')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'address1')->textarea(array('value' => $model->address1)); ?> <?php echo $form->field($model, 'address2')->textarea(array('value' => $model->address2)); ?> <?php echo $form->field($model, 'country')->dropDownList($model->countriesList, ['id' => 'countries']); ?> <?php echo $form->field($model, 'state')->widget(DepDrop::classname(), ['options' => ['id' => 'states'], 'data' => $model->statesData, 'pluginOptions' => ['depends' => ['countries'], 'placeholder' => 'Select State', 'url' => Url::to(['/vendor/vendor/states'])]]); ?> <?php echo $form->field($model, 'city')->textInput(['placeholder' => 'City'], ['itemOptions' => ['class' => 'radio-inline']]); ?> <?php echo $form->field($model, 'zip')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'status')->dropDownList(['10' => 'Active', '0' => 'In-Active'], ['prompt' => 'status'], ['itemOptions' => ['class' => 'radio-inline']]); ?> <?php
use yii\helpers\Url; /* @var $this yii\web\View */ /* @var $model lukisongroup\grandchild\models\Grandchild */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="grandchild-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'CHILD_ID')->dropDownList(ArrayHelper::map(Parents::find()->asArray()->all(), 'parent_id', 'parent'), ['id' => 'cat-id']); echo $form->field($model, 'PARENT_ID')->widget(\kartik\depdrop\DepDrop::classname(), ['options' => ['id' => 'subcat-id'], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['get-child'])]]); ?> <?php echo $form->field($model, 'GRANDCHILD')->textInput(['maxlength' => true]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
<?php $dataPost=ArrayHelper::map(kota::find()->all(), 'CITY_ID', 'CITY_NAME'); echo $form->field($model, 'DES_CITY') ->dropDownList( $dataPost ); ?> */ ?> <?php echo "<h2><b>Origin</b></h2>"; ?> <?php echo $form->field($model, 'ORIGIN_PROVINCE')->dropDownList(ArrayHelper::map(Provinsi::find()->asArray()->all(), 'PROVINCE_ID', 'PROVINCE'), ['id' => 'cat-id'], ['prompt' => '-Choose a provinsi-']); echo $form->field($model, 'ORIGIN_CITY')->widget(\kartik\depdrop\DepDrop::classname(), ['options' => ['id' => 'subcat-id'], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/site/get-kota'])]]); ?> <?php echo "<h2><b>Destination</b></h2>"; ?> <?php $Expired = Provinsi::find()->all(); $listData = ArrayHelper::map($Expired, 'PROVINCE_ID', 'PROVINCE'); echo $form->field($model, 'DES_PROVINCE')->dropDownList($listData, ['prompt' => '-Pilih Provinsi-', 'onchange' => ' $.post( "index.php?r=site/lists&id=' . '"+$(this).val(), function( data ) { $( "select#harga-des_city" ).html( data ); }); '])->label('Des Province'); ?> <?php
?> <?php echo $form->field($model, 'tipo')->textInput(); ?> <?php echo Html::label('Categoria', 'categoria', ['class' => 'control-label']); ?> <br/> <?php echo Html::dropDownList('categoria', null, ArrayHelper::map($categoria_model, 'id', 'nome'), ['id' => 'id_categoria2', 'class' => 'form-control', 'prompt' => 'Selecione uma categoria']); ?> <br/> <?php echo $form->field($model, 'id_subcategoria2')->widget(DepDrop::classname(), ['pluginOptions' => ['depends' => ['id_categoria2'], 'loadingText' => 'Carregando...', 'placeholder' => 'Selecione a subcategoria', 'url' => Yii::$app->urlManager->createUrl(['/subcategoria/categorialist'])]]); ?> <?php echo $form->field($model, 'composicao')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'materia_prima')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'material_expediente')->textInput(['maxlength' => true]); ?>
/* @var $model app\models\City */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="city-form"> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data'], 'fieldConfig' => ['template' => "<div class='col-sm-6 col-md-6'>\n <div class='form-group'>\n <label class='col-sm-2 control-label'>{label}</label>\n <div class=\"col-sm-10\">{input}\n{error}</div>\n </div>\n </div>"]]); ?> <?php // Parent echo $form->field($model, 'country_id')->dropDownList(ArrayHelper::map(Country::find()->where(['status' => 'Active'])->all(), 'id', 'name'), ['id' => 'country_id', 'prompt' => 'Select Status']); // //// Child # 1 echo $form->field($model, 'state_id')->widget(DepDrop::classname(), ['options' => ['id' => 'state_id'], 'pluginOptions' => ['depends' => ['country_id'], 'placeholder' => 'Select State', 'url' => Url::to(['/city/subcat'])]]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'status')->dropDownList(['Active' => 'Active', 'Inactive' => 'Inactive'], ['prompt' => 'Select Status']); ?> <div class='col-sm-12 col-md-12'> <div class="form-group pull-right">
?> </div> </div> </div> <?php } else { ?> <div class="row"> <div class="col-xs-6 col-sm-4 col-md-2"> <?php echo $form->field($model, 'region_id')->dropDownList(Region::getList(), ['class' => 'form-control selectpicker show-tick', 'data-style' => 'form-control', 'id' => 'region_id', 'title' => Yii::t('app', 'Choose One'), 'prompt' => Yii::t('app', 'Any')]); ?> </div> <div class="col-xs-6 col-sm-4 col-md-2"> <?php echo $form->field($model, 'district_id')->widget(DepDrop::classname(), ['data' => District::getList($model->region_id), 'options' => ['class' => 'form-control selectpicker show-tick', 'data-style' => 'form-control', 'id' => 'district_id', 'title' => Yii::t('app', 'Choose One'), 'prompt' => Yii::t('app', 'Any')], 'pluginOptions' => ['depends' => ['region_id'], 'placeholder' => false, 'url' => Url::to(['/ajax/district-list'])], 'pluginEvents' => ['depdrop.afterChange' => "function (event, id, value) { \$('#district_id').selectpicker('refresh'); }"]]); ?> </div> <div class="col-xs-6 col-sm-4 col-md-2"> <?php echo $form->field($model, 'type_id')->dropDownList(Sale::getTypeList(), ['class' => 'form-control selectpicker show-tick', 'data-style' => 'form-control', 'title' => Yii::t('app', 'Choose One'), 'prompt' => Yii::t('app', 'Any')])->label(Yii::t('app', 'Type')); ?> </div> <div class="col-xs-6 col-sm-4 col-md-2"> <?php echo Html::label($model->getAttributeLabel('bedroom')); ?> <div class="row fromto"> <div class="col-xs-6"> <?php echo $form->field($model, 'bedroom_from')->label(false)->textInput(['placeholder' => Yii::t('app', 'From')]);
<?php echo $form->field($model, 'phoneCheckbox')->checkbox(['value' => 1, 'label' => 'Нужен многоканальный номер?', 'onChange' => 'return phoneFun(this.value)']); ?> <div id="phoneDiv" style="display:none"> <?php echo $form->field($model, 'country')->dropDownList(Yii::$app->params['regions'], ['id' => 'country-id']); ?> <?php echo $form->field($model, 'type')->widget(DepDrop::classname(), ['options' => ['id' => 'type-id'], 'pluginOptions' => ['depends' => ['country-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/site/type'])]]); ?> <?php echo $form->field($model, 'subtype')->widget(DepDrop::classname(), ['options' => ['id' => 'subtype-id'], 'pluginOptions' => ['depends' => ['country-id', 'type-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/site/subtype'])]]); ?> </div> <div class="form-group"> <?php echo \yii\helpers\Html::submitButton('Submit', ['class' => 'btn btn-primary']); ?> </div> <? ActiveForm::end(); ?> </div> </div>
<p> <?php echo $form->field($model, 'id')->textInput(['disabled' => 'disabled', 'placeholder' => 'autonumber']); ?> <?php echo $form->field($model, 'number')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'city_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type city', 'depends' => ['rgndistrictform-province_id'], 'url' => Url::to(['/rgn-city/depdrop-options', 'selected' => $model->city_id]), 'loadingText' => 'Loading cities ...']]); ?> <?php echo $form->field($model, 'province_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type province', 'depends' => ['rgndistrictform-country_id'], 'url' => Url::to(['/rgn-province/depdrop-options', 'selected' => $model->province_id]), 'loadingText' => 'Loading provinces ...']]); ?> <?php echo $form->field($model, 'country_id')->widget(Select2::classname(), ['data' => RgnCountry::asOption(), 'pluginOptions' => ['placeholder' => 'Select or type Country', 'multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]]); ?> </p> <?php $this->endBlock(); ?> <?php echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => 'RgnDistrict', 'content' => $this->blocks['main'], 'active' => true]]]); ?> <hr/> <?php
<?php echo Html::hiddenInput('id_kab', $model->kecamatan->id_kab, ['id' => 'id_kab']); ?> <?php echo Html::hiddenInput('id_kec', $model->id_kec, ['id' => 'id_kec']); ?> <?php } ?> <?php echo $form->field($modelKabupaten, 'id_kab')->label('Kabupaten Name')->widget(DepDrop::classname(), ['pluginOptions' => ['depends' => ['provinsi-id_prov'], 'placeholder' => 'Pilih', 'initialize' => true, 'params' => ['id_kab'], 'url' => Url::to(['/api/kabupaten'])]]); ?> <?php echo $form->field($model, 'id_kec')->label('Kecamatan Name')->widget(DepDrop::classname(), ['pluginOptions' => ['depends' => ['kabupaten-id_kab'], 'placeholder' => 'Pilih', 'params' => ['id_kec'], 'url' => Url::to(['/api/kecamatan'])]]); ?> <?php echo $form->field($model, 'nama')->label('Kelurahan Name')->textInput(['maxlength' => true]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success btn-flat btn-lg' : 'btn btn-primary btn-flat btn-lg']); ?> <?php echo Html::resetButton('Cancel', ['class' => 'btn btn-default btn-flat btn-lg']); ?> <?php echo Html::a('Back', ['index'], ['class' => 'btn btn-warning btn-flat btn-lg']);
<div class="site-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <div class="panel panel-success"> <div class="panel-heading">Panel heading without title</div> <div class="panel-body"> <?php $form1 = ActiveForm::begin(['method' => 'post', 'action' => Url::toRoute('site/download')]); $topik = new \common\models\TipeWilayah(); echo $form1->field($topik, 'nama')->widget(Select2::classname(), ['data' => ArrayHelper::map(\common\models\TipeWilayah::find()->all(), 'id', 'nama'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]); // Child level 1 $variabel = new \common\models\Wilayah(); echo $form1->field($variabel, 'nama')->widget(DepDrop::classname(), ['options' => ['placeholder' => 'Select Nama Wilayah...'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['tipewilayah-nama'], 'url' => Url::to(['/site/child']), 'loadingText' => 'Loading child level 1 ...']]); ?> <button class="btn btn-success" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> <span class="glyphicon glyphicon-chevron-down"></span> </button> Tamplate Excel <div class="collapse" id="collapseExample"> <div class="well" style="width:60%"> <?php // echo \Yii::$app->user->identity->id ?> <p>Silakan download tamplate untuk mengimport data ke database.</p> <input type="submit" value="Download" class="btn btn-danger"> </div> </div>
$listdata = ArrayHelper::map(User::find()->all(), 'id', 'last_name'); ?> <?php echo $form->field($model, 'user_id')->dropDownList($listdata, ['class' => 'form-control select', 'prompt' => Yii::t('app', 'Select from list')]); ?> <?php $listdata = ArrayHelper::map(Address::find()->all(), 'id', 'title'); ?> <?php echo $form->field($model, 'address_id')->dropDownList($listdata, ['class' => 'form-control select', 'prompt' => Yii::t('app', 'Select from list')]); ?> <?php echo $form->field($model, 'place_id')->widget(DepDrop::classname(), ['options' => ['id' => 'place_id'], 'pluginOptions' => ['depends' => ['user-address_id'], 'placeholder' => 'Select...', 'url' => Url::to(['/place/list'])]]); ?> <?php echo $form->field($model, 'phone_work')->widget(MaskedInput::classname(), ['mask' => '8 (999) 999-99-99', 'clientOptions' => ['removeMaskOnSubmit' => true]]); ?> <?php echo $form->field($model, 'phone_private')->widget(MaskedInput::classname(), ['mask' => '8 (999) 999-99-99', 'clientOptions' => ['removeMaskOnSubmit' => true]]); ?> <?php echo $form->field($model, 'email_work')->textInput(['maxlength' => 255]); ?>