<?php use yii\widgets\ActiveForm; use yii\helpers\Html; $this->registerCss(".ui-menu .ui-menu-item:hover,.ui-menu .ui-state-active {background:#4f99c6}"); ?> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'name'); ?> <?php echo $form->field($model, 'description'); ?> <?php //echo $form->field($model, 'rule_name') echo $form->field($model, 'rule_name')->widget(\yii\jui\AutoComplete::className(), ['clientOptions' => ['source' => array_keys(\Yii::$app->authManager->getRules())], 'options' => ['class' => 'form-control']]); echo $form->field($model, 'data')->textarea(['rows' => 6]); ?> <?php echo Html::submitButton('Save', ['class' => 'btn btn-success btn-block']); ?> <?php ActiveForm::end();
<div class="menu-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 128]); ?> <?php echo $form->field($model, 'parent_name')->widget(AutoComplete::className(), ['options' => ['class' => 'form-control'], 'clientOptions' => ['source' => Menu::find()->select(['name'])->column()]]); ?> <?php echo $form->field($model, 'route')->widget(AutoComplete::className(), ['options' => ['class' => 'form-control'], 'clientOptions' => ['source' => Menu::getSavedRoutes()]]); ?> <?php echo $form->field($model, 'order')->input('number'); ?> <?php echo $form->field($model, 'data')->textarea(['rows' => 4]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
/* @var $this yii\web\View */ /* @var $model app\modules\rbac\models\AuthItemChild */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="auth-item-child-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'parent')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Yii::$app->urlManager->createUrl(['lookup/getauthitem'])], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'child')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Yii::$app->urlManager->createUrl(['lookup/getauthitem'])], 'options' => ['class' => 'form-control']]); ?> <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(); ?> </div>
*/ ?> <div class="setting-form"> <?php $form = ActiveForm::begin(); ?> <?php $url = \yii\helpers\Url::to(['/settings/default/autocomplete']); ?> <?php echo $form->field(is_array($model) ? $model[0] : $model, 'section')->widget(AutoComplete::className(), ['clientOptions' => ['source' => $url], 'options' => ['class' => 'form-control']]); ?> <?php //echo $form->field((is_array($model))?$model[0]:$model, 'section')->textInput(['maxlength' => 255]) ?> <div id="settings_values"> <?php if (is_array($model)) { ?> <?php foreach ($model as $m) { ?> <div class="row"> <div class="col-xs-5">
/* @var $model backend\models\DtEnquiries */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="dt-enquiries-form"> <?php $form = ActiveForm::begin(); ?> <?php //echo $form->field($model, 'employee_id')->textInput() ?> <?php echo $form->field($model, 'employee_name')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Employees::arraySnp()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'create_date')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'do_date')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control']]); ?> <?php //echo $form->field($model, 'create_time')->textInput() ?> <?php
<?php $form = ActiveForm::begin(); ?> <?php //echo $form->field($model, 'date_create')->textInput() ?> <?php //echo $form->field($model, 'date_confirm')->textInput() ?> <?php //echo $form->field($model, 'status')->textInput() ?> <?php echo $form->field($model, 'employee_name')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Employees::arraySnpId(), 'minLength' => '1', 'autoFill' => true, 'select' => new JsExpression("function( event, ui ) {\n \$('#employee_id_hidd').val(ui.item.id);\n }")], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'employee_id')->hiddenInput(['id' => 'employee_id_hidd'])->label(false); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Редактировать', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
use app\models\Tour; $this->title = 'Расширенный поиск'; $this->params['breadcrumbs'][] = ['label' => 'Туры', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; $listdata = Tour::find()->select(['name as value', 'name as label'])->where(['status' => 1])->asArray()->all(); ?> <div class="add-tour"> <?php $form = ActiveForm::begin(['action' => 'result', 'method' => 'get']); ?> <?php echo $form->field($model, 'search')->widget(AutoComplete::className(), ['clientOptions' => ['source' => $listdata], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'category')->dropDownList(['name' => 'Название', 'org' => 'Организация', 'address' => 'Адрес', 'info' => 'Информация', 'tel' => 'Телефон']); ?> <?php echo $form->field($model, 'sort')->dropDownList(['name' => 'Названию', 'date' => 'Дате', 'address' => 'Адресу']); ?> <div class="form-group"> <?php echo Html::submitButton('Поиск', ['class' => 'btn btn-primary']); ?>
?> <div class="employees-search"> <?php $form = ActiveForm::begin(['layout' => 'horizontal', 'action' => ['site/admin_workplace?tab=2'], 'method' => 'get']); ?> <?php echo $form->field($model, 'fio', ['horizontalCssClasses' => ['wrapper' => 'col-xs-9']])->widget(AutoComplete::className(), ['clientOptions' => ['source' => AdminEmployees::arrayFios()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'cell_number', ['horizontalCssClasses' => ['wrapper' => 'col-xs-9']])->widget(AutoComplete::className(), ['clientOptions' => ['source' => AdminEmployees::arrayCells()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'email', ['horizontalCssClasses' => ['wrapper' => 'col-xs-9']])->widget(AutoComplete::className(), ['clientOptions' => ['source' => AdminEmployees::arrayEmails()], 'options' => ['class' => 'form-control']]); ?> <div style="float: right"> <?php echo Html::submitButton('Поиск', ['class' => 'btn btn-primary']); ?> <?php echo Html::a('Сбрсить', ['site/admin_workplace', 'tab' => 2], ['class' => 'btn btn-default']); ?> </div> <?php ActiveForm::end(); ?>
<h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> </p> <?php $form = ActiveForm::begin(['id' => 'orders-form', 'enableAjaxValidation' => true, 'action' => ['update', 'id' => $model->id]]); ?> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['attribute' => 'created', 'format' => ['date', 'php:d.m.Y H:i']], ['attribute' => 'status', 'value' => $form->field($model, 'status')->dropDownList(Orders::$statuses)->label(false) . Html::submitButton('Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']), 'format' => 'raw'], 'name', 'phone', 'address', ['label' => 'E-mail', 'value' => $model->email], ['attribute' => 'track', 'value' => $form->field($model, 'track')->textInput()->label(false) . Html::submitButton('Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) . ' ' . Html::a('Отправить трек на почту', ['send-track', 'id' => $model->id], ['class' => 'btn btn-primary', 'onclick' => 'return confirm("Вы действительно хотите отправить трек номер?")']), 'format' => 'raw'], 'description:ntext', ['label' => 'Ссылка на заказ', 'value' => Html::a(Url::toRoute(['/checkout/default/order', 'id' => $model->link_id], 'http'), Url::toRoute(['/checkout/default/order', 'id' => $model->link_id], 'http'), ['target' => '_blank']), 'format' => 'raw'], ['label' => 'Сумма заказа', 'value' => number_format($model->sum, 0, '.', ' ') . ' руб.<br /><br />' . $form->field($model, 'sum_c')->textInput()->hint('Действует только на сумму заказа, без учета доставки') . Html::submitButton('Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']), 'format' => 'raw'], ['attribute' => 'delivery_cost', 'value' => $form->field($model, 'delivery_cost')->textInput()->label(false) . $form->field($model, 'delivery')->dropDownList(Orders::getDeliveryENum())->label(false) . Html::submitButton('Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']), 'format' => 'raw'], 'weight', ['attribute' => 'sumWithDelivery', 'value' => !is_null($model->getSumWithDelivery()) ? number_format($model->getSumWithDelivery(), 0, '.', ' ') . ' руб.' : null], ['attribute' => 'comment', 'value' => $form->field($model, 'comment')->textarea()->label(false) . Html::submitButton('Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']), 'format' => 'raw'], ['label' => 'Добавить товар к заказу', 'value' => $form->field($model, 'newProduct')->label(false)->hint('Начните вводить часть названия товара')->widget(\yii\jui\AutoComplete::className(), ['clientOptions' => ['source' => new \yii\web\JsExpression("function(request, response) {\n \$.getJSON('" . Url::to('find-product') . "', {\n term: request.term\n }, response);\n }"), 'select' => new \yii\web\JsExpression("function(event, ui) { \$(this).val(ui.item.label); addProduct(ui.item.value); return false; }")], 'options' => ['class' => 'form-control']]) . '<a href="#" class="btn btn-success" onclick="pushProduct(); event.preventDefault();">Добавить</a>', 'format' => 'raw'], ['label' => 'Перенести товары из заказа', 'value' => Html::textInput('split_from', null, ['id' => 'split_from', 'class' => 'form-control']) . '<br /><a href="#" class="btn btn-success" onclick="split(); event.preventDefault();">Перенести</a>', 'format' => 'raw']]]); ?> <?php ActiveForm::end(); ?> <?php echo \yii\widgets\ListView::widget(['dataProvider' => $products, 'viewParams' => ['order' => $model], 'itemOptions' => ['class' => 'col-sm-6 col-md-4', 'style' => 'width: auto;'], 'itemView' => '_order-product']); ?> </div> <?php $this->registerJs("\nvar current_product_id = 0;\nfunction addProduct(id) {\n current_product_id = id;\n}\nfunction pushProduct() {\n if (current_product_id === 0) {\n return ;\n }\n window.location.href = '" . Url::to(['add-product']) . "?productId=' + current_product_id + '&orderId=" . $model->id . "';\n}\nfunction split() {\n var from = \$('#split_from').val();\n window.location.href = '" . Url::to(['split']) . "?from=' + from + '&to=" . $model->id . "';\n}\n", \yii\web\View::POS_HEAD);
<div class="uk-width-1-3"> <?php echo $form->field($searchForm, 'bdate')->dropDownList(Main::getDateList()); ?> </div> </div> <?php echo $form->field($searchForm, 'district')->dropDownList($districtList, ['prompt' => '']); ?> <?php echo $form->field($searchForm, 'city')->widget(AutoComplete::className(), ['clientOptions' => ['source' => '/index.php?r=site/ajax-search&t=city'], 'options' => ['class' => 'form-control']]); ?> <div class="uk-grid uk-grid-small"> <div class="uk-width-3-5"> <?php echo $form->field($searchForm, 'street')->widget(AutoComplete::className(), ['clientOptions' => ['source' => '/index.php?r=site/ajax-search&t=street'], 'options' => ['class' => 'form-control']]); ?> </div> <div class="uk-width-1-5"> <?php echo $form->field($searchForm, 'bld'); ?> </div> <div class="uk-width-1-5"> <?php echo $form->field($searchForm, 'flat'); ?> </div> </div> <div class="form-group">
?> <?php echo $form->field($model, 'patente')->textInput(['maxlength' => true, 'style' => 'text-transform: uppercase', 'autofocus' => true]); ?> <?php echo $form->field($model, 'marca')->widget(AutoComplete::className(), ['model' => $model, 'attribute' => 'marca', 'options' => ['style' => 'text-transform: uppercase', 'class' => 'form-control', 'max-height' => '100px', 'overflow-y' => 'auto', 'overflow-x' => 'hidden', 'z-index' => '5000'], 'clientOptions' => ['source' => Vehiculos::getMarcasVehiculos(), 'minLength' => 1, 'appendTo' => '#form-vehiculonuevo-ajax']]); ?> <?php echo $form->field($model, 'modelo')->widget(AutoComplete::className(), ['model' => $model, 'attribute' => 'modelo', 'options' => ['style' => 'text-transform: uppercase', 'class' => 'form-control', 'max-height' => '100px', 'overflow-y' => 'auto', 'overflow-x' => 'hidden', 'z-index' => '5000'], 'clientOptions' => ['source' => Vehiculos::getModelosVehiculos(), 'minLength' => 1, 'appendTo' => '#form-vehiculonuevo-ajax']]); ?> <?php echo $form->field($model, 'color')->widget(AutoComplete::className(), ['model' => $model, 'attribute' => 'color', 'options' => ['style' => 'text-transform: uppercase', 'class' => 'form-control', 'max-height' => '100px', 'overflow-y' => 'auto', 'overflow-x' => 'hidden', 'z-index' => '5000'], 'clientOptions' => ['source' => Vehiculos::getColoresVehiculos(), 'minLength' => 1, 'appendTo' => '#form-vehiculonuevo-ajax']]); ?> <?php echo $form->field($model, 'estado')->hiddenInput()->label(false); ?> <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 class="module-form"> <?php $form = ActiveForm::begin(); ?> <?php $request = new \yii\web\JsExpression('function (request, response) { jQuery.get("' . \yii\helpers\Url::toRoute(['aliases']) . '", { query: request.term }, function (data) { response(data); }); }'); ?> <?php echo $form->field($model, 'source')->widget(\yii\jui\AutoComplete::className(), ['model' => $model, 'attribute' => 'source', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => $request, 'minLength' => 1]]); ?> <?php echo $form->field($model, 'destination')->widget(\yii\jui\AutoComplete::className(), ['model' => $model, 'attribute' => 'destination', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => $request, 'minLength' => 1]]); ?> <?php echo $form->field($model, 'inheritContent')->checkbox(); ?> <?php echo $form->field($model, 'replace')->checkbox(); ?> <div class="form-group"> <?php echo Html::submitButton(Yii::t('modules/module', 'Save'), ['class' => 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
<h1><?php echo Html::encode($this->title); ?> </h1> <p> During development, you can login as any of the registered users: </p> <div class="row"> <div class="col-lg-5"> <?php $form = ActiveForm::begin(['id' => 'form-dev-login']); ?> <?php echo $form->field($model, 'userName')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Url::to(['site/userlist'])], 'options' => ['class' => 'form-control']]); ?> <div class="form-group"> <?php echo Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']); ?> </div> <?php ActiveForm::end(); ?> </div> </div> </div>
?> <?php echo $form->field($model, 'patente')->textInput(['maxlength' => true, 'style' => 'text-transform: uppercase']); ?> <?php echo $form->field($model, 'marca')->widget(AutoComplete::className(), ['model' => $model, 'attribute' => 'marca', 'options' => ['style' => 'text-transform: uppercase', 'class' => 'form-control', 'max-height' => '100px', 'overflow-y' => 'auto', 'overflow-x' => 'hidden'], 'clientOptions' => ['source' => Vehiculos::getMarcasVehiculos()]]); ?> <?php echo $form->field($model, 'modelo')->widget(AutoComplete::className(), ['model' => $model, 'attribute' => 'modelo', 'options' => ['style' => 'text-transform: uppercase', 'class' => 'form-control', 'max-height' => '100px', 'overflow-y' => 'auto', 'overflow-x' => 'hidden'], 'clientOptions' => ['source' => Vehiculos::getModelosVehiculos()]]); ?> <?php echo $form->field($model, 'color')->widget(AutoComplete::className(), ['model' => $model, 'attribute' => 'color', 'options' => ['style' => 'text-transform: uppercase', 'class' => 'form-control', 'max-height' => '100px', 'overflow-y' => 'auto', 'overflow-x' => 'hidden'], 'clientOptions' => ['source' => Vehiculos::getColoresVehiculos()]]); ?> <?php echo $form->field($model, 'estado')->hiddenInput()->label(false); ?> <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(); ?>
<li> <?php echo $form->errorSummary($StudioForm, ['header' => '']); ?> </li> <li> <?php echo $form->field($StudioForm, 'countryName', ['template' => $requiredFieldTemplate])->widget(AutoComplete::className(), ['model' => $StudioForm, 'attribute' => 'countryName', 'options' => ['class' => 'form-control', 'title' => 'Страна', 'placeholder' => 'Начните вводить название страны'], 'clientOptions' => ['source' => Url::toRoute('get-country-list'), 'select' => new JsExpression("function( event, ui ) {\n \$('#studioform-countryid').val(ui.item.id);\n successCountry = true;\n \$('.form-group.field-studioform-countryname').removeClass('has-error').addClass('has-success');\n checkCities(ui.item.id, 'studioform-cityname', '" . Url::toRoute('get-city-list') . "');\n }"), 'change' => new JsExpression("function( event, ui ) {\n successCountry = false\n }"), 'close' => new JsExpression("function( event, ui ) {\n if (successCountry == false) {\n \$('.form-group.field-studioform-countryname').removeClass('has-success').addClass('has-error');\n }\n }")]]); ?> <?php echo Html::activeHiddenInput($StudioForm, 'countryId'); ?> </li> <li> <?php echo $form->field($StudioForm, 'cityName', ['template' => $requiredFieldTemplate])->widget(AutoComplete::className(), ['model' => $StudioForm, 'attribute' => 'cityName', 'options' => ['class' => 'form-control', 'title' => 'Город', 'placeholder' => 'Начните вводить название города', 'disabled' => 'disabled'], 'clientOptions' => ['source' => Url::toRoute('get-city-list'), 'select' => new JsExpression("function( event, ui ) {\n \$('#studioform-cityid').val(ui.item.id);\n successCity = true;\n \$('.form-group.field-studioform-cityname').removeClass('has-error').addClass('has-success');\n }"), 'change' => new JsExpression("function( event, ui ) {\n successCity = false\n }"), 'close' => new JsExpression("function( event, ui ) {\n if (successCity == false) {\n \$('.form-group.field-studioform-cityname').removeClass('has-success').addClass('has-error');\n }\n }")]]); ?> <?php echo Html::activeHiddenInput($StudioForm, 'cityId'); ?> </li> <li class="heighCol checkboxList"> <div class="left-col">Способ доставки</div> <div class="center-col"> <ul> <?php $deliveryList = $StudioForm->getDeliveryList(); foreach ($deliveryList as $delivery) { $iconClass = strtolower(str_replace(' ', '-', $delivery['name_en'])); $id = 'studioform-deliveryList_' . $delivery['id']; $checked = $StudioForm->deliveryList && in_array($delivery['id'], $StudioForm->deliveryList);
echo $form->field($model, 'source_title')->widget(AutoComplete::className(), ['clientOptions' => ['source' => $sources, 'minLength' => '3', 'autoFill' => true], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'cat_title')->widget(AutoComplete::className(), ['clientOptions' => ['source' => $caters, 'minLength' => '3', 'autoFill' => true], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'text')->textarea(['rows' => 5, 'cols' => 5, 'id' => 'my-textarea-id']); ?> <?php echo $form->field($model, 'cens')->textInput(); ?> <?php $form->field($model, 'tags')->textInput(); ?> <?php echo $form->field($model, 'tags')->widget(AutoComplete::className(), ['clientOptions' => ['source' => $tags, 'minLength' => '3', 'autoFill' => true], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'audio_link')->textInput(); ?> <?php echo $form->field($model, 'in_work_prim')->textInput(); ?> <?php echo $form->field($uploadFile, 'file')->fileInput(); ?> <?php echo $form->field($uploadImg, 'img')->fileInput(); ?> <div class="form-group">
</div> <div class="tab-pane fade" id="edit-tab-slug"> <br /> <?php echo $form->field($model, 'alias', ['template' => '{input}{error}'])->textInput(['maxlength' => 255]); ?> </div> <div class="tab-pane fade" id="edit-tab-user"> <br /> <?php echo $form->field($model, 'username')->widget(AutoComplete::className(), ['clientOptions' => ['source' => '/admin/site/author'], 'options' => ['class' => 'form-control']]); ?> <br /> </div> <div class="tab-pane fade" id="edit-tab-created"> <br /> <?php echo DateTimePicker::widget(['name' => 'event_time', 'value' => date("d/m/Y h:i:s", (int) $model->created_at), 'removeButton' => false, 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true], 'pluginEvents' => ["changeDate" => "function(e) { \$('#created_at').val(Math.round(e.timeStamp/1000)); }"]]); ?> <br /> </div>
<div class="col-sm-6"> <div class="panel panel-default"> <div class="panel-heading">Партнерша</div> <div class="panel-body form-inline"> <div class="col-sm-1" style="padding: 10px"> <?php echo FA::icon('female')->size(FA::SIZE_3X); ?> </div> <div class="col-sm-10 col-sm-offset-1"> <?php echo $form->field($model, 'gsurname')->widget(\yii\jui\AutoComplete::className(), ['clientOptions' => ['source' => $bsurnames], 'options' => ['class' => 'form-control', 'placeholder' => 'Фамилия']])->label(false); ?> <?php echo $form->field($model, 'gname')->widget(\yii\jui\AutoComplete::className(), ['clientOptions' => ['source' => $gnames], 'options' => ['class' => 'form-control', 'placeholder' => 'Имя']])->label(false); ?> <?php echo $form->field($model, 'gyear')->dropDownList($years)->label(false); ?> </div> </div> </div> </div> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Зарегистрировать' : 'Обновить', ['style' => 'width: 100%', 'class' => 'btn-lg' . $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
<div class="col-xs-3"> <?php // Estado $lista = ArrayHelper::map(\backend\models\Estado::find()->asArray()->all(), 'estadoid', 'estado'); echo $form->field($model, 'estado_id')->dropDownList($lista)->label('Estatus'); ?> </div> </div> <div class="row"> <div class="col-xs-3"> <?php // Cuenta $data = \backend\models\Cuentas::find()->select(['cuenta'])->distinct()->asArray()->createCommand()->queryColumn(); //echo $form->field($model, 'cuenta')->widget(\yii\jui\AutoComplete::className(), ['clientOptions' => ['source' => $data],]); echo $form->field($model, 'cuenta')->widget(\yii\jui\AutoComplete::className(), ['options' => ['class' => 'form-control'], 'clientOptions' => ['source' => $data]])->label('Dependencia / Entidad'); ?> </div> </div> <div class="row"> <div class="col-xs-3"> <?php // Siglas echo $form->field($model, 'siglas')->textInput(['maxlength' => true])->textInput(); ?> </div> </div>
public function autocompleteJuiFree($options) { Yii::$app->getView()->registerJs("\$('body').on('autocompletecreate', 'input', function(e, ui){" . "\$(this).addClass('form-control') });", View::POS_END, 'autocompletecreate'); return $this->widget(AutoComplete::className(), $options); }
$form = ActiveForm::begin(); ?> <h4><?php echo Yii::t('app', 'Route'); ?> </h4> <?php echo $form->field($model, 'charge_city_id')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Url::to(['site/autocomplete']), 'autoFill' => true, 'minLength' => '3', 'select' => new JsExpression("function(event, ui) {\n this.value = ui.item.label;\n \$('#city_input1').val(ui.item.value);\n return false;\n }")], 'options' => ['id' => 'charge_city', 'class' => 'form-control', 'placeholder' => Yii::t('app', 'Start typing the name')]]); ?> <?php echo $form->field($model, 'charge_city_id')->hiddenInput(['id' => 'city_input1'])->label(false); ?> <?php echo $form->field($model, 'discharge_city_id')->widget(AutoComplete::className(), ['clientOptions' => ['source' => Url::to(['site/autocomplete']), 'autoFill' => true, 'minLength' => '3', 'select' => new JsExpression("function(event, ui) {\n this.value = ui.item.label;\n \$('#city_input2').val(ui.item.value);\n return false;\n }")], 'options' => ['id' => 'discharge_city', 'class' => 'form-control', 'placeholder' => Yii::t('app', 'Start typing the name')]]); ?> <?php echo $form->field($model, 'discharge_city_id')->hiddenInput(['id' => 'city_input2'])->label(false); ?> <br> <h4><?php echo Yii::t('app', 'Goods'); ?> </h4> <?php echo $form->field($model, 'name')->textInput(); ?> <?php
echo $form->field($model, 'model')->textInput(['maxlength' => true])->widget(AutoComplete::className(), ['clientOptions' => ['source' => $model::arrayModels()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'sn')->textInput(['maxlength' => true])->widget(AutoComplete::className(), ['clientOptions' => ['source' => $model::arraySns()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'imei1')->textInput(['maxlength' => true])->widget(AutoComplete::className(), ['clientOptions' => ['source' => $model::arrayImei1()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'imei2')->textInput(['maxlength' => true])->widget(AutoComplete::className(), ['clientOptions' => ['source' => $model::arrayImei2()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'specification')->textInput(['maxlength' => true])->widget(AutoComplete::className(), ['clientOptions' => ['source' => $model::arraySpecifications()], 'options' => ['class' => 'form-control']]); ?> <?php echo $form->field($model, 'device_note')->textInput(['maxlength' => true]); ?> <?php /* $form->field($model, 'parent_device_id')->textInput(['maxlength' => true])*/ ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php
</div> <div class="col-lg-10"> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($model, 'minititle')->textInput(); ?> <?php echo $form->field($upload, 'file')->fileInput(); ?> <?php echo $form->field($model, 'source_title')->widget(\yii\jui\AutoComplete::className(), ['clientOptions' => ['source' => $data, 'minLength' => '3', 'autoFill' => true], 'options' => ['class' => 'form-control']]); ?> <?php if (!$redactor) { ?> <?php echo $form->field($model, 'body')->textarea(['rows' => 5, 'cols' => 5, 'id' => 'my-textarea-id']); ?> <?php } else { ?> <?php echo $form->field($model, 'body')->widget(Widget::classname(), ['settings' => ['lang' => 'ru', 'minHeight' => 300, 'pastePlainText' => true, 'buttonSource' => true, 'plugins' => ['clips', 'fullscreen'], 'imageUpload' => Url::to(['/articles/image-upload'])]]); ?>
</div> <div class="col-lg-10"> <?php $form = ActiveForm::begin(['id' => 'authors-form']); ?> <?php echo $form->field($model, 'title')->textInput(); ?> <?php echo $form->field($model, 'text')->textarea(['rows' => 5, 'cols' => 5, 'id' => 'my-textarea-id']); ?> <?php echo $form->field($model, 'source_title')->widget(AutoComplete::className(), ['clientOptions' => ['source' => $sources, 'minLength' => '3', 'autoFill' => true], 'options' => ['class' => 'form-control', 'value' => $model->isNewRecord ? '' : \app\models\Source::findOne($model->source_id)->title]]); ?> <?php echo $form->field($model, 'link')->textInput(); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Обновить', ['class' => 'btn btn-primary', 'name' => 'create-button']); ?> </div> <?php ActiveForm::end(); ?> </div>