public function run() { FlagIconAsset::register($this->getView()); $locales = []; $languages = []; if (!empty($this->countries)) { array_walk($this->countries, function (&$data) { $data = strtolower($data); }); } $countryRepository = new Country(); $data = $countryRepository->findAll(); foreach ($data as $code => $lang) { if (empty($this->countries) || in_array(strtolower($code), $this->countries)) { $locales[$code] = FlagIcon::flag($code); $languages[$code] = $lang->name['english']['common'] . ' (' . reset($lang->name['native'])['common'] . ')'; } } $format = ' function format(state) { var locales = ' . Json::encode($locales) . '; if (!state.id) { return state.text; } return locales[state.id] + " " + state.text; }'; $escape = new JsExpression('function(m) { return m; }'); $this->getView()->registerJs($format, View::POS_HEAD); $this->options = array_merge(['placeholder' => Yii::$app->translate->t('Choose country')], $this->options); $pluginOptions = array_merge(['templateResult' => new JsExpression('format'), 'templateSelection' => new JsExpression('format'), 'escapeMarkup' => $escape], $this->pluginOptions); $pluginEvents = array_merge([], $this->pluginEvents); return Select2::widget(['model' => $this->model, 'attribute' => $this->attribute, 'name' => $this->name, 'value' => $this->value, 'options' => $this->options, 'data' => $languages, 'pluginOptions' => $pluginOptions, 'pluginEvents' => $pluginEvents]); }
/** * @inheritdoc */ public function run() { FlagIconAsset::register($this->getView()); $locales = []; $ids = []; $countryRepository = new Country(); $data = $countryRepository->findAll(); foreach ($this->currencies as $value) { $key = $value->id; if (!empty($value->country_flag)) { $locales[$key] = FlagIcon::flag($value->country_flag); } else { // iterate data (countries list) to find country code with defined ($value->code) currency foreach ($data as $code => $country_value) { if (strcasecmp($country_value->currency['code'], $value->code) == 0) { $locales[$key] = FlagIcon::flag($code); break; } } } $ids[$key] = $value->code; } $currencyFormat = 'function currencyFormat(state) { var locales = ' . Json::encode($locales) . '; if (!state.id) { return state.text; } return locales[state.id] + " " + state.text; }'; $escape = new JsExpression('function(m) { return m; }'); $this->getView()->registerJs($currencyFormat, View::POS_HEAD); $this->options = array_merge(['placeholder' => Yii::$app->translate->t('select currency')], $this->options); $pluginOptions = array_merge(['templateResult' => new JsExpression('currencyFormat'), 'templateSelection' => new JsExpression('currencyFormat'), 'escapeMarkup' => $escape], $this->pluginOptions); $pluginEvents = array_merge([], $this->pluginEvents); return Select2::widget(['model' => $this->model, 'attribute' => $this->attribute, 'name' => $this->name, 'value' => $this->value, 'options' => $this->options, 'data' => $ids, 'pluginOptions' => $pluginOptions, 'pluginEvents' => $pluginEvents]); }
public function init() { if ($this->placeholder_from_label) { $placeholder = $this->model->getAttributeLabel($this->attribute); } else { $placeholder = $this->placeholder ?: __('Select a tags...'); } $this->options = ['placeholder' => $placeholder]; $attribute = $this->attribute; $this->attribute = $attribute . 'Str'; $models = Tag::find()->{$attribute}()->all(); $tags = []; foreach ($models as $model) { $tags[] = $model->name; } $this->pluginOptions = ['tags' => $tags, 'tokenSeparators' => [',', ';'], 'maximumInputLength' => 64, 'allowClear' => true]; parent::init(); }
/** * Initializes the widget * * @throw InvalidConfigException */ public function init() { if (empty($this->pluginOptions['url'])) { throw new InvalidConfigException("The 'pluginOptions[\"url\"]' property has not been set."); } if (empty($this->pluginOptions['depends']) || !is_array($this->pluginOptions['depends'])) { throw new InvalidConfigException("The 'pluginOptions[\"depends\"]' property must be set and must be an array of dependent dropdown element ID."); } if (empty($this->options['class'])) { $this->options['class'] = 'form-control'; } parent::init(); if ($this->type !== self::TYPE_SELECT2 && !empty($this->options['placeholder'])) { $this->data = ['' => $this->options['placeholder']] + $this->data; } if ($this->type === self::TYPE_SELECT2 && (!empty($this->options['placeholder']) || !empty($this->select2Options['options']['placeholder']))) { $this->pluginOptions['placeholder'] = ''; } elseif ($this->type === self::TYPE_SELECT2 && !empty($this->pluginOptions['placeholder']) && $this->pluginOptions['placeholder'] !== false) { $this->options['placeholder'] = $this->pluginOptions['placeholder']; $this->pluginOptions['placeholder'] = ''; } $this->_view = $this->getView(); $this->registerAssets(); if ($this->type === self::TYPE_SELECT2) { if (empty($this->data)) { $this->data = ['' => '']; } if ($this->hasModel()) { $settings = ArrayHelper::merge($this->select2Options, ['model' => $this->model, 'attribute' => $this->attribute, 'data' => $this->data, 'options' => $this->options]); } else { $settings = ArrayHelper::merge($this->select2Options, ['name' => $this->name, 'value' => $this->value, 'data' => $this->data, 'options' => $this->options]); } echo Select2::widget($settings); $id = 'jQuery("#' . $this->options['id'] . '")'; $text = ArrayHelper::getValue($this->pluginOptions, 'loadingText', 'Loading ...'); $this->_view->registerJs("{$id}.on('depdrop.beforeChange',function(e,i,v){{$id}.select2('data',{text: '{$text}'});});"); $this->_view->registerJs("{$id}.on('depdrop.change',function(e,i,v,c){{$id}.select2('val',{$id}.val());});"); } else { echo $this->getInput('dropdownList', true); } }
<?php use yii\helpers\Html; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\Select2; /** * @var yii\web\View $this * @var common\models\empresa\Osconfemp $model * @var yii\widgets\ActiveForm $form */ ?> <div class="osconfemp-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['coe_nombre' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\yii\\widgets\\MaskedInput', 'options' => ['mask' => 'A{3,10}9{0,5}']], 'coe_descri' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Descripción...', 'maxlength' => 60]], 'coe_tipo' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::classname(), 'options' => ['data' => Yii::$app->orcsis->getOpcTab($model->tableName(), 'coe_tipo'), 'options' => ['placeholder' => 'Enter Tipo de Dato...']]], 'coe_data' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Enter Coe Data...', 'rows' => 6]]]]); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ActiveForm::end(); ?> </div>
?> <?php echo $form->field($model, 'cargaHoraria')->textInput(['type' => 'number']); ?> <?php echo $form->field($model, 'palestrante_idPalestrante')->widget(Select2::classname(), ['data' => $arrayPalestrante, 'options' => ['placeholder' => 'Selecione um palestrante ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <p><?php echo Html::a('Novo Palestrante', ['palestrante/index'], ['class' => 'btn btn-primary']); ?> <p> <?php echo $form->field($model, 'local_idlocal')->widget(Select2::classname(), ['data' => $arrayLocal, 'options' => ['placeholder' => 'Selecione um Local ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <p><?php echo Html::a('Novo Local', ['local/index'], ['class' => 'btn btn-primary']); ?> <p> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Criar Item de Programação' : 'Salvar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
?> <?php //= $form->errorSummary($model); ?> <?php echo $form->field($roDetail, 'CREATED_AT', ['template' => "{input}"])->hiddenInput(['value' => date('Y-m-d H:i:s'), 'readonly' => true]); ?> <?php echo $form->field($roDetail, 'KD_CORP')->dropDownList($userCorp, ['id' => 'rodetail-kd_corp', 'prompt' => ' -- Pilih Salah Satu --'])->label('Perusahaan'); echo $form->field($roDetail, 'KD_TYPE')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $brgType, 'options' => ['id' => 'rodetail-kd_type'], 'pluginOptions' => ['depends' => ['rodetail-kd_corp'], 'url' => Url::to(['/purchasing/sales-order/corp-type']), 'initialize' => true]])->label('Type'); echo $form->field($roDetail, 'KD_KATEGORI')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $brgKtg, 'options' => ['id' => 'rodetail-kd_kategori'], 'pluginOptions' => ['depends' => ['rodetail-kd_corp', 'rodetail-kd_type'], 'url' => Url::to(['/purchasing/sales-order/type-kat']), 'initialize' => true]]); echo $form->field($roDetail, 'KD_BARANG')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $brgProdak, 'options' => ['id' => 'rodetail-kd_barang'], 'pluginOptions' => ['depends' => ['rodetail-kd_kategori'], 'url' => Url::to(['/purchasing/sales-order/brgkat']), 'initialize' => true]]); echo $form->field($roDetail, 'NM_BARANG')->hiddenInput(['value' => ''])->label(false); echo $form->field($roDetail, 'UNIT')->widget(Select2::classname(), ['data' => $brgUnit, 'options' => ['placeholder' => 'Pilih Unit Barang ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($roDetail, 'RQTY')->textInput(['maxlength' => true, 'placeholder' => 'Jumlah Barang']); ?> <?php echo $form->field($roDetail, 'NOTE')->textarea(array('rows' => 2, 'cols' => 5))->label('Informasi'); ?> <div class="form-group"> <?php echo Html::submitButton($roDetail->isNewRecord ? 'Create' : 'Update', ['class' => $roDetail->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
<?php echo $form->field($model, 'date_input')->textInput(); ?> <?php echo $form->field($model, 'last_update')->textInput(); ?> <?php echo $form->field($model, 'last_staff')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'risk_status')->widget(Select2::classname(), ['data' => ArrayHelper::map(Status::find()->all(), 'STATUS_ID', 'STATUS_NAME'), 'options' => ['placeholder' => 'เลือกสถานะของรายการ ...'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="form-group field-upload_files"> <label class="control-label" for="upload_files[]"> ภาพถ่าย </label> <div> <?php echo FileInput::widget(['name' => 'upload_ajax[]', 'options' => ['multiple' => true, 'accept' => 'image/*'], 'pluginOptions' => ['overwriteInitial' => false, 'initialPreviewShowDelete' => true, 'initialPreview' => $initialPreview, 'initialPreviewConfig' => $initialPreviewConfig, 'uploadUrl' => Url::to(['/priskhead/upload-ajax']), 'uploadExtraData' => ['ref' => $model->ref], 'maxFileCount' => 100]]); ?> </div> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => ($model->isNewRecord ? 'btn btn-success' : 'btn btn-primary') . ' btn-lg btn-block']);
?> <?php echo $form->field($model, 'identification_type', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$identificationType); ?> <?php echo $form->field($model, 'marital_status', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$maritalStatus); ?> <?php echo $form->field($model, 'identification_number', ['options' => ['class' => 'col-xs-6']])->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'social_security_number', ['options' => ['class' => 'col-xs-6']])->widget(MaskedInput::className(), ['mask' => '999-99-9999']); ?> <?php echo $form->field($model, 'identification_state', ['options' => ['class' => 'col-xs-6 padding-right0']])->widget(Select2::classname(), ['data' => ArrayHelper::map(State::find()->all(), 'abbreviation', 'abbreviation'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'identification_expiration_date', ['options' => ['class' => 'col-xs-6']])->label('ID Expiration Date')->widget(DatePicker::classname(), ['type' => DatePicker::TYPE_COMPONENT_PREPEND, 'removeButton' => false, 'options' => ['value' => $model->identification_expiration_date ? date('m/d/Y', $model->identification_expiration_date) : ''], 'pluginOptions' => ['autoclose' => true, 'format' => 'mm/dd/yyyy']]); ?> <?php echo $form->field($model, 'occupation', ['options' => ['class' => 'col-xs-6']])->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'employer', ['options' => ['class' => 'col-xs-6']])->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'total_annual_income', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$totalAnnualIncome); ?> <?php echo $form->field($model, 'years_with_advisor', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$yearsWithAdvisor);
'pluginOptions' => [ 'allowClear' => true, 'multiple'=>true ], ]);?> --> <?php $options = ['multiple' => true]; // echo $form->field($model, $attribute)->listBox($items, $options); echo $form->field($model, 'DEP_SUB_ID')->widget(DualListbox::className(), ['items' => $dep, 'options' => $options, 'clientOptions' => ['moveOnSelect' => false, 'selectedListLabel' => 'Selected Items', 'nonSelectedListLabel' => 'Available Items']]); ?> <?php echo $form->field($model, 'DESTINATION_TO')->widget(Select2::classname(), ['data' => $dropemploy, 'options' => ['placeholder' => 'Pilih Karyawan ...'], 'pluginOptions' => ['allowClear' => true]]); $options = ['multiple' => true]; // echo $form->field($model, $attribute)->listBox($items, $options); echo $form->field($model, 'USER_CC')->widget(DualListbox::className(), ['items' => $dropemploy, 'options' => $options, 'clientOptions' => ['moveOnSelect' => false, 'selectedListLabel' => 'Selected Items', 'nonSelectedListLabel' => 'Available Items']]); ?> <?php echo $form->field($model, 'PLAN_DATE1')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter...', 'value' => $tgl], 'pluginOptions' => ['autoclose' => true], 'pluginEvents' => ['show' => "function(e) {show}"]]); ?> <?php echo $form->field($model, 'PLAN_DATE2')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter...', 'value' => $tgl_1], 'pluginOptions' => ['autoclose' => true], 'pluginEvents' => ['show' => "function(e) {show}"]]); ?>
/** * @param null $options * @param null $pluginOptions * * @return string * @throws \Exception */ public function getItem($options = null, $pluginOptions = null) { switch ($this->type) { case self::TYPE_TEXT: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_EMAIL: return Html::input('email', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_NUMBER: return Html::input('number', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_TEXTAREA: return Html::textarea('Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_COLOR: return ColorInput::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'options' => $options != null ? $options : ['class' => 'form-control']]); case self::TYPE_DATE: return DatePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]); case self::TYPE_TIME: return TimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['minuteStep' => 1, 'showSeconds' => true, 'showMeridian' => false]]); case self::TYPE_DATETIME: return DateTimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['format' => 'yyyy-mm-dd H:i:s', 'todayHighlight' => true]]); case self::TYPE_PASSWORD: return PasswordInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['showMeter' => true, 'toggleMask' => false]]); case self::TYPE_ROXYMCE: return RoxyMceWidget::widget(['id' => 'Setting_' . $this->code, 'name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'action' => Url::to(['roxymce/default']), 'options' => $options != null ? $options : ['title' => $this->getName()], 'clientOptions' => $pluginOptions != null ? $pluginOptions : []]); case self::TYPE_SELECT: return Select2::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'data' => $this->getStoreRange(), 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_MULTI_SELECT: $options['multiple'] = true; if (!isset($options['class'])) { $options['class'] = 'form-control'; } return Select2::widget(['name' => 'Setting[' . $this->code . ']', 'value' => explode(",", $this->value), 'data' => $this->getStoreRange(), 'options' => $options, 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_FILE_PATH: $value = Yii::getAlias($this->store_dir) . DIRECTORY_SEPARATOR . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control', 'multiple' => false], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreview' => !$this->isNewRecord ? [$this->value] : []]]); case self::TYPE_FILE_URL: $value = $this->store_url . '/' . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreviewAsData' => true, 'initialPreviewFileType' => self::fileType(pathinfo($this->value, PATHINFO_EXTENSION)), 'initialPreview' => !$this->isNewRecord ? $value : [], 'initialCaption' => $this->value]]); case self::TYPE_PERCENT: return RangeInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'html5Options' => ['min' => 0, 'max' => 100, 'step' => 1], 'options' => $options != null ? $options : ['class' => 'form-control'], 'addon' => ['append' => ['content' => '%']]]); case self::TYPE_SWITCH: $selector = explode(',', $this->store_range); if (count($selector) != 2) { throw new ErrorException(Yii::t('setting', 'Switch Field should have store with 2 value, and negative is first. Example: no,yes'), 500); } return Html::hiddenInput('Setting[' . $this->code . ']', $selector[0]) . SwitchInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $selector[1], 'containerOptions' => ['class' => 'nv-switch-container'], 'options' => $options != null ? $options : [], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['state' => $this->value == $selector[1], 'size' => 'small', 'offText' => ucfirst($selector[0]), 'onText' => ucfirst($selector[1])]]); case self::TYPE_CHECKBOX: $random = rand(1000, 9999); return Html::checkboxList('Setting[' . $this->code . ']', explode(",", $this->value), $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list checkbox', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::checkbox($name, $checked, ['id' => 'Setting_checkbox_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_checkbox_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_RADIO: $random = rand(1000, 9999); return Html::radioList('Setting[' . $this->code . ']', $this->value, $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list radio', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::radio($name, $checked, ['id' => 'Setting_radio_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_radio_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_SEPARATOR: return '<hr>'; default: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); } }
?> <div class="row"> <div class="col-sm-12"> <?php echo Html::submitButton('保 存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-info']); ?> </div> </div> <?php echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 6, 'attributes' => ['personal_id' => ['type' => Form::INPUT_HIDDEN, 'label' => false, 'columnOptions' => ['colspan' => 0]], 's_date' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入登记日期..', 'maxlength' => 8]], 'code1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工编码..', 'maxlength' => 36]], 'name1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工姓名..', 'maxlength' => 50]]]]); ?> </div> <div class="col-sm-12"> <?php echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['fcode' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fcode', 'placeholder' => '身份证号', 'maxlength' => 18]], 'sex' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('psex'), 'options' => ['id' => 'p-sex', 'readOnly' => true]], 'birthdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-birthdate', 'placeholder' => '请输入出生日期..', 'maxlength' => 8, 'readOnly' => true]], 'unit' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-unit', 'readOnly' => true, 'maxlength' => 30]], 'flag' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pflag'), 'options' => ['placeholder' => 'Enter Flag...', 'maxlength' => 2]], 'hkxz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('chkxz'), 'options' => ['placeholder' => 'Enter Hkxz...', 'maxlength' => 2]], 'marry' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmarry'), 'options' => ['id' => 'p-marry', 'placeholder' => 'Enter Marry...', 'maxlength' => 2]], 'marrydate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-marrydate', 'placeholder' => 'Enter Marrydate...', 'maxlength' => 8]], 'memo1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmemo1'), 'options' => ['placeholder' => 'Enter Memo1...', 'maxlength' => 2]], 'selfno' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Selfno...']], 'lhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-lhdate', 'placeholder' => 'Enter Lhdate...', 'maxlength' => 8]], 'zhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-zhdate', 'maxlength' => 8]], 'work1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pwork1'), 'options' => ['placeholder' => 'Enter Work1...', 'maxlength' => 2]], 'childnum' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Childnum...']], 'obect1' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmark('pobect1'), 'options' => ['placeholder' => '--请选择--'], 'pluginOptions' => ['allowClear' => true]]], 'fhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fhdate', 'maxlength' => 8]], 'mz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmz'), 'options' => ['placeholder' => 'Enter Mz...', 'maxlength' => 2]], 'whcd' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pwhcd'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-whcd', 'data-classmark' => 'pwhcd', 'data-classmarkcn' => '文化程度'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'title' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('ptitle'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-title', 'data-classmark' => 'ptitle', 'data-classmarkcn' => '职称'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'zw' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('awork1'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-zw', 'data-classmark' => 'awork1', 'data-classmarkcn' => '职务'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'is_dy' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pis_dy'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-is_dy', 'data-classmark' => 'pis_dy', 'data-classmarkcn' => '政治面貌'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'onlysign' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('ponlysign'), 'options' => ['placeholder' => 'Enter Onlysign...', 'maxlength' => 2]], 'tel' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Tel...', 'maxlength' => 50]], 'jobdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Jobdate...', 'maxlength' => 8]], 'address1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Address1...', 'maxlength' => 80]], 'grous' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pgrous'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-grous', 'data-classmark' => 'pgrous', 'data-classmarkcn' => '所属街道'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'ingoingdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Ingoingdate...', 'maxlength' => 8]]]]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['hkaddr' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Hkaddr...', 'maxlength' => 80]], 'logout' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('plogout'), 'options' => ['placeholder' => 'Enter Logout...']], 'e_date' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter E Date...', 'maxlength' => 8]]]]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['memo' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Memo...', 'maxlength' => 254]], 'checktime' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pchecktime'), 'options' => ['id' => 'p-checktime', 'placeholder' => 'Enter Checktime...', 'maxlength' => 2]]]]); ActiveForm::end(); ?> </div> </div> </div> <?php \common\widgets\JsBlock::begin(); ?> <script type="text/javascript"> //身份证合法性 function certificateNoParse(certificateNo){
<div class="tmaster-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'nolphsp')->textInput(['maxlength' => 6]); ?> <?php echo $form->field($model, 'tgllhpsp')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($model, 'idkapal')->widget(Select2::classname(), ['data' => ArrayHelper::map(Kapal::find()->all(), 'kapal_id', 'kapal_nama'), 'language' => 'en', 'options' => ['placeholder' => 'Pilih Kapal ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'voy')->textInput(['maxlength' => 20]); ?> <?php echo $form->field($model, 'idagen')->dropDownList(ArrayHelper::map(Tagen::find()->all(), 'id', 'namaagen'), ['prompt' => 'pilih negara pelabuhan asal']); ?> <?php echo $form->field($model, 'idpelasal')->dropDownList(ArrayHelper::map(Tnegpelabuhan::find()->all(), 'idpel', 'negarapelabuhan'), ['prompt' => 'pilih negara pelabuhan asal']);
use kartik\widgets\Select2; use yii\helpers\Html; use yii\helpers\Url; use yii\web\JsExpression; use yii\widgets\ActiveForm; ?> <div class="city-form"> <?php $form = ActiveForm::begin(['id' => 'city-form']); ?> <hr> <?php echo $form->field($model, 'name')->widget(Select2::className(), ['size' => Select2::MEDIUM, 'language' => 'ru', 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => Url::to(['/city/city/city-list']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function(city) { return city.text; }'), 'templateSelection' => new JsExpression('function (city) { return city.text; }')]]); ?> <hr> <div class="form-group"> <?php echo Html::submitButton('Создать', ['class' => 'btn btn-success']); ?> <?php echo Html::button('Закрыть', ['class' => 'btn btn-default', 'data-dismiss' => 'modal']); ?> </div> <?php ActiveForm::end(); ?>
<div class="col-md-6"> <?php echo $form->field($model, 'title'); ?> </div> <!--?= $form->field($model, 'file') ?--> <div class="col-md-6"> <!--?= $form->field($model, 'share_to') ?--> <?php $usr = User::find()->all(); $usrs = ArrayHelper::map($usr, function ($model) { return $model->_id->{'$id'}; }, 'username'); echo $form->field($model, 'share_to')->label('Share To')->widget(Select2::classname(), ['data' => $usrs, 'options' => ['placeholder' => 'Select User', 'id' => 'file_id'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> </div> <div class="row"> <div class="col-md-8"> <!--?= $form->field($model, 'file')->fileInput() ?--> <?php echo $form->field($model, 'file')->widget(FileInput::classname(), ['options' => ['accept' => 'file/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showUpload' => false]]); ?> </div> <?php $model->status = 1; ?> <?php
?> <?php echo $form->field($model, 'title')->label(false)->textInput(['placeholder' => 'freetext search']); ?> <?php if (isset($afterSearchTextCallback)) { call_user_func($afterSearchTextCallback, $this, $form, $model); } echo $form->field($model, 'date_published', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>']], 'options' => ['class' => 'drp-container form-group']])->widget(DateRangePicker::classname(), ['useWithAddon' => true, 'convertFormat' => true, 'presetDropdown' => true, 'pluginOptions' => ['locale' => ['format' => 'd M Y', 'separator' => ' to '], 'opens' => 'left']]); if (isset($afterSearchCalendarCallback)) { call_user_func($afterSearchCalendarCallback, $this, $form, $model); } // Normal select with ActiveForm & model echo $form->field($model, 'keywords')->widget(Select2::classname(), ['id' => 'search-label', 'data' => \humanized\scoopit\models\gui\SearchLabel::getSelectData(), 'options' => ['placeholder' => 'Select keywords ...'], 'pluginOptions' => ['multiple' => true, 'allowClear' => true]])->label(false); if (isset($afterSearchKeywordCallback)) { call_user_func($afterSearchKeywordCallback, $this, $form, $model); } ?> <div class="form-group"> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']); ?> <?php echo Html::resetButton('Reset', ['class' => 'btn btn-default']); ?> </div> <?php
use yii\helpers\Html; use kartik\widgets\ActiveForm; use kartik\widgets\DatePicker; use yii\helpers\ArrayHelper; use kartik\widgets\Select2; use lukisongroup\master\models\Nmperusahaan; $addressCorp = ArrayHelper::map(Nmperusahaan::find()->orderBy('NM_ALAMAT')->all(), 'ID', 'NM_ALAMAT'); ?> <?php $form = ActiveForm::begin(['id' => 'frm-bil-proccess', 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'method' => 'post', 'action' => ['/purchasing/purchase-order/billing-save']]); ?> <?php //echo $form->field($poHeaderVal, 'bILLING')->textInput()->label('Billing'); echo $form->field($poHeaderVal, 'bILLING')->widget(Select2::classname(), ['data' => $addressCorp, 'options' => ['placeholder' => 'Select Address for Billing ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($poHeaderVal, 'kD_PO')->hiddenInput(['value' => $poHeader->KD_PO, 'maxlength' => true, 'readonly' => true])->label(false); ?> <div style="text-align: right;""> <?php echo Html::submitButton('simpan', ['class' => 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
$data1 = Terminvest::find()->all(); $to1 = "ID"; $from1 = "INVES_TYPE"; $config = ['template' => "{input}\n{error}\n{hint}"]; ?> <?php $form = ActiveForm::begin(['id' => $budget->formName(), 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'validationUrl' => Url::toRoute('/master/term-customers/valid-inves')]); ?> <?php echo $form->field($budget, 'ID_TERM')->hiddenInput(['value' => $id])->label(false); ?> <?php echo $form->field($budget, 'INVES_TYPE')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Type Investasi ...'], 'data' => $budget->data($data1, $to1, $from1)]); ?> <?php echo $form->field($budget, 'PERIODE_START')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Dari ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy'], 'pluginEvents' => ['show' => "function(e) {errror}"]]); ?> <?php echo $form->field($budget, 'PERIODE_END')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Sampai'], 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy'], 'pluginEvents' => ['show' => "function(e) {error}"]]); ?> <?php echo $form->field($budget, 'PROGRAM')->textArea(['options' => ['rows' => 5]]); ?> <?php
\$('#mod_entity_type_add').on('click',opencentitytypemod); MODALJS; $this->registerJs($modalJS); ?> <div class="entity-form"> <?php $form = ActiveForm::begin(['id' => 'EntityCreateForm', 'action' => Url::to(['/entity/default/create'])]); ?> <div class="row"> <div class="col-md-12"> <?php echo $form->field($model, 'entity_type_id')->widget(Select2::classname(), ['data' => EntityType::pdEntityType(), 'options' => ['placeholder' => 'Entity Type...'], 'addon' => ['prepend' => ['content' => Html::icon('globe')], 'append' => ['content' => Html::button(Html::icon('plus'), ['class' => 'btn btn-default', 'id' => 'mod_entity_type_add', 'title' => 'add new entity', 'data-toggle' => 'tooltip', 'href' => Url::to(['/entity/entity-type/create'])]), 'asButton' => true]], 'pluginOptions' => ['allowClear' => true]]); ?> </div> </div> <div class="row"> <div class="col-md-6"> <?php echo $form->field($model, 'prename')->textInput(['maxlength' => 100]); ?> </div> <div class="col-md-6"> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 140]); ?> </div>
$this->title = 'Lista de produtos de venda por insumo'; ?> <div class="produto-view"> <h1><?= Html::encode($this->title) ?></h1> <?php $form = ActiveForm::begin(); ?> <?= '<label class="control-label">Insumo</label>'; ?> <?= Select2::widget([ 'name' => 'idinsumo', 'data' => $insumos, 'options' => [ 'required' => true, 'placeholder' => 'Digite o insumo', // 'multiple' => true ], ]); ?> </br> <div class="form-group"> <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary btn-block', 'title' => 'Clique para listar os produtos do Insumo selecionado',]) ?> </div> <?php ActiveForm::end(); ?> <div class="panel panel-default"> <?php if (isset($produtosVenda)) {
$form->field($model, 'idcliente')->widget(Select2::classname(), [ 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 2, 'ajax' => [ 'url' => $url_cliente, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {search:params.term};}') ], ], 'options' => ['placeholder' => 'Selecione um cliente...'], ]) ?> </div> <div class="col-md-4"><?= $form->field($model, 'valor')->widget(MaskMoney::classname()) ?></div> <?= $form->field($model, 'forma_pagamento_id')->widget(Select2::classname(), [ 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 2, 'ajax' => [ 'url' => $url_forma_pagamento, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {search:params.term};}') ], ], 'options' => ['placeholder' => 'Selecione um cliente...'], ]) ?> </div> <div class="row"> <div class="col-md-4"><?= $form->field($model, 'data_vencimento')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]) ?></div> <div class="col-md-4"><?= $form->field($model, 'data_pagamento')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]) ?></div>
<?php echo $form->field($model, 'action')->widget(Select2::className(), ['data' => $model->setting('actions'), 'theme' => Select2::THEME_KRAJEE, 'options' => ['id' => 'alert-action' . $uniqid, 'placeholder' => 'Alert me...', "allowClear" => true]])->label("Action"); ?> <?php echo $form->field($model, 'remote_type')->widget(DepDrop::className(), ['value' => $model->remote_type, 'data' => [$model->remote_type => $model->properName($model->remote_type)], 'options' => ['placeholder' => ' select something ', 'id' => 'alert-type' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-remote-type' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-action' . $uniqid], 'url' => Url::to(['/alerts/list/types']), 'loadingText' => '...', 'placeholder' => ' type of ']])->label("Remote Type"); ?> <?php echo $form->field($model, 'remote_for')->widget(DepDrop::className(), ['value' => $model->remote_for, 'data' => [$model->remote_for => $model->properName($model->remote_for)], 'options' => ['placeholder' => ' for ', 'id' => 'alert-for' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-remote-type' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-type' . $uniqid], 'url' => Url::to(['/alerts/list/for']), 'loadingText' => '...', 'placeholder' => ' and it\'s for a/an ']])->label("Remote For"); ?> <?php echo $form->field($model, 'priority')->widget(DepDrop::className(), ['value' => $model->priority, 'data' => [$model->priority => $model->properName($model->priority)], 'options' => ['placeholder' => ' and it if has a priority of ', 'id' => 'priority' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-priority' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-type' . $uniqid], 'url' => Url::to(['/alerts/list/priority']), 'loadingText' => '...', 'placeholder' => ' and has a proiority of ']])->label("Priority"); ?> <?php echo $form->field($model, 'methods')->widget(Select2::className(), ['value' => explode(',', $model->methods), 'options' => ['id' => 'alert-methods' . $uniqid, 'placeholder' => ' then alert me using'], 'data' => \nitm\helpers\alerts\DispatcherData::supportedMethods()])->label("Priority"); ?> <?php if (!\Yii::$app->request->isAjax) { ?> <div class="btn-group"> <?php echo Html::submitButton(ucfirst($action), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php } ?>
use yii\helpers\Html; use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model backend\models\Helpdoc */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="helpdoc-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'upid')->widget(\kartik\widgets\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(\backend\models\Helpdoc::findAll(['status' => 1]), 'id', 'title'), 'options' => ['placeholder' => '请选择上级标题'], 'pluginOptions' => ['allowClear' => true, 'tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 50]]); ?> <?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'tagNames')->widget(\dosamigos\selectize\SelectizeTextInput::className(), ['loadUrl' => ['tag/list'], 'options' => ['class' => 'form-control'], 'clientOptions' => ['plugins' => ['remove_button'], 'valueField' => 'name', 'labelField' => 'name', 'searchField' => ['name'], 'create' => true]])->hint('提示:用逗号或者回车键分隔标签'); ?> <?php echo $form->field($model, 'content')->widget(\kucha\ueditor\UEditor::className(), ['clientOptions' => ['initialFrameHeight' => '200', 'lang' => 'zh-cn', 'toolbars' => [['fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|']]]]); ?> <?php
], ]);*/ echo Html::activeLabel($models[$i], $idprodutoInsumo, ['class'=>'control-label']); echo Select2::widget([ 'model'=>$models[$i], 'name' =>'Insumos[idprodutoInsumo][]', 'value' => $models[$i]->idprodutoInsumo, // initial value 'data' => $insumos, 'options' => ['placeholder' => 'Selecione o insumo', 'id'=>'idinsumo'.$i, ], 'pluginOptions' => [ 'allowClear'=>true, ], 'pluginEvents'=>[ "change" => "function() { var s = $(\"#idinsumo".$i."\").val(); console.log(s); if (s == \"\" || s == null) { $(\".help-block-insumo".$i."\").append('</br><div class=\"alert alert-danger\">\"Insumo\" não pode ficar em branco.</div>'); //alert('Escolha um insumo ou remova-o'); }else{ $(\".help-block-insumo".$i."\").remove(); } }", ], ]); ?><div class="help-block-insumo<?= $i?>"> </div><?php echo "</br>"; echo $form->field($models[$i], $quantidade)->textInput([ 'type' => 'number',
?> <?php echo $form->field($model, 'id', ['template' => '{input}'])->textInput(['style' => 'display:none']); ?> <?php $template = '<div><p class="nikkes">{{value}}</p></div>'; echo $form->field($model, 'nikkes')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Ketik NIKKES yang diinginkan'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'templates' => ['notFound' => '<div class="text-danger" style="padding:0 8px"> Nikkes tidak terdaftar </div>', 'suggestion' => new JsExpression("Handlebars.compile('{$template}')")], 'remote' => ['url' => Url::to(['peserta/get-nikkes-list']) . '?q=%QUERY', 'wildcard' => '%QUERY'], 'limit' => 10]]]); ?> <?php echo $form->field($model, 'hak_kacamata_id')->widget(Select2::classname(), ['data' => $model->hakkacamataList, 'options' => ['placeholder' => 'Please Choose One', 'disabled' => true], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'tgl_ambil')->widget(\kartik\widgets\DatePicker::classname(), ['options' => ['placeholder' => 'Choose Tanggal Pengambilan'], 'type' => \kartik\widgets\DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]); ?> <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();
// $dropdis = ArrayHelper::map(\lukisongroup\master\models\Distributor::find()->all(), 'KD_DISTRIBUTOR', 'NM_DISTRIBUTOR'); $config = ['template' => "{input}\n{error}\n{hint}"]; // $dropparent = ArrayHelper::map(\lukisongroup\master\models\Kategori::find()->all(),'CUST_KTG_PARENT', 'CUST_KTG_NM'); // $dropparentkategori = ArrayHelper::map(Kategoricus::find()->where('CUST_KTG_PARENT = CUST_KTG') // ->asArray() // ->all(),'CUST_KTG', 'CUST_KTG_NM'); // $droppro = ArrayHelper::map(Province::find()->asArray() // ->all(),'PROVINCE_ID','PROVINCE'); $form = ActiveForm::begin(['id' => $model->formName(), 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'validationUrl' => Url::toRoute('/master/customers/valid')]); echo $form->field($model, 'parentnama')->checkbox(); echo $form->field($model, 'CUST_NM', $config)->widget(LabelInPlace::classname()); echo $form->field($model, 'ALAMAT', $config)->widget(LabelInPlace::classname()); ?> <div id="grp"> <?php echo $form->field($model, 'CUST_GRP')->widget(Select2::classname(), ['data' => $parent, 'options' => ['id' => 'customers-cust_grp', 'placeholder' => 'Pilih Group Customers ...'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <?php echo $form->field($model, 'TLP1', $config)->widget(LabelInPlace::classname()); // echo $form->field($model, 'PROVINCE_ID')->widget(Select2::classname(),[ // 'options'=>[ // 'id'=>'customers-province_id', // 'placeholder' => 'Select provinsi ...' // ], // 'data' => $droppro // ]); // // echo $form->field($model, 'CITY_ID')->widget(DepDrop::classname(), [ // 'options' => ['id'=>'customers-city_id', // 'placeholder' => 'Select Kota'],
use yii\helpers\Url; use evgeniyrru\yii2slick\Slick; /* @var $this yii\web\View */ $this->title = 'EMTOL - бронирование экскурсий'; $this->params['fluid'] = true; ?> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel" data-interval="false" data-pause="false"> <div class="container"> <div class="tour-form"> <?php NavBar::begin(); $form = ActiveForm::begin(['method' => 'post', 'action' => ['/tour/index'], 'options' => ['class' => 'form-inline']]); ?> <?php echo $form->field($model, 'search_data', ['options' => ['class' => 'search-data form-group']])->widget(Select2::classname(), ['data' => $data, 'options' => ['placeholder' => 'Введите ключевые слова...'], 'pluginOptions' => ['allowClear' => true]]); ?> <!-- /.search-data --> <?php echo $form->field($model, 'date_begin')->widget(\yii\jui\DatePicker::classname(), ['language' => 'ru', 'dateFormat' => 'yyyy-MM-dd']); ?> <div class="form-group btn-search"> <?php echo Html::submitButton('Вперед!', ['class' => 'btn btn-success']); ?> </div> <?php ActiveForm::end(); NavBar::end(); ?>
</div> </section> <input type="hidden" name="DynamicContent[apply_if_params]" id="apply_if_params"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Match settings'), 'icon' => 'cogs', 'footer' => $this->blocks['submit']]); ?> <div id="properties"> <?php $url = Url::to(['/shop/backend-category/autocomplete']); $category = $model->apply_if_last_category_id > 0 ? \app\modules\shop\models\Category::findById($model->apply_if_last_category_id) : null; ?> <?php echo $form->field($model, 'apply_if_last_category_id')->widget(Select2::classname(), ['options' => ['placeholder' => 'Search for a category ...'], 'pluginOptions' => ['allowClear' => true, 'ajax' => ['url' => $url, 'dataType' => 'json', 'data' => new JsExpression('function(term,page) { return {search:term}; }'), 'results' => new JsExpression('function(data,page) { return {results:data.results}; }')]], 'initValueText' => !is_null($category) ? $category->name : '']); ?> <div class="row"> <div class="col-md-10 col-md-offset-2"> <a href="#" class="btn btn-md btn-primary add-property"> <?php echo Icon::show('plus'); ?> <?php echo Yii::t('app', 'Add property'); ?> </a> <br> <br> </div> </div>
<div class="col-lg-6"> <?php echo $form->field($model, 'status')->dropDownList(Document::getStatusArray()); ?> </div> </div> <div class="row"> <div class="col-lg-6"> <?php echo $form->field($model, 'parent_id')->widget(Select2::classname(), ['data' => Document::getAll(), 'options' => ['placeholder' => '', 'class' => 'parent_id'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="col-lg-6"> <?php echo $form->field($model, 'template_id')->widget(Select2::classname(), ['data' => Template::getAll(), 'options' => ['placeholder' => '', 'class' => 'template_id'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> </div> <div class="row"> <div class="col-lg-6"> <?php echo $form->field($model, 'meta_keywords')->textarea(['rows' => 2]); ?> </div> <div class="col-lg-6"> <?php echo $form->field($model, 'meta_description')->textarea(['rows' => 2]); ?> </div>
?> </div> <!-- col-lg-6 --> </div> <!-- #image --> <div id="video" class="tab-pane fade"> <div class="col-lg-6"> <?php echo $form->field($model, 'video', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-film"></i>']]])->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'video_type')->widget(Select2::classname(), ['data' => $select2videotype, 'addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-film"></i>']]]); ?> </div> <!-- end col-lg-6 --> <div class="col-lg-6"> <?php echo $form->field($model, 'video_caption', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-facetime-video"></i>']]])->textarea(['maxlength' => 255, 'rows' => 6]); ?> <?php echo $form->field($model, 'video_credits', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-barcode"></i>']]])->textInput(['maxlength' => 255]); ?>