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]]); }
public function run() { echo $this->form->field($this->model, $this->model->getCountryPropertyName())->dropDownList(ArrayHelper::map(Country::find()->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'), ['id' => 'location_country_id', 'prompt' => Yii::t('common/geo/country', 'Select country')]); if ($this->localized === $this->model->getCountryPropertyName()) { return; } echo $this->form->field($this->model, $this->model->getRegionPropertyName())->widget(DepDrop::className(), ['options' => ['id' => 'location_region_id', 'placeholder' => Yii::t('common/geo/region', 'Select region')], 'data' => ArrayHelper::map(Region::find()->where(['country_id' => $this->model->country_id])->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'), 'pluginOptions' => ['url' => Url::to(['/geo/region/list']), 'depends' => ['location_country_id']]]); if ($this->localized === $this->model->getRegionPropertyName()) { return; } echo $this->form->field($this->model, $this->model->getCityPropertyName())->widget(DepDrop::className(), ['options' => ['id' => 'location_city_id', 'cityholder' => Yii::t('common/geo/city', 'Select city')], 'data' => ArrayHelper::map(City::find()->where(['region_id' => $this->model->region_id])->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'), 'pluginOptions' => ['url' => Url::to(['/geo/city/list']), 'depends' => ['location_region_id']]]); if ($this->localized === $this->model->getCityPropertyName()) { return; } echo $this->form->field($this->model, 'address')->textInput(); }
<?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']);
<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';
'tags' => true, ], ]);*/ ?> <?php echo Html::tag('br'); ?> <?php echo Html::label('Студенты'); ?> <?php echo DepDrop::widget(['name' => 'students', 'id' => 'student_list', 'options' => ['placeholder' => 'Студенты ...', 'multiple' => true], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['group_list'], 'url' => Url::to(['//student/lists']), 'loadingText' => 'Загрузка студентов ...', 'placeholder' => 'Выберите студентов ...']]); ?> <?php /*echo Select2::widget([ 'name' => 'students', 'id' => 'student_list', 'options' => ['placeholder' => 'Выберите студентов ...', 'multiple' => true], 'pluginOptions' => [ 'tags' => true, 'maximumInputLength' => 10 ], ]); */ ?> <?php echo Html::tag('br');
?> </div> <div class="col-md-3"> <?php echo Html::label('Subcategoria', 'subcategoria'); ?> <?php echo \kartik\depdrop\DepDrop::widget(['name' => 'subcategoria', 'id' => 'subcategoria', 'pluginOptions' => ['depends' => ['categoria'], 'loadingText' => 'Cargando...', 'placeholder' => 'Todas', 'url' => Url::to(['comite/subcategorias', 'selected' => $parametros['subcategoria']])]]); ?> </div> <div class="col-md-3"> <?php echo Html::label('Convocatoria', 'convocatoria'); ?> <?php echo \kartik\depdrop\DepDrop::widget(['name' => 'convocatoria', 'id' => 'convocatoria', 'pluginOptions' => ['depends' => ['categoria', 'subcategoria'], 'loadingText' => 'Cargando...', 'placeholder' => 'Todas', 'url' => Url::to(['comite/convocatorias', 'selected' => $parametros['convocatoria']])]]); ?> </div> </div> <div class="row"> <div class="col-md-12"> <?php echo Html::submitButton(Yii::t('app', 'Enviar'), ['class' => 'btn btn-primary pull-right btn-sm', 'style' => 'border-radius: 3px']); ?> </div> </div> <?php ActiveForm::end(); ?> </div>
/** * Renders the city part. */ protected function city() { $this->parts['{city}'] = $this->form->field($this->model, $this->model->getCityPropertyName())->widget(DepDrop::className(), ['options' => ['id' => 'location_city_id', 'cityholder' => Yii::t('jlorente/location', 'Select city')], 'data' => ArrayHelper::map(City::find()->where(['region_id' => $this->model->region_id])->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'), 'pluginOptions' => ['url' => Url::to(["/{$this->module->id}/city/list"]), 'depends' => ['location_region_id']]]); }
<?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>
?> </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, '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]); ?>
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 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 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]]);
<?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
</div> <div class="row"> <div class="col-md-3"> <?php // $form->field($model, 'off_code')->textInput(['maxlength' => true]) ?> <?php echo $form->field($model, 'off_code')->widget(Select2::classname(), ['data' => ArrayHelper::map(Province::find()->where(['BOR_FLAG' => 1])->all(), 'PRV_CODE', 'PRV_DESC'), 'options' => ['placeholder' => 'เลือกจังหวัด ...', 'id' => 'ddl-province-start'], 'pluginOptions' => ['allowClear' => true]])->label(); ?> </div> <div class="col-md-3"> <?php // $form->field($model, 'br_code')->textInput(['maxlength' => true]) ?> <?php echo $form->field($model, 'br_code')->widget(\kartik\depdrop\DepDrop::className(), ['options' => ['id' => 'ddl-borderpoint', 'placeholder' => 'ประจำ ด่านพรมแดน ...'], 'data' => $border_start, 'pluginOptions' => ['depends' => ['ddl-province-start'], 'placeholder' => 'เลือก - ด่านพรมแดน...', 'url' => \yii\helpers\Url::to(['/dep-drop/get-border'])]])->label(); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'emp_id')->textInput(); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'org_code')->textInput(['maxlength' => true]); ?> </div> </div> <div class="panel panel-info">
<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 $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="col-xs-4"><span>ไปยังปลายทางที่จังหวัด</span> <?php echo $form->field($model, 'target_province')->widget(Select2::classname(), ['data' => ArrayHelper::map(Province::find()->all(), 'PRV_CODE', 'PRV_DESC'), 'options' => ['placeholder' => 'เลือกจังหวัด ...', 'id' => 'target-province'], 'pluginOptions' => ['allowClear' => true]])->label(false); ?> </div> </div> <div class="row"> <div class="col-xs-4"><span>ออกจากประเทศไทยที่จังหวัด</span> <?php echo $form->field($model, 'out_province')->widget(Select2::classname(), ['data' => ArrayHelper::map(Province::find()->where(['BOR_FLAG' => 1])->all(), 'PRV_CODE', 'PRV_DESC'), 'options' => ['placeholder' => 'เลือกจังหวัด ...', 'id' => 'ddl-province-out'], 'pluginOptions' => ['allowClear' => true]])->label(false); ?> </div> <div class="col-xs-4"><span>ด่านพรมแดน</span> <?php echo $form->field($model, 'out_border_point')->widget(\kartik\depdrop\DepDrop::className(), ['options' => ['id' => 'ddl-borderpoint-out', 'placeholder' => 'ออก ณ ด่านพรมแดน...'], 'data' => [], 'pluginOptions' => ['depends' => ['ddl-province-out'], 'placeholder' => 'เลือก - ด่านพรมแดน...', 'url' => \yii\helpers\Url::to(['/dep-drop/get-border'])]])->label(false); ?> </div> </div> <?php // $form->field($model, 'request_chanel')->textInput() ?> <?php // $form->field($model, 'dlt_office')->textInput() ?> <?php // $form->field($model, 'dlt_br')->textInput() ?>
<?php $id = null; $person = []; if (!$model->isNewRecord) { $id = ArrayHelper::getValue($model, 'userTo.assignment.itemName.rule_name'); $user_id = ArrayHelper::getValue($model, 'userTo.id'); $name = ArrayHelper::getValue($model, 'userTo.person.full_name'); $person[$user_id] = $name; } ?> <?php echo Html::dropDownList('rule_name', $id, ArrayHelper::map(AuthRule::find()->all(), 'name', 'name'), ['class' => 'form-control', 'id' => 'rule_name', 'prompt' => 'Pilih']); ?> </div> <?php echo $form->field($model, 'task_to')->label('Nama Karyawan')->widget(DepDrop::className(), ['data' => $person, 'pluginOptions' => ['depends' => ['rule_name'], 'url' => Url::to(['/user/api/search-person'])]]); ?> <?php echo $form->field($model, 'task_title')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'task_detail')->widget(TinyMce::className(), ['options' => ['rows' => 6], 'clientOptions' => ['plugins' => [], 'toolbar' => "bold italic | alignleft aligncenter alignright alignjustify | bullist numlist "]]); ?> <?php echo $form->field($model, 'attachment')->fileInput(['class' => "filestyle"]); ?>
<?php echo $form->field($model, 'invoice_id')->widget(\kartik\select2\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(\common\models\Location::find()->active()->all(), 'id', 'fullName'), 'options' => ['prompt' => '', 'id' => 'location-select']]); ?> <?php echo $form->field($model, 'tech_id')->dropDownList(yii\helpers\ArrayHelper::map(\common\models\Tech::find()->contact()->all(), 'contact_id', 'contact.name'), ['prompt' => '']); ?> <?php echo Html::a('<span class="glyphicon glyphicon-plus"></span> New Ticket', ['ticket/create', 'close' => true, 'Ticket' => ['invoice_id' => $model->invoice_id]], ['id' => 'new-ticket-btn', 'class' => 'btn btn-success btn-xs pull-right', 'target' => '_blank']); ?> <?php echo Html::button('<span class="glyphicon glyphicon-refresh"></span>', ['class' => 'btn btn-default btn-xs pull-right', 'title' => 'Refresh tickets for selected location', 'onclick' => '$("#location-select").trigger("depdrop.change")']); ?> <?php echo $form->field($model, 'ticketIds')->widget(\kartik\depdrop\DepDrop::className(), ['type' => \kartik\depdrop\DepDrop::TYPE_SELECT2, 'data' => yii\helpers\ArrayHelper::map(\common\models\Ticket::find()->location($model->invoice_id)->open()->all(), 'id', 'fullName'), 'options' => ['multiple' => true], 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['location-select'], 'url' => Url::to(['/location/ajax-tickets']), 'placeholder' => false], 'pluginEvents' => ['depdrop.change' => 'function(event, id, value, count) { console.log(event, id, value); $("#new-ticket-btn").attr("href", "/ticket/create?close=true" + (value == null ? "" : ("&Ticket%5Binvoice_id%5D=" + value))); }']]); ?> <?php echo $form->field($model, 'start_time')->widget(DateTimePicker::className(), ['pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii:00', 'startDate' => date('Y-m-d'), 'initialDate' => date('Y-m-d H:00:00', strtotime('+1 hour')), 'todayHighlight' => true, 'showMeridian' => true, 'minuteStep' => 15, 'autoclose' => true]]); ?> <?php echo $form->field($model, 'duration')->input('number', ['min' => 15, 'step' => 5]); ?> <?php echo $form->field($model, 'onSite')->checkbox([], false);
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>
<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>
/* @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">
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 $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
<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]); ?>
<?php $ruleItemOptions = null; $itemNameOptions = null; $status = !$model->isNewRecord && !$modelUser->isNewRecord; if ($status) { $ruleItemOptions = [$ruleName => ['Selected' => true]]; $itemNameOptions = [$itemName => $itemName]; } ?> <?php echo $form->field($modelAuthRule, 'name')->label('Divisi')->dropDownList(ArrayHelper::map($authRule, 'name', 'name'), ['prompt' => 'Pilih', 'options' => $ruleItemOptions]); ?> <?php echo $form->field($modelAuthItem, 'name')->label('Jabatan')->widget(DepDrop::className(), ['data' => $status ? $itemNameOptions : ArrayHelper::map($authItem, 'name', 'name'), 'type' => DepDrop::TYPE_SELECT2, 'pluginOptions' => ['depends' => ['authrule-name'], 'placeholder' => 'Tidak Ada', 'url' => Url::to(['/user/api/search-role'])]]); Panel::end(); ?> </div> <div class="col-lg-12" style="margin-left:1%"> <hr/> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord && $modelUser->isNewRecord ? Yii::t('app', '<i class="fa fa-save"></i> Simpan') : Yii::t('app', '<i class="fa fa-edit"></i> Update'), ['class' => $model->isNewRecord && $modelUser->isNewRecord ? 'btn btn-lg btn-success' : 'btn btn-lg btn-primary']); ?> <?php echo Html::resetButton('<i class="fa fa-refresh"></i> ' . Yii::t('app', 'Batal'), ['class' => 'btn btn-lg btn-default']); ?> <?php echo Html::a('<i class="fa fa-arrow-left"></i> ' . Yii::t('app', 'Kembali'), ['index'], ['class' => 'btn btn-lg btn-warning']);