use yii\helpers\Html; use yii\helpers\Url; use yii\jui\AutoComplete; $this->title = ''; if ($locale) { $this->title = \Locale::getDisplayName($locale, Yii::$app->language) . ', ' . Html::encode($locale) . ' - '; } $this->title .= 'PHP intl extension, ICU data tables'; ?> <?php echo Html::beginForm(['site/index'], 'get', ['class' => 'form-horizontal']); ?> <div class="input-group"> <?php echo AutoComplete::widget(['name' => 'locale', 'value' => $locale, 'options' => ['class' => 'form-control', 'placeholder' => 'Enter locale code such as "en" or "en_US"', 'autofocus' => true], 'clientOptions' => ['source' => Url::toRoute(['site/suggest-locale'])]]); ?> <span class="input-group-btn"> <?php echo Html::submitButton('Find', ['class' => 'btn btn-primary']); ?> </span> </div> <?php echo Html::endForm(); ?> <?php if ($locale) { ?>
public function autocompleteJui($opts) { $id = $this->getInputId(); $options = array_merge_recursive(['id' => $id . '_autoComplete', 'clientOptions' => ['select' => new JsExpression("function( event, ui ) { \$( '#{$id}' ).val( ui.item.id ); }"), 'change' => new JsExpression("function(){ if( \$( '#{$id}' ).val() <= 0 ){ \$(this).val(null); }}"), 'search' => new JsExpression("function(){ \$( '#{$id}' ).val(null); }")]], $opts); $hidden = Html::activeHiddenInput($this->model, $this->attribute); $autocomplete = AutoComplete::widget($options); Yii::$app->getView()->registerJs("\$('body').on('autocompletecreate', 'input', function(e, ui){" . "\$(this).addClass('form-control') });", View::POS_END, 'autocompletecreate'); $this->parts['{input}'] = $hidden . $autocomplete; return $this; }
/* @var $this yii\web\View */ /* @var $model app\models\Access */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="access-form"> <?php $form = ActiveForm::begin(); ?> <label for="autocomplete_user_id"> Выберите пользователя </label> <?php echo \yii\jui\AutoComplete::widget(['id' => 'autocomplete_user_id', 'name' => 'user_id', 'clientOptions' => ['source' => \app\models\User::find()->select(['CONCAT(`name`, \' \', `surname`) as value', 'CONCAT(`name`, \' \', `surname`) as label', 'id'])->where("id != " . Yii::$app->user->id)->asArray()->all(), 'select' => new JsExpression("function( event, ui ) {\n \$('#access-user_id').val(ui.item.id);\n }")], 'options' => ['class' => 'form-control']]); ?> <?php echo Html::activeHiddenInput($model, 'user_id'); ?> <br> <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(); ?>
<?php echo \common\widgets\Alert::widget(); ?> <div class="box"> <div class="content"> <div class="brand-create"> <h1><?php echo Html::encode($this->title); ?> </h1> <!-- --><?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create Brand', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'emptyText' => 'You don\'t have any brands', 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'title', 'filter' => AutoComplete::widget(['model' => $searchModel, 'attribute' => 'title', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => Brand::getAutoCompleteItems('title')]])], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}{delete}']]]); ?> </div> </div> </div> </div>
<section class="content"> <?php echo \common\widgets\Alert::widget(); ?> <div class="box box-primary"> <div class="box-body"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php if (\Yii::$app->user->can('create-product')) { ?> <?php echo Html::a(Yii::t('app', 'Create Product'), ['create'], ['class' => 'btn btn-success']); ?> <?php } ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'emptyText' => 'You don\'t have any products', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'title', 'filter' => AutoComplete::widget(['model' => $searchModel, 'attribute' => 'title', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => Product::getAutoCompleteItems('title')]])], ['attribute' => 'ui', 'filter' => AutoComplete::widget(['model' => $searchModel, 'attribute' => 'ui', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => Product::getAutoCompleteItems('ui')]])], ['class' => '\\pheme\\grid\\ToggleColumn', 'attribute' => 'active', 'enableAjax' => false, 'filter' => [1 => Yii::t('yii', 'Yes'), 0 => Yii::t('yii', 'No')]], ['class' => 'yii\\grid\\ActionColumn', 'template' => Product::getGridButtonsTemplate(), 'buttons' => ['delete' => function ($url, $model, $key) { $options = ['title' => Yii::t('yii', 'Delete'), 'aria-label' => Yii::t('yii', 'Delete'), 'data-confirm' => 'Are you sure you want to delete this item?', 'data-method' => 'post', 'data-pjax' => '0']; return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, $options); }]]]]); ?> </div> </div> </section>
<?php echo Html::label('Print Count:'); ?> <br> <?php echo Html::input('text', 'jml', '10', ['id' => 'jml', 'style' => 'width:80px;']); ?> </td> </tr> </tbody> </table> </div> <div class="form-group" style="padding: 15px; padding-top: 0px;"> <label for="product">Product :</label> <?php echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('yii.global.sourceProduct'), 'select' => new JsExpression('yii.master.onProductSelect'), 'delay' => 100], 'options' => ['class' => 'form-control', 'style' => 'width:60%;']]); ?> <?php echo Html::hiddenInput('barcodeValue', '', ['id' => 'barcodeValue']); ?> </div> </div> <div class="box-footer"> <?php echo Html::button(' Generate', ['onclick' => 'generateBarcode();', 'class' => 'btn btn-warning fa fa-qrcode']); ?> <?php echo Html::button(' Print', ['onclick' => 'print();', 'class' => 'btn btn-info fa fa-print']); ?> </div> </div>
//js UserAsset::register($this); //users $dataProvider = new ArrayDataProvider(['allModels' => User::findAll($model->users), 'pagination' => false]); //attribute name $name = Html::getInputName($model, 'users') . '[]'; ?> <fieldset> <div class="form-group"> <div class="col-sm-8 col-md-6"> <div class="input-group"> <?php echo AutoComplete::widget(['name' => 'email', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => Url::toRoute('users'), 'create' => new JsExpression('function(event, ui) { $("#role-form input.ui-autocomplete-input").autocomplete("instance")._renderItem = function(ul, item) { return $("<li>").html(item.html).appendTo(ul); }; }')]]); ?> <span class="input-group-btn"> <?php echo Html::a(Yii::t('user', 'Add'), ['assign'], ['class' => 'btn btn-default assign', 'disabled' => true]); ?> </span> </div> </div> </div> <div class="form-group"> <div class="col-sm-8 col-md-6"> <?php
echo $form->field($model, 'orderNum'); ?> </div> <div class="col-lg-6"> <?php echo $form->field($model, 'city'); ?> </div> <div class="col-lg-12"> <?php echo $form->field($model, 'clientId')->hiddenInput(); ?> <?php echo AutoComplete::widget(['name' => 'State', 'id' => 'ddd', 'clientOptions' => ['source' => Url::to(['clients/search']), 'select' => new JsExpression("function( event, ui ) {\n \$('#orders-clientid').val(ui.item.id);\n }")], 'options' => ['class' => 'form-control clients-main-search']]); ?> </div> <div class="col-lg-12"> <?php echo $form->field($model, 'deliveryId')->dropDownList($delivery); ?> </div> <div class="col-lg-12"> <?php echo $form->field($model, 'payment')->dropDownList($model->paymentArr); ?> </div>
<?php $form = ActiveForm::begin(); ?> <?php GalleryWidget::printHiddenFields($covers); ?> <div class="col-md-8" style="margin-bottom: 20px;"> <div class="form-group field-release-artist_id required"> <?php echo Html::label('Artist Name', null, ['class' => 'control-label']); ?> <span id="add_name" style="color: grey; margin-left: 5px;"></span> <?php echo AutoComplete::widget(['name' => 'artist_name', 'id' => 'artist_name', 'clientOptions' => ['source' => new JsExpression("function(request, response) {\n \$.getJSON('" . Url::toRoute('artist/ajax-search', true) . "', {\n term: request.term\n }, response);\n }"), 'autoFill' => true, 'minLength' => '1', 'select' => new JsExpression("function(event, ui) {\n \$('#release-artist_id').val(ui.item.id);\n if (ui.item.add_name) \$('#add_name').text('(' + ui.item.add_name + ')');\n }"), 'search' => new JsExpression("function(event, ui) {\n \$('#add_name').text('');\n \$('#release-artist_id').val('');\n }"), 'response' => new JsExpression("function(event, ui) {\n if (ui.content.length > 0) {\n var value = \$('#artist_name').val().toLowerCase();\n var item = ui.content[0];\n var names = [item.original_name.toLowerCase()];\n if (item.latin_name) names.push(item.latin_name.toLowerCase());\n if (\$.inArray(value, names) > -1) \$('#release-artist_id').val(item.id);\n \$('.field-release-artist_id .info-block').text('');\n } else {\n \$('.field-release-artist_id .info-block').text('New Artist will be created.');\n }\n }")], 'options' => ['class' => 'form-control'], 'value' => $artist_name]); $this->registerJs("\$('#{$form->options['id']}').yiiActiveForm('add', {\n 'id': 'artist_name',\n 'name': 'artist_name',\n 'container': '.field-release-artist_id',\n 'input': '#artist_name',\n 'validate': function(attribute, value, messages, deferred, \$form) {\n yii.validation.required(value, messages, {\n 'message': 'Artist Name cannot be blank.'\n });\n yii.validation.string(value, messages, {\n 'message': 'Artist Name must be a string.',\n 'max': 255,\n 'tooLong': 'Artist Name should contain at most 255 characters.',\n 'skipOnEmpty': 1\n });\n value = yii.validation.trim(\$form, attribute, []);\n }\n })", View::POS_LOAD); ?> <div class="help-block"></div> <div class="info-block"></div> <?php echo Html::activeHiddenInput($release, 'artist_id', ['value' => $release->artist_id]); ?> </div> <?php echo $form->field($release, 'original_name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($release, 'latin_name')->textInput(['maxlength' => true]);
?> </div> </div> <div class="box-body"> <?php echo $form->field($model, 'purchase_num'); ?> <?php echo ''; ?> <?php $el_id = Html::getInputId($model, 'id_supplier'); $field = $form->field($model, "id_supplier", ['template' => "{label}\n{input}{text}\n{error}"]); $field->labelOptions['for'] = $el_id; $field->hiddenInput(['id' => 'id_supplier']); $field->parts['{text}'] = AutoComplete::widget(['model' => $model, 'attribute' => 'idSupplier[nm_supplier]', 'options' => ['class' => 'form-control', 'id' => $el_id], 'clientOptions' => ['source' => new JsExpression("yii.purchase.sourceSupplier")]]); echo $field; ?> <?php echo $form->field($model, 'purchaseDate')->widget('yii\\jui\\DatePicker', ['options' => ['class' => 'form-control', 'style' => 'width:50%'], 'clientOptions' => ['dateFormat' => 'dd-mm-yy']]); ?> <?php echo $form->field($model, 'status')->dropDownList([Purchase::STATUS_DRAFT => 'Draft', Purchase::STATUS_RECEIVE => 'Receive'], ['prompt' => '--status--']); ?> </div> <div class="box-footer"> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary', 'click' => 'js:$(\'#kecilin\').click();']); ?> <?php
?> <div class=" product-uom-form col-lg-6" style="padding-left: 0px;"> <?php $form = ActiveForm::begin(); ?> <div class="panel panel-primary"> <div class="panel-heading">Product Uoms</div> <div class="panel-body"> <?php $id_input = Html::getInputId($model, 'id_product'); $field = $form->field($model, 'id_product', ['template' => "{label}\n{input}\n{text}\n{hint}\n{error}"]); $field->labelOptions['for'] = $id_input; $field->input('hidden', ['id' => 'id_product']); $field->parts['{text}'] = AutoComplete::widget(['model' => $model, 'attribute' => 'idProduct[nm_product]', 'options' => ['class' => 'form-control', 'id' => $id_input], 'clientOptions' => ['source' => Url::toRoute(['product/auto-product']), 'select' => new JsExpression('function(event,ui){$(\'#id_product\').val(ui.item.did)}'), 'open' => new JsExpression('function(event,ui){$(\'#id_product\').val(\'\')}')]]); echo $field; ?> <?php echo $form->field($model, 'id_uom')->dropDownList(ArrayHelper::map(Uom::find()->all(), 'id_uom', 'nm_uom'), ['style' => 'width:200px;']); ?> <?php echo $form->field($model, 'isi')->textInput(); ?> </div> </div>
use yii\helpers\Html; use biz\purchase\models\PurchaseDtl; use mdm\widgets\TabularInput; use biz\purchase\assets\PurchaseAsset; use biz\app\assets\BizDataAsset; use biz\master\components\Helper as MasterHelper; /* @var $details PurchaseDtl[] */ /* @var $model biz\purchase\models\Purchase */ /* @var $this yii\web\View */ ?> <div class="col-lg-9"> <div class="box box-info"> <div class="box-header" style="padding: 10px;"> Product : <?php echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('yii.global.sourceProduct'), 'select' => new JsExpression('yii.purchase.onProductSelect'), 'delay' => 100], 'options' => ['style' => 'width:350px;']]); ?> <div class="pull-right"> Item Discount: <?php echo Html::activeTextInput($model, 'item_discount', ['style' => 'width:60px;', 'id' => 'item-discount']); ?> </div> </div> <div class="box-body" style="text-align: right;"> <?php echo Html::activeHiddenInput($model, 'purchase_value', ['id' => 'purchase-value']); ?> <h4 id="bfore" style="display: none;">Rp <span id="purchase-val">0</span>-<span id="disc-val">0</span></h4> <h2>Rp <span id="total-price"></span></h2> </div>
$icons = ['nuevo' => '<span class="glyphicon glyphicon-file" aria-hidden="true"></span>', 'crear' => '<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>', 'editar' => '<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>', 'eliminar' => '<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>', 'volver' => '<span class="glyphicon glyphicon-triangle-left" aria-hidden="true"></span>']; ?> <div class="materiales-servicios-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'id_se')->hiddenInput(); ?> <div class="form-group"> <?php echo AutoComplete::widget(['model' => $model, 'name' => 'subEspecifica', 'options' => ['class' => 'form-control', 'placeholder' => 'Escriba para buscar'], 'clientOptions' => ['source' => $sub_especfica, 'autoFill' => true, 'select' => new JsExpression("function(event, ui) {\n \$('#materialesservicios-id_se').val(ui.item.id);\n }")]]); ?> </div> <?php echo $form->field($model, 'nombre')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'unidad_medida')->dropDownList(ArrayHelper::map($unidad_medida, 'id', 'unidad_medida'), ['prompt' => 'Seleccione']); ?> <?php echo $form->field($model, 'presentacion')->dropDownList(ArrayHelper::map($presentacion, 'id', 'nombre'), ['prompt' => 'Seleccione']); ?>
<?php echo $form->field($model, 'sales_num')->textInput(['readonly' => true]); ?> <?php echo $form->field($model, 'id_warehouse')->dropDownList(Helper::getWarehouseList()); ?> <?php echo $form->field($model, 'salesDate')->widget('yii\\jui\\DatePicker', ['options' => ['class' => 'form-control', 'style' => 'width:50%'], 'clientOptions' => ['dateFormat' => 'dd-mm-yy']]); ?> <hr > <?php $id_input = Html::getInputId($model, 'id_customer'); $field = $form->field($model, 'id_customer', ['template' => "{label}\n{input}\n{text}\n{hint}\n{error}"]); $field->labelOptions['for'] = $id_input; $field->input('hidden', ['id' => 'id_customer']); $field->parts['{text}'] = AutoComplete::widget(['model' => $model, 'attribute' => 'idCustomer[nm_cust]', 'options' => ['class' => 'form-control', 'id' => $id_input], 'clientOptions' => ['source' => new JsExpression('yii.standart.sourceCustomer'), 'select' => new JsExpression('yii.standart.onCustomerSelect'), 'open' => new JsExpression('yii.standart.onCustomerOpen')]]); echo $field; ?> <?php echo $form->field($model, 'discount')->textInput(); ?> </div> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end();
public function run() { \yii\jui\AutoComplete::widget(); parent::run(); }
$allow_edit = $model->status == Transfer::STATUS_DRAFT && ($this->context->action->id == 'create' || $this->context->action->id == 'update') ? true : false; $allow_edit = $model->isNewRecord ? true : $allow_edit; ?> <div class="nav-tabs-custom"> <ul class="nav nav-tabs"> <li class="active"><a href="#detail-pane" data-toggle="tab">Detail Items</a></li> <li><a href="#delivery-pane" data-toggle="tab">Deliveries</a></li> <li><a href="#payments-pane" data-toggle="tab">Invoice & Payments</a></li> </ul> <div class="tab-content" style="min-height: 20em;"> <div class="tab-pane active" id="detail-pane" style="min-height: 10em;"> <div class="detail-pane-head col-lg-12" style="padding: 10px; padding-left: 0px;"> <div class="col-xs-8"> Product : <?php echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('biz.master.sourceProduct'), 'select' => new JsExpression('biz.transfer.onProductSelect'), 'delay' => 100], 'options' => ['class' => 'form-control']]); ?> </div> </div> <div class="detail-pane-body col-lg-12"> <table class="tabular table-striped"> <thead> <th class="col-lg-4">Product</th> <th class="col-lg-1">Qty Trans</th> <?php if (!$model->isNewRecord) { ?> <th class="col-lg-1">Issued</th> <th class="col-lg-1">Received</th> <?php }
</tbody> </table> <button type="button" id="dialogo" class="btn btn-primary" data-toggle="modal" data-target="#modalImputacion"><span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>IMPUTACIÓN</button> </div><br><br><!--form-group--> <!-- autocompletado --> <label>DATOS DE BENEFICIARIO</label> <div class="form-group"> <div class="input-group"> <div class="input-group-addon" title="introdusca código "> Código:</div> <?php echo AutoComplete::widget(['name' => "buscarProveedor", 'id' => 'label', 'clientOptions' => ['label' => 'id', 'razonsocial', 'rif', 'source' => yii\helpers\Url::toRoute("requisicion/buscar-proveedor"), 'autoFill' => true, 'select' => new \yii\web\JsExpression("function( event, ui ) {\n \$(\"#beneficiario\").val(ui.item.label);\n }")]]); ?> </div><!--input group--> </div><!--form-group--> <div class="form-group"> <?php echo $form4->field($prove, 'razonsocial')->textInput(['id' => 'beneficiario', 'readonly' => 'readonly'])->label('RazonSocial'); ?> </div> <br> <?php echo $form4->field($model, 'concepto')->textarea()->label('Concepto'); ?>
/* @var $model app\models\Access */ /* @var $usersForAutocomplete app\models\User */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="access-form"> <?php $form = ActiveForm::begin(); ?> <label for="autocomplete_user_id"> Выберите пользователя </label> <?php echo \yii\jui\AutoComplete::widget(['id' => 'autocomplete_user_id', 'name' => 'user_id', 'clientOptions' => ['source' => $usersForAutocomplete, 'select' => new JsExpression("function( event, ui ) {\n \$('#access-user_id').val(ui.item.id);\n }")], 'options' => ['class' => 'form-control']]); ?> <?php echo Html::activeHiddenInput($model, 'user_id'); ?> <br> <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(); ?>
<?php use yii\jui\AutoComplete; use frontend\models\products\Product; ?> <div class="row"> <div class="col-xs-12 col-sm-8"> <div class="input-group"> <span class="input-group-addon"> <i class="ace-icon fa fa-cube"></i> </span> <?php $this->registerCss('.ui-autocomplete{z-index:1060}'); $mainSKUs = Product::find()->where(['is not', 'stock_qty', null])->andWhere(['qty_per_order' => 1])->asArray()->indexBy('sku')->all(); echo AutoComplete::widget(['name' => 'main-sku', 'clientOptions' => ['source' => array_keys($mainSKUs)], 'options' => ['class' => 'form-control search-query', 'placeholder' => 'Put the main product SKU', 'id' => 'main-sku']]); ?> <span class="input-group-btn"> <button type="button" class="btn btn-purple btn-sm" id="link-product"> <span class="ace-icon fa fa-link icon-on-right bigger-110"></span> Link </button> </span> </div> </div> </div>
use yii\bootstrap\ActiveForm; use yii\jui\AutoComplete; use yii\helpers\Html; use yii\rbac\Item; use bariew\rbacModule\models\AuthRule; use bariew\rbacModule\models\AuthItem; /** * @var yii\web\View $this * @var AuthItem $model * @var yii\widgets\ActiveForm $form */ $form = ActiveForm::begin(); if ($model->type == Item::TYPE_ROLE) { echo $form->field($model, 'name')->textInput(); } else { if ($model->isNewRecord) { echo Html::activeLabel($model, 'name') . '<br />' . AutoComplete::widget(['model' => $model, 'attribute' => 'name', 'clientOptions' => ['source' => array_values($model::permissionList()), 'delay' => 0, 'autoFocus' => true, 'minLength' => 0]]); } } if ($model->type == Item::TYPE_PERMISSION) { echo $form->field($model, 'rule_name')->dropDownList(AuthRule::listAll(), ['prompt' => false]); } echo $form->field($model, 'description')->textarea(['rows' => 6]); ?> <div class="form-group"> <?php echo \yii\helpers\Html::submitButton($model->isNewRecord ? Yii::t('modules/rbac', 'Create') : Yii::t('modules/rbac', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end();
/* @var $form yii\widgets\ActiveForm */ $data = User::find()->select(['id as value', 'nombre as label', 'id as id'])->where(['id_rol' => '1'])->andWhere(['!=', 'id', Yii::$app->user->identity->id])->asArray()->all(); ?> <div class="mensajes-form"> <?php $form = ActiveForm::begin(); ?> <?php //= $form->field($model, 'id_Emisor')->textInput()->label('Mensaje para:') ?> <?php echo $form->field($model, 'id_Emisor')->hiddenInput(['value' => Yii::$app->user->identity->id])->label(false); echo AutoComplete::widget(['model' => $model, 'attribute' => 'id_Receptor', 'id' => 'ddd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => $data]]); ?> <?php echo $form->field($model, 'mensaje')->textArea(['rows' => 4]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Enviar' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
_form_container" class="token-form <?php echo $this->context->getStatusIndicator($model); ?> "> <?php $form = (include \Yii::getAlias("@nitm/views/layouts/form/header.php")); ?> <?php echo Html::label('User', 'usersearch', []); ?> <?php if (!$model->isNewRecord) { echo Html::tag('h4', \nitm\module\models\User::getFullName($model->user_id)); } else { echo \yii\jui\AutoComplete::widget(['name' => 'name', 'attribute' => 'name', 'options' => ['class' => 'form-control', 'id' => 'usersearch', 'role' => 'autocompleteSelect', 'data-select' => \yii\helpers\Json::encode(["value" => "unique", "label" => "name", "container" => "token-user_id"])], 'clientOptions' => ['source' => '/autocomplete/user']]); } ?> <?php echo Html::activeHiddenInput($model, 'user_id'); ?> <?php echo $form->field($model, 'active')->checkbox(); ?> <?php echo $form->field($model, 'revoked')->checkbox(); ?> <?php echo $form->field($model, 'level')->dropDownList($model->getLevels());
<div class="clearfix"></div> </div> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <div class="pull-left"><h4>Cấu hình</h4></div> <div class="pull-right"> <?php echo Html::beginForm(['backend/default/index'], 'GET', ['role' => 'form', 'class' => 'form-inline']); ?> <div class="form-group"> <?php $data = LetConfig::filter(); $data = LetConfig::asDataAutocomplete($data, 'name'); echo \yii\jui\AutoComplete::widget(['name' => 'keyword', 'value' => Yii::$app->request->get('keyword', ''), 'clientOptions' => ['source' => $data], 'options' => ['class' => 'form-control col-lg-2', 'onchange' => 'getListKey("' . yii\helpers\Url::toRoute(['backend/ajax/filter']) . '");', 'placeholder' => 'Tìm kiếm theo key']]); ?> </div> <div class="form-group"> <?php echo Html::dropDownList('module', Yii::$app->request->get('module', ''), $modules, ['class' => 'form-control']); ?> </div> <div class="form-group"> <?php echo Html::submitButton('Lọc', ['class' => 'btn btn-info', 'onclick' => '$("#formDefault").submit();']); ?> <?php echo Html::a('Reset', ['backend/default/index'], ['class' => 'btn btn-default']); ?> </div>
</div> </div> <!-- VINCULACION CON LOS PLANES --> <div class="panel panel-primary"> <div class="panel-heading"> <span>VINCULACION CON LOS PLANES</span> </div> <div class="panel-body"> <?php echo $form->field($model, 'objetivo_general')->hiddenInput(); ?> <div class="form-group"> <?php echo AutoComplete::widget(['model' => $model, 'name' => 'general', 'options' => ['class' => 'form-control', 'placeholder' => 'Escriba para buscar'], 'clientOptions' => ['source' => $objetivo_general, 'autoFill' => true, 'select' => new JsExpression("function(event, ui) {\n \$('#proyecto-objetivo_general').val(ui.item.id);\n }")]]); ?> </div> <?php echo $form->field($model, 'objetivo_estrategico_institucional')->textarea(['rows' => 6]); ?> </div> </div> <!-- LOCALIZACION DEL PROYECTO--> <div class="panel panel-primary"> <div class="panel-heading"> <span>LOCALIZACIÓN DEL PROYECTO</span> </div> <div class="panel-body">
/* @var $form yii\widgets\ActiveForm */ ?> <div class="u2-branch-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'branch_id')->dropDownList(\backend\models\master\Branch::selectOptions(), ['style' => 'width:60%;'])->label('Branch'); ?> <?php $data = User::find()->select(['username as value', 'username as label', 'id as id'])->asArray()->all(); echo AutoComplete::widget(['model' => $model, 'attribute' => 'user_name', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => $data, 'autoFill' => true, 'minLength' => '1', 'select' => new JsExpression("function( event, ui ) {\n \$('#u2branch-user_id').val(ui.item.id);\n }"), 'search' => new JsExpression("function( event, ui ) {\n \$('#u2branch-user_id').val('');\n }")]]); ?> <?php echo $form->field($model, 'user_id')->hiddenInput()->label(false); ?> <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 use yii\web\JsExpression; use yii\jui\AutoComplete; ?> <div class="box box-info"> <div class="box-header"> <div class="form-group" style="padding: 15px;"> <label for="product">Product :</label> <?php echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('yii.global.sourceProduct'), 'select' => new JsExpression('yii.pos.onSelectProduct'), 'delay' => 500], 'options' => ['class' => 'form-control']]); ?> </div> <div class="box-body" style="text-align: right; padding-top: 0px; padding-bottom: 0px;"> <input type="hidden" id="h-total-price"><h2>Rp<span id="total-price"></span></h2> </div> </div> <table id="detail-grid" class="table table-striped no-padding" style="padding: 0px;"> <thead style="display: none"> <tr> <td style="width: 50px"> <a data-action="delete" title="Delete" href="#"><span class="glyphicon glyphicon-trash"></span></a> <input type="hidden" data-field="price"><input type="hidden" data-field="id_uom"> <input type="hidden" data-field="id_product"> </td> <td> <ul class="nav nav-list"> <li class="item"> <span data-text="nm_product"></span> </li> <li class="qty">
$allow_edit = $model->status == Purchase::STATUS_DRAFT && ($this->context->action->id == 'create' || $this->context->action->id == 'update') ? true : false; $allow_edit = $model->isNewRecord ? true : $allow_edit; ?> <div class="nav-tabs-custom"> <ul class="nav nav-tabs"> <li class="active"><a href="#detail-pane" data-toggle="tab">Detail Items</a></li> <li><a href="#delivery-pane" data-toggle="tab">Deliveries</a></li> <li><a href="#payments-pane" data-toggle="tab">Invoice & Payments</a></li> </ul> <div class="tab-content" style="min-height: 20em;"> <div class="tab-pane active" id="detail-pane" style="min-height: 10em;"> <div class="detail-pane-head col-lg-12" style="padding: 10px; padding-left: 0px; padding-right: 0px;"> <div class="col-xs-10"> Product : <?php echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('biz.master.sourceProduct'), 'select' => new JsExpression('biz.purchase.onProductSelect'), 'delay' => 100], 'options' => ['class' => 'form-control', 'readOnly' => !$allow_edit]]); ?> </div> <div class="col-xs-2"> Item Discount: <?php echo Html::activeTextInput($model, 'discount', ['id' => 'item-discount', 'class' => 'form-control', 'readOnly' => !$allow_edit]); ?> </div> </div> <div class="detail-pane-body col-lg-12"> <table class="tabular table-striped col-lg-12"> <thead style="background-color: #9d9d9d;"> <th class="col-lg-4">Product</th> <th class="col-lg-1">Qty</th> <th class="col-lg-2">Uom</th>
</h1> <p> <?php if (Yii::$app->user->can(User::PERMISSION_CREATE)) { ?> <?php echo Html::a('Create User', ['create'], ['class' => 'btn btn-success']); ?> <?php } ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'auth', 'value' => 'auth.item_name', 'label' => 'Role', 'filter' => Html::activeDropDownList($searchModel, 'auth', \common\models\AuthAssignment::getRoles(), ['class' => 'form-control', 'prompt' => ''])], ['attribute' => 'username', 'filter' => AutoComplete::widget(['model' => $searchModel, 'attribute' => 'username', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => User::getAutoCompleteItems('username')]])], ['attribute' => 'email', 'format' => 'email', 'filter' => AutoComplete::widget(['model' => $searchModel, 'attribute' => 'email', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => User::getAutoCompleteItems('email')]])], ['attribute' => 'last_login', 'filter' => false, 'format' => 'date'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}{delete}', 'buttons' => ['update' => function ($url, $model, $key) { $options = ['title' => Yii::t('yii', 'Update'), 'aria-label' => Yii::t('yii', 'Update'), 'data-method' => 'post', 'data-pjax' => '0']; if (Yii::$app->user->can(User::PERMISSION_UPDATE) && Yii::$app->user->can(User::PERMISSION_CAN_CUD, $model)) { return Html::a('<span class="glyphicon glyphicon-pencil"></span>', Url::toRoute(['user/update', 'id' => $model->id]), $options); } return ''; }, 'delete' => function ($url, $model, $key) { $options = ['title' => Yii::t('yii', 'Delete'), 'aria-label' => Yii::t('yii', 'Delete'), 'data-method' => 'post', 'data-confirm' => 'Are you sure you want to delete this item?', 'data-pjax' => '0']; if (Yii::$app->user->can(User::PERMISSION_DELETE) && Yii::$app->user->can(User::PERMISSION_CAN_CUD, $model)) { return Html::a('<span class="glyphicon glyphicon-trash"></span>', Url::toRoute(['user/delete', 'id' => $model->id]), $options); } return ''; }]]]]); ?> </div> </div>
<?php use yii\web\JsExpression; use yii\jui\AutoComplete; use yii\helpers\Html; use biz\models\TransferDtl; use biz\tools\Helper; ?> <div class="col-lg-9" style="padding-left: 0px;"> <div class="panel panel-info"> <div class="panel-heading"> Product : <?php echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('yii.global.sourceProduct'), 'select' => new JsExpression('yii.transfer.onProductSelect'), 'delay' => 100]]); ?> </div> <table id="detail-grid" class="table table-striped"> <?php /** * * @param TransferDtl $model * @param integer $index * @return string */ function renderRow($model, $index) { ob_start(); ob_implicit_flush(false); ?> <tr> <td style="width: 50px">
use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; use yii\jui\AutoComplete; use yii\web\JsExpression; use common\models\EdgeCourse; $courseAr = ArrayHelper::map(EdgeCourse::find(["status" => "active"])->all(), "course_id", "name"); $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'course_id')->dropDownList($courseAr, ["prompt" => "Choose..."]); ?> <div class="form-group"> <label for="edgevolunteer-reference_id" class="control-label">Student Name</label> <?php echo AutoComplete::widget(['name' => 'State', 'id' => 'edgevolunteer-reference_id', 'options' => ["class" => "form-control"], 'clientOptions' => ['source' => new JsExpression("function(request, response) {\n \t\t\t\t\$.getJSON('/admin/edge/getstudentforen/'+jQuery('#edgevolunteer-course_id').val(), {\n \t\t\t\tterm: jQuery('#edgevolunteer-reference_id').val()\n \t\t\t\t}, response);\n\t\t\t\t}"), 'minLength' => "3", 'select' => new JsExpression("function( event, ui ) {\n \t\tvar text = '<div class=\\'col-xs-3\\'><div class=\\'checkbox\\'><label><input type=\\'checkbox\\' value=\\''+ui.item.id+'\\' name=\\'enrollStudent[]\\'>'+ui.item.label+'</label></div></div>';\n jQuery('#assignS').show().append(text);\n jQuery('#edgevolunteer-reference_id').val('');\n return false;\n \t\t}")]]); ?> </div> <div class="row" id="" style=""> </div> <div class="row" id="assignS" style="display: none;"> <div class='col-xs-12'><a href="javascript:void(0)" onclick="Util._checkAll('assignS')">Check All</a> <a href="javascript:void(0)" onclick="Util._unCheckAll('assignS')">Uncheck All</a></div> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Enroll Student' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end();