protected function renderInput() { if (!$this->maskEnabled) { if ($this->hasModel()) { return Html::activeTextInput($this->model, $this->attribute, $this->options); } return Html::textInput($this->name, $this->value, $this->options); } return MaskedInput::widget(['mask' => $this->mask ?: $this->generateMask(), 'model' => $this->hasModel() ? $this->model : null, 'attribute' => $this->hasModel() ? $this->attribute : null, 'value' => $this->hasModel() ? null : $this->value, 'options' => $this->options, 'clientOptions' => $this->maskOptions]); }
$form = ActiveForm::begin(['action' => ['update'], 'options' => []]); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'responsive' => true, 'responsiveWrap' => true, 'hover' => true, 'resizableColumns' => false, 'showPageSummary' => true, 'showFooter' => true, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th"></i> <span class="hidden-xs"></span> ' . Html::encode($this->title) . '</h3>', 'before' => '<div class="row">' . '<div class="col-xs-5 col-md-4 col-md-3 col-lg-2">' . DatePicker::widget(['name' => 'reportDate', 'value' => $reportDates[1], 'options' => ['id' => 'reportDate', 'placeholder' => 'Tgl Emiten ...'], 'readonly' => true, 'removeButton' => false, 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-M-yyyy', 'autoclose' => true], 'pluginEvents' => ["changeDate" => "function(e) {\n changeDate(e.format(0,'yyyy-m-d'))\n }"]]) . '</div>' . '<div class="col-xs-5 col-sm-4 col-md-3 col-lg-2">' . '</div>' . '</div>', 'after' => Html::submitButton('<i class="glyphicon glyphicon-floppy-disk"></i> Simpan', ['class' => 'btn btn-success']) . ' ' . Html::a('<i class="glyphicon glyphicon-trash"></i> Hapus', ['delete', 'date' => $reportDates[1]], ['class' => 'btn btn-danger', 'data-method' => 'post', 'data-pjax' => '0', 'data-confirm' => 'Apakah data akan dihapus?']) . ' ', 'footer' => false], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Reset Grid'])], ButtonExport::widget()], 'export' => ['fontAwesome' => true], 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'EMITEN_KODE', 'label' => 'Kode', 'filter' => false, 'format' => 'raw', 'options' => ['width' => '100px'], 'hAlign' => 'center', 'vAlign' => 'middle', 'value' => function ($data) { return Html::a($data->EMITEN_KODE, '', ['onclick' => 'setFromGridview($(this)); return false;', 'data-pjax' => '0']); }], ['attribute' => 'JMLLOT', 'label' => 'Jml Lot', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['attribute' => 'JMLSAHAM', 'label' => 'Jml Saham', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['label' => 'Range Beli', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { // Range Beli = saldob / (jmllotb * jmllbrsaham) -> Ket: saldob, jmllotb dr detemiten; jmllbrsaham dr lotshare. //koreksi: Range Beli = saldob / jmlsahamb -> Ket: saldob, jmlsahamb dr detemiten. $range_beli = (double) @($data->SALDOB / $data->JMLSAHAMB); return $range_beli; }], ['label' => 'Range', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { //Range = saldo / jmlsaham. $range = (double) @($data->SALDO / $data->JMLSAHAM); return $range; }], ['attribute' => 'SALDO', 'label' => 'Saldo', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['attribute' => 'HARGA', 'label' => 'Harga', 'filter' => false, 'format' => 'raw', 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { return MaskedInput::widget(['name' => 'harga[' . $data->EMITEN_KODE . ']', 'value' => number_format($data->HARGA, 2), 'clientOptions' => ['alias' => 'numeric', 'groupSeparator' => ',', 'radixPoint' => '.', 'autoGroup' => true, 'removeMaskOnSubmit' => true]]); }], ['attribute' => 'TGLAKHIR', 'label' => 'Tgl Akhir', 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['label' => 'Saldo **)', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { //Saldo**) = jmlsaham * harga $saldo = $data->HARGA * $data->JMLSAHAM; return $saldo; }, 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['label' => '(+) %', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) use($total_saldo) { //persen = (jmlsaham * harga) * 100 / totalsaldo $persen = (double) @($data->JMLSAHAM * $data->HARGA * 100 / $total_saldo); return $persen; }, 'footer' => 'Total Laba/Rugi'], ['label' => 'Laba(+) / Rugi(-)', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) { //laba/rugi = (jmlsaham * harga) - saldo $laba_rugi = $data->JMLSAHAM * $data->HARGA - $data->SALDO; return $laba_rugi; }, 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM, 'footer' => number_format($total_laba_rugi, 2)]]]); ?> <?php
$url = Yii::$app->urlManager->createUrl(['mensajes/create-ajax', 'modelName' => 'frontend\\models\\Vehiculos', 'modelID' => $model->ing_id_vehiculo]); return $url; } if ($action === 'view') { $url = Yii::$app->urlManager->createUrl(['accesos/view', 'id' => $model->id_acceso]); return $url; } }], ['attribute' => 'id_acceso', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->id_acceso, Yii::$app->urlManager->createUrl(['accesos/view', 'id' => $model->id_acceso]), ['title' => 'Ver detalle', 'target' => '_blank', 'data-pjax' => '0']); }], ['attribute' => 'ing_fecha', 'options' => ['style' => 'width:275px;'], 'contentOptions' => ['style' => 'width:275px;'], 'headerOptions' => ['style' => 'width:275px;'], 'format' => ['date'], 'filter' => MaskedInput::widget(['model' => $searchModel, 'attribute' => 'ing_fecha', 'mask' => '99/99/9999'])], ['attribute' => 'ing_hora', 'format' => ['time']], ['attribute' => 'id_persona', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->id_persona, Yii::$app->urlManager->createUrl(['personas/view', 'id' => $model->id_persona]), ['title' => 'Ver detalle de persona', 'target' => '_blank', 'data-pjax' => '0']); }], 'r_apellido', 'r_nombre', 'r_nombre2', 'r_nro_doc', ['attribute' => 'ing_id_vehiculo', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->ing_id_vehiculo, Yii::$app->urlManager->createUrl(['vehiculos/view', 'id' => $model->ing_id_vehiculo]), ['title' => 'Ver detalle del vehiculo', 'target' => '_blank', 'data-pjax' => '0']); }], 'r_ing_patente', 'r_ing_marca', 'r_ing_modelo', 'r_ing_color', 'ing_id_porton', 'r_ing_usuario', ['attribute' => 'id_concepto', 'value' => 'desc_concepto', 'filter' => AccesosConceptos::getListaConceptos(true)], 'ing_id_llave', 'motivo', ['attribute' => 'id_autorizante', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->id_autorizante, Yii::$app->urlManager->createUrl(['personas/view', 'id' => $model->id_autorizante]), ['title' => 'Ver detalle de autorizante', 'target' => '_blank', 'data-pjax' => '0']); }], 'r_aut_apellido', 'r_aut_nombre', 'r_aut_nombre2', 'id_uf', ['attribute' => 'egr_fecha', 'format' => ['date'], 'filter' => MaskedInput::widget(['model' => $searchModel, 'attribute' => 'egr_fecha', 'mask' => '99/99/9999'])], ['attribute' => 'egr_hora', 'format' => ['time']], ['attribute' => 'egr_id_vehiculo', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->egr_id_vehiculo, Yii::$app->urlManager->createUrl(['vehiculos/view', 'id' => $model->egr_id_vehiculo]), ['title' => 'Ver detalle del vehiculo', 'target' => '_blank', 'data-pjax' => '0']); }], 'r_egr_patente', 'r_egr_marca', 'r_egr_modelo', 'r_egr_color', 'egr_id_porton', 'r_egr_usuario', 'egr_id_llave', 'control', ['attribute' => 'estado', 'value' => function ($data) { return Accesos::getEstados($data->estado); }, 'filter' => Accesos::getEstados()], 'motivo_baja']; if (\Yii::$app->user->can('exportarConsAccesos')) { // contiene la selección inicial de columnas, es decir, todas // por ejemplo [0,1,2,3] $poSel = []; // contiene las descripciones de las columnas // por ejemplo [0=>'Portón', 1=>'Usuario',2=>'Fecha',3=>'Texto'] $poItems = []; $i = -1; foreach ($columns as $c) { $i++; // si es un array busca la clave "attribute"
<?php echo $widget->form->field($widget->model, $widget->attribute, ['addon' => ['prepend' => ['content' => $buttonDropdown, 'asButton' => true]]])->widget(MaskedInput::className(), $widgetConfig)->label(false); ?> <?php } else { ?> <div class="input-group" > <span class="input-group-btn"><?php echo $buttonDropdown; ?> </span> <?php echo MaskedInput::widget($widgetConfig); ?> </div> <?php if ($widget->hint) { ?> <?php echo Html::activeHint($widget->model, $widget->attribute, ['hint' => $widget->hint]); ?> <?php } ?>
} if ($action === 'mensajeP') { $url = Yii::$app->urlManager->createUrl(['mensajes/create-ajax', 'modelName' => 'frontend\\models\\Personas', 'modelID' => $model->id_persona]); return $url; } if ($action === 'mensajeV') { $url = Yii::$app->urlManager->createUrl(['mensajes/create-ajax', 'modelName' => 'frontend\\models\\Vehiculos', 'modelID' => $model->ing_id_vehiculo]); return $url; } if ($action === 'view') { $url = Yii::$app->urlManager->createUrl(['accesos/view', 'id' => $model->id]); return $url; } }], ['class' => '\\kartik\\grid\\CheckboxColumn', 'visible' => !$consulta], ['attribute' => 'id', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->id, Yii::$app->urlManager->createUrl(['accesos/view', 'id' => $model->id]), ['title' => 'Ver detalle', 'target' => '_blank', 'data-pjax' => '0']); }], ['attribute' => 'ing_fecha', 'format' => ['date'], 'filter' => MaskedInput::widget(['model' => $searchModel, 'attribute' => 'ing_fecha', 'mask' => '99/99/9999'])], ['attribute' => 'ing_hora', 'format' => ['time']], ['attribute' => 'id_persona', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->id_persona, Yii::$app->urlManager->createUrl(['personas/view', 'id' => $model->id_persona]), ['title' => 'Ver detalle de persona', 'target' => '_blank', 'data-pjax' => '0']); }], 'r_apellido', 'r_nombre', 'r_nombre2', 'r_nro_doc', ['attribute' => 'ing_id_vehiculo', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return Html::a($model->ing_id_vehiculo, Yii::$app->urlManager->createUrl(['vehiculos/view', 'id' => $model->ing_id_vehiculo]), ['title' => 'Ver detalle del vehiculo', 'target' => '_blank', 'data-pjax' => '0']); }], 'r_ing_patente', 'r_ing_marca', 'r_ing_modelo', 'r_ing_color', ['attribute' => 'id_concepto', 'value' => 'desc_concepto', 'filter' => AccesosConceptos::getListaConceptos(false)], 'motivo', 'control']; if ($consulta && \Yii::$app->user->can('exportarConsDentro')) { // contiene la selección inicial de columnas, es decir, todas // por ejemplo [0,1,2,3] $poSel = []; // contiene las descripciones de las columnas // por ejemplo [0=>'Portón', 1=>'Usuario',2=>'Fecha',3=>'Texto'] $poItems = []; $i = -1; foreach ($columns as $c) { $i++; // si es un array busca la clave "attribute"
use frontend\assets\ChosenAsset; use yii\widgets\Pjax; use yii\authclient\widgets\AuthChoice; use yii\widgets\MaskedInput; use yii\helpers\Url; /* @var $this yii\web\View */ /* @var $model frontend\models\RegForm */ /* @var $modelUser common\models\User */ /* @var $form ActiveForm */ ?> <div class="container"> <div class="main-reg"> <div class="col-md-6 col-md-offset-3"> <?php Pjax::begin(['enablePushState' => false]); MaskedInput::widget(['name' => 'phoneada', 'mask' => 'asdasd']); ChosenAsset::register($this); $form = ActiveForm::begin(['action' => Url::to(['/main/reg']), 'id' => 'form', 'options' => ['data-pjax' => true]]); ?> <div class="row"> <div class="col-md-12"> <div class="row"> <div class="col-md-6"> <?php if (!isset($phoneMask)) { $model->country_id = \Yii::$app->getRequest()->getCookies()->getValue('_countryId'); } ?> <?php echo $form->field($model, 'country_id')->dropDownList($model->countriesList, ['class' => 'form-control chosen-select', 'prompt' => Yii::t('app', 'Select country'), 'onchange' => ' $.pjax({
?> <br><br> <?php ActiveForm::end(); ?> <?php $form = ActiveForm::begin(); ?> <?php echo '<label class="control-label">Data prevista do ingresso do futuro contratado(a):</label><br>'; echo MaskedInput::widget(['name' => 'data_ingresso', 'clientOptions' => ['alias' => 'mm/dd/yyyy']]); ?> <?php ActiveForm::end(); ?> <br> <?php $form = ActiveForm::begin(['id' => 'login-form-inline', 'type' => ActiveForm::TYPE_INLINE, 'formConfig' => ['showErrors' => true]]); ?> <?php
?> <div class="adult-index"> <?php $gridColumns = ['id', 'user_id', 'user_full_name', 'printed_name', 'signature_img:ntext', 'date:date', 'email:email', 'country', 'city', 'zip_code', 'phone', 'adult_gender', 'adult_dob:date', 'address', 'state']; ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'resizableColumns' => true, 'export' => false, 'hover' => true, 'toolbar' => ['{export}', '{toggleData}'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'user_full_name', ['attribute' => 'date', 'filter' => '', 'value' => function ($data) { return date('d-m-Y', $data->date); }], ['attribute' => 'email', 'value' => function ($data) { if ($data->email) { return $data->email; } else { return 'No email'; } }], ['attribute' => 'phone', 'filter' => MaskedInput::widget(['attribute' => 'phone', 'model' => $searchModel, 'name' => 'input-5', 'mask' => ['99-999-9999', '999-999-9999']]), 'value' => function ($data) { if ($data->phone) { return $data->phone; } else { return 'No phone'; } }], ['attribute' => 'adult_gender', 'format' => 'html', 'filter' => Html::activeDropDownList($searchModel, 'adult_gender', ['1' => 'Male', '0' => 'Female'], ['class' => 'form-control', 'prompt' => 'All']), 'value' => function ($data) { if ($data->adult_gender == 0) { return "Female"; } elseif ($data->adult_gender == 1) { return "Male"; } else { return "<span style='color: #ff0000;'>unknown</span>"; } }], ['attribute' => 'adult_dob', 'filter' => '', 'value' => function ($data) { return date('d-m-Y', $data->adult_dob);
use common\widgets\Chosen\ChosenAsset; use common\widgets\FontAwesome\AssetBundle; use yii\widgets\MaskedInput; use yii\helpers\Url; use yii\bootstrap\Html; /* @var $this yii\web\View */ /* @var $modelAdMain common\models\AdMain */ $this->title = Yii::t('app', 'Post ad') . ': ' . Yii::t('app', 'Select Category'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="container" style="margin-top: 0 !important; padding-top: 0 !important;"> <?php Pjax::begin([]); AssetBundle::register($this); ChosenAsset::register($this); MaskedInput::widget(['name' => 'masked-input_init', 'clientOptions' => ['alias' => 'decimal']]); ?> <?php echo StepsNavigation::widget(['targetStep1' => '', 'urlStep1' => Url::to(['/ad/default/index']), 'urlStep2' => Url::to(['/#']), 'urlStep3' => Url::to(['/#']), 'urlStep4' => Url::to(['/#']), 'titleStep1' => Yii::t('app', 'Step 1'), 'titleStep2' => Yii::t('app', 'Step 2'), 'titleStep3' => Yii::t('app', 'Step 3'), 'titleStep4' => Yii::t('app', 'Complite'), 'headerStep1' => Yii::t('app', 'Select Category'), 'headerStep2' => Yii::t('app', 'Select the type of property and fill out a simple form.'), 'headerStep3' => Yii::t('app', 'Add images'), 'headerStep4' => Yii::t('app', 'Post the ad'), 'contentStep1' => Yii::t('app', 'Select Category: content'), 'contentStep2' => Yii::t('app', 'Fill in the form: content'), 'contentStep3' => Yii::t('app', 'Add images: content'), 'contentStep4' => Yii::t('app', 'Post the ad: content'), 'classLinkStep1' => 'active', 'classLinkStep2' => 'disabled', 'classLinkStep3' => 'disabled', 'classLinkStep4' => 'disabled', 'classContentStep1' => 'tab-pane active', 'classContentStep2' => 'tab-pane', 'classContentStep3' => 'tab-pane', 'classContentStep4' => 'tab-pane']); ?> <h1 class="text-center" style="margin-bottom: 40px;"><?php echo Html::encode($this->title); ?> </h1> <div class="col-md-12 text-center"> <?php echo Nav::widget(['items' => $modelAdMain->mainCategoryList, 'activateParents' => true, 'encodeLabels' => false, 'options' => ['class' => 'nav nav-pills']]); ?> </div> <?php Pjax::end();
<label for="client-last" class="col-lg-4 control-label">Фамилия</label> <div class="col-lg-8"> <input class="form-control" id="client-last"> </div> </div> <div class="form-group required"> <label for="client-first" class="col-lg-4 control-label">Имя</label> <div class="col-lg-8"> <input class="form-control" id="client-first"> </div> </div> <div class="form-group required"> <label for="client-phone" class="col-lg-4 control-label">Телефон</label> <div class="col-lg-8"> <?php echo MaskedInput::widget(['name' => 'phone', 'id' => 'client-phone', 'mask' => '+7(999)999-9999', 'class' => 'form-control']); ?> </div> </div> </div> <?php Modal::end(); Modal::begin(['header' => '<h4><b>Добавление клиента</b><h4>', 'footer' => '<div class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Ок</div>', 'id' => 'successView', 'size' => 'modal-sm']); ?> <p>Клиент успешно добавлен!</p> <?php Modal::end(); ?> <script type="text/javascript"> var counter = <?php echo $count;
$contentToolbar = \nterms\pagesize\PageSize::widget(['defaultPageSize' => \Yii::$app->params['libro.defaultPageSize'], 'sizes' => \Yii::$app->params['libro.sizes'], 'label' => '', 'options' => ['class' => 'btn btn-default', 'title' => 'Cantidad de elementos por página']]); if (\Yii::$app->user->can('exportarLibro')) { $toolbar = ['{export} ', ['content' => $contentToolbar]]; } else { $toolbar = [['content' => $contentToolbar]]; } if (\Yii::$app->session->get('libroFecDesde')) { $lbl2 = ' (' . Yii::$app->formatter->asDate(\Yii::$app->session->get('libroFecDesde')) . '-' . Yii::$app->formatter->asDate(\Yii::$app->session->get('libroFecHasta')) . ')'; } else { $lbl2 = ''; } $pdfHeader = ['L' => ['content' => \Yii::$app->params['lblName']], 'C' => ['content' => $this->title . $lbl2, 'font-style' => 'B'], 'R' => ['content' => '']]; $pdfFooter = ['L' => ['content' => \Yii::$app->params['lblName2']], 'C' => ['content' => 'página {PAGENO} de {nb}'], 'R' => ['content' => 'Fecha:{DATE d/m/Y}']]; // las columnas se definen fuera del gridview para poder extraer las etiquetas para el // popover que define las columnas a exportar $columns = [['attribute' => 'idporton', 'options' => ['style' => 'width:55px']], ['attribute' => 'descUsuario', 'value' => 'userCreatedBy.username', 'options' => ['style' => 'width:140px']], ['attribute' => 'created_at', 'options' => ['style' => 'width:160px'], 'format' => ['datetime'], 'filter' => MaskedInput::widget(['model' => $searchModel, 'attribute' => 'created_at', 'mask' => '99/99/9999'])], ['attribute' => 'texto', 'format' => 'text', 'width' => '500px'], ['class' => 'kartik\\grid\\ActionColumn', 'header' => Html::a('<span class="glyphicon glyphicon-plus-sign"></span>', ['create'], ['class' => 'btn btn-sm btn-primary', 'title' => Yii::t('app', 'Agregar texto')]), 'headerOptions' => ['style' => 'text-align:center'], 'options' => ['style' => 'width:70px'], 'template' => '{view} {comentario}', 'buttons' => ['comentario' => function ($url, $model) { $c = Comentarios::getComentariosByModelId($model->className(), $model->id); $text = '<span class="glyphicon glyphicon-copyright-mark"'; if (!empty($c)) { $text .= ' style="color:#FF8000"></span>'; $titl = 'Ingresar nuevo/Ver comentarios'; } else { $text .= '></span>'; $titl = 'Ingresar nuevo comentario'; } return Html::a($text, $url, ['title' => $titl, 'onclick' => '$.ajax({ type :"POST", cache : false, url : $(this).attr("href"), success : function(response) { $("#divcomentarionuevo").html(response);
<div class="col-sm-6"> <?php echo $form->field($modelEmpregos, "[{$i}]cargo")->textInput(['maxlength' => true]); ?> </div> <div class="col-sm-2"> <?php echo '<label class="control-label">Data de Inicio</label>'; echo MaskedInput::widget(['model' => $modelEmpregos, 'attribute' => "[{$i}]inicio", 'name' => "Data de Inicio", 'mask' => '99/99/9999']); ?> </div> <div class="col-sm-2"> <?php echo '<label class="control-label">Data de Término</label>'; echo MaskedInput::widget(['model' => $modelEmpregos, 'attribute' => "[{$i}]termino", 'name' => "Data de Término", 'mask' => '99/99/9999']); ?> </div> </div><!-- .row --> <div class="row"> <div class="col-sm-12"> <?php echo $form->field($modelEmpregos, "[{$i}]atividades")->textarea(['rows' => 2]); ?> </div> </div><!-- .row --> </div> </div>
use app\models\Weeks; use yii\widgets\LinkPager; use yii\helpers\Url; use yii\helpers\Html; $this->title = 'Участники'; ?> <div> <?php echo Html::beginForm('', 'post', ['id' => 'filter-form', 'class' => 'col-md-3']); echo "<br/>"; echo Html::textInput("filter_lastname", $filter_lastname, ["placeholder" => "Фамилия", "class" => "form-control"]); echo "<br/>"; echo Html::textInput("filter_firstname", $filter_firstname, ["placeholder" => "Имя", "class" => "form-control"]); echo "<br/>"; echo \yii\widgets\MaskedInput::widget(['name' => 'filter_phone', 'mask' => '+7 (999) 999-99-99', 'value' => $filter_phone, 'options' => ['placeholder' => '+7 (___) ___-__-__', 'class' => 'form-control']]); echo "<br/>"; echo Html::submitButton("Поиск", ["class" => "btn btn-primary"]); echo Html::endForm(); ?> <div class="clearfix"></div> <br/> <?php if (count($model) > 0) { ?> <table class="table table-hover shell-table"> <thead> <tr> <th>Фамилия</th> <th>Имя</th>
/** * @inheritdoc */ public function run() { parent::run(); $view = $this->getView(); if (is_array($this->maskOptions)) { if ($this->hasModel()) { $this->maskOptions = ArrayHelper::merge($this->maskOptions, ['options' => $this->options, 'model' => $this->model, 'attribute' => $this->attribute]); } else { $this->maskOptions = ArrayHelper::merge($this->maskOptions, ['options' => $this->options, 'name' => $this->name, 'value' => $this->value]); } $input = MaskedInput::widget($this->maskOptions); } else { $input = $this->hasModel() ? Html::activeTextInput($this->model, $this->attribute, $this->options) : Html::textInput($this->name, $this->value, $this->options); } $options = Json::encode($this->pluginOptions); $callback = isset($this->callback) ? ", {$this->callback}" : ''; $script = "moment.locale('{$this->locale}');"; $script .= "\$('#{$this->options['id']}').daterangepicker({$options}{$callback});"; $view->registerJs($script); echo strtr($this->template, ['{input}' => $input]); MomentAsset::$locale = $this->locale; MomentAsset::register($view); DateRangePickerAsset::register($view); }
opacity: 0.5; background: #ffffff url("../images/loading.gif") top center no-repeat !important; } '); ?> <div class="cortes-energia-index"> <h3><?php echo Html::encode($this->title); ?> </h3> <?php $lbl2 = ''; $pdfHeader = ['L' => ['content' => \Yii::$app->params['lblName']], 'C' => ['content' => $this->title . $lbl2, 'font-style' => 'B'], 'R' => ['content' => '']]; $pdfFooter = ['L' => ['content' => \Yii::$app->params['lblName2']], 'C' => ['content' => 'página {PAGENO} de {nb}'], 'R' => ['content' => 'Fecha:{DATE d/m/Y}']]; $columns = [['attribute' => 'hora_desde', 'format' => ['datetime'], 'filter' => MaskedInput::widget(['model' => $searchModel, 'attribute' => 'hora_desde', 'mask' => '99/99/9999'])], ['attribute' => 'hora_hasta', 'format' => ['datetime'], 'filter' => MaskedInput::widget(['model' => $searchModel, 'attribute' => 'hora_hasta', 'mask' => '99/99/9999'])], ['attribute' => 'estado', 'value' => function ($data) { return CortesEnergia::getEstados($data->estado); }, 'filter' => $searchModel->estados], 'motivo_baja', ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{view} {comentario} {generadores}', 'buttons' => ['comentario' => function ($url, $model) { $c = Comentarios::getComentariosByModelId($model->className(), $model->id); $text = '<span class="glyphicon glyphicon-copyright-mark"'; if (!empty($c)) { $text .= ' style="color:#FF8000"></span>'; $titl = 'Ingresar nuevo/Ver comentarios'; } else { $text .= '></span>'; $titl = 'Ingresar nuevo comentario'; } return Html::a($text, $url, ['title' => $titl, 'onclick' => '$.ajax({ type :"POST", cache : false, url : $(this).attr("href"),
use yii\widgets\MaskedInput; use yii\helpers\BaseHtml; /* @var $this yii\web\View */ /* @var $model app\models\Fornecedor */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="fornecedor-form"> <?php $form = ActiveForm::begin(); ?> <?= Html::activeLabel($model, BaseHtml::getAttributeName('cnpj')) ?> <?php // $form->field($model, 'cnpj')->textInput(); echo MaskedInput::widget([ 'model'=>$model, 'attribute' => 'cnpj', 'mask'=>'99.999.999/9999-99', ]); ?> <?= $form->field($model, 'nome')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'endereco')->textInput(['maxlength' => true]) ?> <div class="form-group"> <?= Html::submitButton($model->isNewRecord ? Yii::t('yii', 'Create') : Yii::t('yii', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> </div> <?php ActiveForm::end(); ?>