MaskedInput is similar to [[Html::textInput()]] except that an input mask will be used to force users to enter properly formatted data, such as phone numbers, social security numbers. To use MaskedInput, you must set the [[mask]] property. The following example shows how to use MaskedInput to collect phone numbers: ~~~ echo MaskedInput::widget([ 'name' => 'phone', 'mask' => '999-999-9999', ]); ~~~ The masked text field is implemented based on the jQuery masked input plugin.
Since: 2.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends InputWidget
Exemple #1
1
        <h3>Форма обратной связи</h3>

        <?php 
$form = ActiveForm::begin(['id' => 'form', 'errorCssClass' => '', 'fieldConfig' => ['template' => "{input}\n{error}", 'options' => ['tag' => 'label'], 'errorOptions' => ['class' => 'error-message']]]);
?>

        <?php 
echo $form->field($model, 'name')->textInput(['placeholder' => 'ФИО*:']);
?>

        <?php 
echo $form->field($model, 'email')->input('email', ['placeholder' => 'Email*:']);
?>

        <?php 
echo $form->field($model, 'phone')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '+7-999-999-99-99', 'options' => ['placeholder' => 'phone*:']]);
?>

        <?php 
echo $form->field($model, 'body', ['options' => ['class' => "message"]])->textarea(['placeholder' => 'Текст сообщения*:']);
?>


        <div>
            <div class="clear"></div>
            <div class="btns">

                <?php 
echo Html::submitInput('Отправить', ['class' => 'btn']);
?>
                <span>* - Необходимо заполнить поля</span>
echo $form->field($model, 'cargo')->widget(Select2::classname(), ['data' => array_merge(["" => ""], $data_cargos), 'options' => ['placeholder' => 'Selecione o cargo...'], 'pluginOptions' => ['allowClear' => true]]);
?>


                    <?php 
echo $form->field($model, 'nome')->textInput(['maxlength' => true, 'placeholder' => 'Nome completo...']);
?>

                    <?php 
echo $form->field($model, "datanascimento")->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATETIME, 'displayFormat' => 'dd/MM/yyyy', 'autoWidget' => false, 'widgetClass' => 'yii\\widgets\\MaskedInput', 'options' => ['mask' => '99/99/9999', 'options' => ['class' => 'form-control', 'placeholder' => 'Data nascimento...']]]);
?>

                    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['cpf' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu CPF...']], 'identidade' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu RG...']], 'orgao_exped' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe o orgão expedidor...']], 'sexo' => ['type' => Form::INPUT_RADIO_LIST, 'items' => [true => 'Masculino', false => 'Feminino'], 'options' => ['inline' => true]]]]);
?>

                    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['email' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail...']], 'emailAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail alternativo...']], 'telefone' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone...']], 'telefoneAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone alternativo...']]]]);
?>
                       
                    <?php 
$form->field($model, 'cpf')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '999.999.999-99']);
?>

                    <?php 
$form->field($model, 'telefone')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '(99)99999-999[9]']);
?>

                    <?php 
$form->field($model, 'telefoneAlt')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '(99)99999-999[9]']);
 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]);
 }
Exemple #4
0
 public function init()
 {
     /* @var $formatter Formatter */
     $formatter = Yii::$app->formatter;
     if ($this->mask === null) {
         $this->mask = Yii::$app->formatter->pasportNomerFormat;
     }
     parent::init();
     $formatter->nullDisplay = '';
     $this->model->{$this->attribute} = $formatter->asPasportNomer($this->model->{$this->attribute});
 }
Exemple #5
0
        </div>
        <div style="clear:both;"></div>
    </div>

    <div class="row tech-char">
        <div class="ab_reg">
            Технические характеристики

        </div>

        <?php 
echo $form->field($model, 'year')->widget(MaskedInput::classname(), ['mask' => '9{1,4}', 'clientOptions' => ['greedy' => true, 'alias' => 'year']])->textInput(['maxlength' => true, 'class' => 'inptxt auto-width']);
?>

        <?php 
echo $form->field($model, 'power')->widget(MaskedInput::classname(), ['mask' => '9{1,3}', 'clientOptions' => ['greedy' => true, 'alias' => 'power']])->textInput(['maxlength' => true, 'class' => 'inptxt auto-width']);
?>

        <?php 
echo $form->field($model, 'trans')->radioList($model->getTransList(), ['default' => '1']);
?>
    </div>

    <div class="row tech-char">

        <?php 
echo $form->field($model, 'conditioner')->radioList(['0' => 'Отсутствует', '1' => 'Есть']);
?>
    </div>

    <div class="row tech-char">
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
?>

<?php 
$form = ActiveForm::begin(['options' => ['id' => 'getprice-form']]);
echo $form->field($model, 'name', ['template' => '{input}', 'inputOptions' => ['placeholder' => 'Имя', 'class' => 'form-control']]);
?>

<?php 
echo $form->field($model, 'phone')->label(false)->error(false)->widget(\yii\widgets\MaskedInput::className(), ['mask' => '+7 (999) 999 99 99'])->textInput(['placeholder' => 'Телефон']);
?>

<div style="padding:0 10px;">
    <?php 
echo Html::submitButton('ОТПРАВИТЬ ЗАПРОС', ['class' => 'btn btn-lg btn-danger btn-block', 'style' => 'font-size:14px;']);
?>
</div>
<?php 
ActiveForm::end();
?>






Exemple #7
0
echo $form->field($model, 'sn')->widget(\kartik\widgets\Select2::classname(), ['initValueText' => $model->sn, 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 1, 'ajax' => ['url' => \yii\helpers\Url::to(['/admin/brand/get-brand']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('formatRepo'), 'templateSelection' => new JsExpression('function (brand) {return brand.id;}')]]);
?>
    <?php 
echo $form->field($model, 'cn_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'en_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'py_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'initial')->widget(\yii\widgets\MaskedInput::className(), ['mask' => 'A']);
?>

    <?php 
echo $form->field($model, 'show_type_name')->widget(SwitchInput::classname(), ['type' => SwitchInput::RADIO, 'items' => $model->showTypeNameItems]);
?>
    <?php 
echo $form->field($model, 'logo')->widget(CoreFileInput::classname(), []);
?>

    <?php 
echo $form->field($model, 'is_show')->widget(SwitchInput::classname(), ['pluginOptions' => ['onText' => '是', 'offText' => '否']]);
?>
</div>
<div class="box-footer">
    <?php 
Exemple #8
0
?>

    <?php 
if (!empty($model->publish_date)) {
    $model->publish_date = date('d.m.Y', strtotime($model->publish_date));
}
?>
    <?php 
//datapicker language issue;
$language = Yii::$app->language;
if ($language == 'en') {
    $language = 'en-GB';
}
?>
    <?php 
echo $form->field($model, 'publish_date')->widget(\yii\widgets\MaskedInput::className(), ['clientOptions' => ['alias' => 'dd.mm.yyyy']])->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'minView' => 1], 'language' => $language]);
?>

    <?php 
echo $form->field($model, 'is_active')->checkbox(['label' => Yii::t('backend', 'Active')]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Exemple #9
0
use yii\widgets\ActiveForm;
use yii\widgets\MaskedInput;
/* @var $this yii\web\View */
/* @var $model common\models\Profile */
/* @var $modelUser common\models\User */
/* @var $form ActiveForm */
?>
<div class="main-reg">

    <?php 
$form = ActiveForm::begin();
?>
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <?php 
echo $form->field($model, 'phone')->widget(MaskedInput::className(), ['name' => 'phone', 'mask' => '7 (999) 999-9999', 'options' => ['placeholder' => '7 (___) ___-____', 'class' => 'form-control']]);
?>
            <?php 
if ($model->scenario === 'emailActivation' || $model->scenario === 'phoneAndEmailFinish' || Yii::$app->controller->action->id == 'reg') {
    ?>
                <?php 
    echo $form->field($model, 'email');
    ?>
                <?php 
}
?>
            <?php 
if (Yii::$app->controller->action->id == 'reg') {
    ?>
                <?php 
    echo $form->field($model, 'password')->passwordInput();
}]);
?>

                                                    </div>
                                                  <div class="form-ul pb20 clearfix">
                        <?php 
echo $form->field($appModel, 'net_worth')->label('Please provide an estimate of your net worth:')->radioList(DictApplicant::$netWorth, ['item' => function ($index, $label, $name, $checked, $value) {
    $radio = Html::radio($name, $checked, ['class' => 'just-app', 'value' => $value]);
    $label = Html::label($radio . $label);
    return Html::tag('div', $label, ['class' => 'radio col-xs-4']);
}]);
?>
                                                    </div>
                                                  <div class="form-ul pb20 border-bottom clearfix">
                        <?php 
echo $form->field($appModel, 'total_value_with_advisor', ['options' => ['class' => 'col-xs-12 padding-left0'], 'template' => '{label}<div class="input-group"> <div class="input-group-addon">$</div> {input} <div class="input-group-addon">.00</div> </div>{hint}{error}', 'inputOptions' => ['class' => 'form-control just-app']])->label('What is the value of all your accounts with your investment advisor?')->widget(MaskedInput::className(), ['clientOptions' => ['alias' => 'decimal', 'groupSeparator' => ',', 'digits' => '0', 'max' => '2000000000', 'autoGroup' => true]]);
?>
                                                    </div>
                        <h4 style="font-weight:bold;">INSTRUCTIONS TO RECEIVE LINE OF CREDIT DISBURSEMENTS</h4>
                        <p class="wwbw">Designate the checking or savings account into which you want your Line of Credit disbursements to be deposited. Disbursements will be made by ACH. You may change your designated deposit account at any time on the BriteLine Portal. Any change to your designated deposit account for disbursements will take effect within two (2) business days.</p>
                        <img width="456" height="231" src="<?php 
echo Url::to('@web/images/loan_disbursment.jpg');
?>
" />

                        <br /><br />
                        <div class="form-ul clearfix">
                        <?php 
echo $form->field($appFormModel, 'bank_name', ['options' => ['class' => 'col-xs-6 padding-left0'], 'inputOptions' => ['class' => 'form-control just-app-input']]);
?>
                        <?php 
Exemple #11
0
                <?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 
    }
    ?>
Exemple #12
0
      <?php 
echo $form->field($model, 'KOM_BELI')->widget(MaskedInput::classname(), ['clientOptions' => ['alias' => 'numeric', 'groupSeparator' => ',', 'radixPoint' => '.', 'autoGroup' => true, 'removeMaskOnSubmit' => true]]);
?>
      </div>
    </div>
    <div class="row">
      <div class="col-md-3">
        <?php 
echo $form->field($model, 'KOM_JUAL')->widget(MaskedInput::classname(), ['clientOptions' => ['alias' => 'numeric', 'groupSeparator' => ',', 'radixPoint' => '.', 'autoGroup' => true, 'removeMaskOnSubmit' => true]]);
?>
      </div>
    </div>
    <div class="row">
      <div class="col-md-3">
      <?php 
echo $form->field($model2, 'JML_LBRSAHAM')->widget(MaskedInput::classname(), ['clientOptions' => ['alias' => 'numeric', 'groupSeparator' => ',', 'radixPoint' => '.', 'autoGroup' => true, 'removeMaskOnSubmit' => true]])->label('Jml Saham / Lot');
?>
      </div>
    </div>
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'data-confirm' => "Apakah anda yakin akan menyimpan data ini?"]);
?>
        <?php 
echo Html::a('Close', ['site/index'], ['class' => 'btn btn-default', 'onclick' => '
              if (confirm("Apakah yakin mau keluar dari halaman ini?")) {
                  return true;
              }
              else{
                return false;
              }
Exemple #13
0
?>

        <?php 
echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map($authors, 'author_id', 'name'), ['prompt' => 'Select...']);
?>

        <?php 
echo $form->field($model, 'name');
?>
        <br/>

        <?php 
echo $form->field($model, 'date_from')->widget(MaskedInput::className(), ['mask' => '99-99-9999']);
?>
        <?php 
echo $form->field($model, 'date_to')->widget(MaskedInput::className(), ['mask' => '99-99-9999']);
?>
        <br/>

        <div class="form-group">
            <?php 
echo Html::submitButton('Искать', ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::a('Сброс', \yii\helpers\Url::toRoute('index'), ['class' => 'btn btn-default']);
?>
        </div>

    <?php 
ActiveForm::end();
?>
Exemple #14
0
                </div>
                <div class="col-md-3 col-xs-3">
                    <span>จังหวัด</span><?php 
echo $form->field($model, 'province')->textInput(['placeholder' => 'จังหวัด'])->label(false);
?>
                </div>
                <div class="col-md-3 col-xs-3">
                    <span>ประเทศ</span><?php 
echo $form->field($model, 'country')->textInput(['placeholder' => 'ประเทศ'])->label(false);
?>
                </div>
            </div>
            <div class="row">
                <div class="col-md-4 col-xs-4">
                    <span>โทรศัพท์</span><?php 
echo $form->field($model, 'telephone')->widget(\yii\widgets\MaskedInput::classname(), ['mask' => '99-9999-9999'])->label(false);
?>
                </div>
                <div class="col-md-4 col-xs-4"><span>มีความประสงค์ขออนุญาตนำรถที่จดทะเบียนในประเทศ</span>
                    <?php 
echo $form->field($model, 'car_enroll_country')->textInput(['maxlength' => true])->label(false);
?>
                </div>
                <div class="col-md-4 col-xs-4"><span>หมายเลขทะเบียน</span>
                    <?php 
echo $form->field($model, 'plates_number')->textInput(['maxlength' => true])->label(false);
?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-6"><span>เข้ามาในราชอาณาจักรเป็นการชั่วคราวเพื่อใช้ในการท่องเที่ยว  ตั้งแต่วันที่ </span>
Exemple #15
0
        $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 $form->field($model, 'company_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'position')->textInput();
?>

    <?php 
echo $form->field($model, 'start_date')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '99-99-9999', 'type' => 'date', 'options' => ['value' => date('d-m-Y', strtotime($model->start_date)), 'class' => 'form-control']]);
?>

    <?php 
echo $form->field($model, 'end_date')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '99-99-9999', 'type' => 'date', 'options' => ['value' => date('d-m-Y', strtotime($model->end_date)), 'class' => 'form-control']]);
?>

    <?php 
echo $form->field($model, 'description')->textarea(['rows' => 6]);
?>

    <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();
?>
Exemple #17
0
                            <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
                            <?php 
echo $form->field($model, 'year')->textInput(['maxlength' => true]);
?>
                            <?php 
echo $form->field($model, 'bedroom')->textInput(['maxlength' => true]);
?>
                            <?php 
echo $form->field($model, 'bathroom')->textInput(['maxlength' => true]);
?>
                        </div>
                        <div class="col-md-4">
                            <?php 
echo $form->field($model, 'price')->widget(MaskedInput::className(), ['clientOptions' => ['alias' => 'decimal', 'groupSeparator' => '.', 'autoGroup' => true, 'rightAlign' => false], 'options' => ['maxlength' => 11, 'class' => 'form-control']]);
?>
                            <?php 
echo $form->field($model, 'title')->dropDownList(Sale::getYesList(), ['prompt' => '']);
?>
                            <?php 
echo $form->field($model, 'commission')->textInput(['maxlength' => true]);
?>
                        </div>
                    </div>

                </div>
            </div>

            <div class="row">
                <div class="col-md-8">
Exemple #18
0
?>

        <?php 
echo $form->field($model, 'email_work')->textInput(['maxlength' => 255]);
?>

        <?php 
echo $form->field($model, 'email_private')->textInput(['maxlength' => 255]);
?>

        <?php 
echo $form->field($model, 'jabber')->textInput(['maxlength' => 255]);
?>

        <?php 
echo $form->field($model, 'icq')->widget(MaskedInput::classname(), ['mask' => '999 999 999', 'clientOptions' => ['removeMaskOnSubmit' => true]]);
?>

        <?php 
echo $form->field($model, 'skype')->textInput(['maxlength' => 255]);
?>

        <?php 
echo $form->field($model, 'weight')->textInput();
?>

        <?php 
$listdata = ArrayHelper::map(Status::find()->all(), 'id', 'title');
?>
        <?php 
echo $form->field($model, 'status_id')->dropDownList($listdata, ['class' => 'form-control select']);
Exemple #19
0
?>

    <?php 
echo $form->field($model, 'cost_energy')->textInput();
?>

    <?php 
echo $form->field($model, 'cost_people')->textInput();
?>

    <?php 
echo $form->field($model, 'cost_credits')->textInput();
?>

    <?php 
echo $form->field($model, 'cost_time')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '99:99:99']);
?>

    <?php 
echo $form->field($model, 'balance_iron')->textInput();
?>

    <?php 
echo $form->field($model, 'balance_steel')->textInput();
?>

    <?php 
echo $form->field($model, 'balance_chemicals')->textInput();
?>

    <?php 
Exemple #20
0
                    </div>
                  </div>
                  <div class="col-xs-6">
                    <div class="form-group">
                      <label class="control-label" for="dynamicmodel-total_komisi">Total Komisi</label>
                      <?php 
echo Html::input('text', 'DynamicModel[total_komisi]', '0.00', ['class' => 'form-control', 'id' => 'dynamicmodel-total_komisi', 'readonly' => 'true', 'style' => 'text-align:right;']);
?>
                    </div>
                  </div>
                </div>
              </div>
              <div class="col-xs-6">
                <div class="form-group">
                  <?php 
echo $form->field($simulation, 'jml_saham')->widget(MaskedInput::classname(), ['clientOptions' => ['alias' => 'numeric', 'groupSeparator' => ',', 'radixPoint' => '.', 'autoGroup' => true, 'removeMaskOnSubmit' => true]]);
?>
                </div>
                <div class="form-group">
                  <label class="control-label" for="dynamicmodel-range">Range</label>
                  <?php 
echo Html::input('text', 'DynamicModel[range]', '0.00', ['class' => 'form-control', 'id' => 'dynamicmodel-range', 'readonly' => 'true', 'style' => 'text-align:right;']);
?>
                </div>
                <div class="form-group">
                  <label class="control-label" for="dynamicmodel-total_harga">Total Harga</label>
                  <?php 
echo Html::input('text', 'DynamicModel[total_harga]', '0.00', ['class' => 'form-control', 'id' => 'dynamicmodel-total_harga', 'readonly' => 'true', 'style' => 'text-align:right;']);
?>
                </div>
              </div>
Exemple #21
0
        <div class="col-md-2"><?= $form->field($model, 'naturalidade_uf')->dropDownList([ 'RN' => 'RN', 'AC' => 'AC', 'AL' => 'AL', 'AP' => 'AP', 'AM' => 'AM', 'BA' => 'BA', 'CE' => 'CE', 'DF' => 'DF', 'ES' => 'ES', 'GO' => 'GO', 'MA' => 'MA', 'MT' => 'MT', 'MS' => 'MS', 'MG' => 'MG', 'PR' => 'PR', 'PB' => 'PB', 'PA' => 'PA', 'PE' => 'PE', 'PI' => 'PI', 'RJ' => 'RJ', 'RS' => 'RS', 'RO' => 'RO', 'RR' => 'RR', 'SC' => 'SC', 'SE' => 'SE', 'SP' => 'SP', 'TO' => 'TO', ], ['prompt' => '']) ?></div>
        <div class="col-md-2"><?= $form->field($model, 'estadocivil')->dropDownList([ 'Solteiro' => 'Solteiro', 'Casado' => 'Casado', 'Divorciado' => 'Divorciado', 'Viúvo' => 'Viúvo', 'U. Estável' => 'U. Estável', ], ['prompt' => '']) ?></div>
        <div class="col-md-3"><?= $form->field($model, 'profissao')->textInput(['maxlength' => true]) ?></div>
        <div class="col-md-2"><?= $form->field($model, 'renda')->widget(MaskMoney::classname()) ?></div>
    </div>
    <div class="row">
        <div class="col-md-6"><?= $form->field($model, 'mae')->textInput(['maxlength' => true]) ?></div>
        <div class="col-md-6"><?= $form->field($model, 'pai')->textInput(['maxlength' => true]) ?></div>
    </div>
    <div class="row">
        <div class="col-md-8"><?= $form->field($model, 'conjuge')->textInput(['maxlength' => true]) ?></div>
        <div class="col-md-4"><?= $form->field($model, 'telefone2')->widget(MaskedInput::classname(), ['mask' => '(99) 9 9999-9999']) ?></div>
    </div>
    <div class="row">
        <div class="col-md-8"><?= $form->field($model, 'referencia1')->textInput(['maxlength' => true]) ?></div>
        <div class="col-md-4"><?= $form->field($model, 'telefone11')->widget(MaskedInput::classname(), ['mask' => '(99) 9 9999-9999']) ?></div>
    </div>
    <div class="row">
        <div class="col-md-8"><?= $form->field($model, 'referencia2')->textInput(['maxlength' => true]) ?></div>
        <div class="col-md-4"><?= $form->field($model, 'telefone21')->widget(MaskedInput::classname(), ['mask' => '(99) 9 9999-9999']) ?></div>
    </div>
</div>
<div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Cadastrar') : Yii::t('app', 'Atualizar'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

    
</div>
Exemple #22
0
?>

    <?php 
echo $form->field($model, 'city')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'state')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'zip')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'phone')->textInput(['maxlength' => true])->widget(MaskedInput::className(), ['mask' => '999-999-9999']);
?>

    <div class="form-group">
        <div class="col-sm-2"></div>
        <div class="col-sm-10">
            <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>

    <?php 
ActiveForm::end();
?>
Exemple #23
0
/* @var $form yii\widgets\ActiveForm */
$triagemSearch = new TriagemSearch();
$triagens = $triagemSearch->getTriagensPreAtendimentoByInteressado();
$interessadoSearch = new InteressadoSearch();
$interessados = $interessadoSearch->getInteressadosWitchCPF();
?>

<div class="atendimento-form">

    <?php 
$form = ActiveForm::begin();
?>
<div class="row">
  <div class="col-md-2"> 
      <?php 
echo $form->field($model, 'numeroprocesso')->widget(MaskedInput::className(), ['mask' => '9999999-99.9999']);
?>
  </div>
  <div class="col-md-4">
    <?php 
echo $form->field($model, 'triagem_id')->dropDownList(ArrayHelper::map($triagens, 'id', 'nome'), ['prompt' => 'Selecione']);
?>
  </div>
    <div class="col-md-2">
  <?php 
echo $form->field($model, 'tipo')->dropdownList(['ativo' => 'Ativo', 'arquivado' => 'Arquivado']);
?>
    
  </div>
      <div class="col-md-3">
  <?php 
echo $form->field($prepareModel, 'passport_number', ['template' => '{label}{input}'])->textInput(['maxlength' => true, 'id' => 'pass-num'])->label('№', ['id' => 'pass-lnum']);
?>
            </div>

        </div>

        <div id="driver-box">

            <div class="step-row-form">
                <?php 
echo $form->field($prepareModel, 'license_number', ['template' => '{label}{input}'])->textInput();
?>
            </div>
            <div class="step-row-form">
                <?php 
echo $form->field($prepareModel, 'experience', ['template' => '{label}{input}'])->widget(\yii\widgets\MaskedInput::className(), ['mask' => '9{1,2}', 'options' => ['placeholder' => '_']]);
?>
            </div>
        </div>
    </div>

    <div class="jur">

        <div id="jur-box">

            <div class="step-row-form">
                <?php 
echo $form->field($prepareModel, 'inn', ['template' => '{label}{input}'])->textInput(['maxlength' => true]);
?>
            </div>
Exemple #25
0
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);
?>
    <?php 
echo $form->field($model, 'net_worth', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$netWorth);
?>
    <?php 
echo $form->field($model, 'total_value_with_advisor', ['options' => ['class' => 'col-xs-6']])->textInput(['maxlength' => true])->widget(MaskedInput::className(), ['clientOptions' => ['alias' => 'decimal', 'groupSeparator' => ',', 'digits' => '0', 'max' => '2000000', 'autoGroup' => true]]);
?>

     <div class="form-group">

        <div class="col-sm-10" style="padding-left: 230px">
            <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>

    <?php 
ActiveForm::end();
?>
Exemple #26
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\datetime\DateTimePicker;
/* @var $this yii\web\View */
/* @var $model app\models\History */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="history-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'number')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '9999 9999 9999 9999'])->textInput(['placeholder' => '9999 9999 9999 9999', 'value' => $number, 'readonly' => '']);
?>

    <?php 
echo $form->field($model, 'use_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Choose date and time'], 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd HH:i', 'startDate' => date('yyyy-MM-dd HH:i'), 'todayHighlight' => true]]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Exemple #27
0
echo $form->field($model, 'chw')->widget(Select2::classname(), ['data' => ArrayHelper::map(app\models\Provinces::find()->all(), 'PROVINCE_ID', 'PROVINCE_NAME'), 'language' => 'th', 'options' => ['placeholder' => 'เลือกจังหวัด ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>  
        <div class="col-xs-3 col-sm-3 col-md-3">           
            <?php 
echo $form->field($model, 'ampur')->widget(DepDrop::className(), ['data' => $amp, 'options' => ['placeholder' => '<--คลิกเลือกอำเภอ-->'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['employees-chw'], 'url' => yii\helpers\Url::to(['/employees/get-amp']), 'loadingText' => 'กำลังค้นข้อมูล...']]);
?>
        </div>     
        <div class="col-xs-3 col-sm-3 col-md-3">
            <?php 
echo $form->field($model, 'tumbon')->widget(DepDrop::className(), ['data' => $tum, 'options' => ['placeholder' => '<--คลิกเลือกตำบล-->'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['employees-chw', 'employees-ampur'], 'url' => yii\helpers\Url::to(['/employees/get-dist']), 'loadingText' => 'กำลังค้นข้อมูล...']]);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">
            <?php 
echo $form->field($model, 'tel')->widget(\yii\widgets\MaskedInput::classname(), ['mask' => '999-999-9999']);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">            
            <?php 
echo $form->field($model, 'comein')->widget(DatePicker::className(), ['language' => 'th', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => ['changeMonth' => true, 'changeYear' => true], 'options' => ['class' => 'form-control']]);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">            
            <?php 
echo $form->field($model, 'department_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Departments::find()->all(), 'id', 'name'), 'language' => 'th', 'options' => ['placeholder' => 'เลือกแผนก ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">
             <?php 
echo $form->field($model, 'education')->dropDownList(['ปริณญาตรี' => 'ปริณญาตรี', 'ปริณญาโท' => 'ปริณญาโท', 'สูงกว่าระดับปริณญาโทขึ้นไป' => 'สูงกว่าระดับปริณญาโทขึ้นไป', 'ปวส/อนุปริณญา' => 'ปวส/อนุปริณญา', 'มัธยมศึกษา6' => 'มัธยมศึกษา6', 'มัธยมศึกษา3' => 'มัธยมศึกษา3', 'ประถมศึกษา' => 'ประถมศึกษา'], ['prompt' => '']);
Exemple #28
0
/* @var $model app\models\Student */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="student-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'email')->widget(MaskedInput::classname(), ['clientOptions' => ['alias' => 'email']]);
?>

    <?php 
echo $form->field($model, 'birthdate')->widget(DatePicker::className(), ['inline' => true, 'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

    <?php 
echo $form->field($model, 'level')->dropDownList(Student::getLevelsList());
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Добавить' : 'Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
Exemple #29
0
?>

            <?php 
echo $form->field($model, 'division');
?>

            <?php 
echo $form->field($model, 'post');
?>

            <?php 
echo $form->field($model, 'phone');
?>

            <?php 
echo $form->field($model, 'mobile')->widget(MaskedInput::className(), ['mask' => '(999) 999-99-99']);
?>


            <div class="form-group">
                <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-ok"></span> Сохранить', ['class' => 'btn btn-primary']);
?>
                <?php 
if ($user->status == $user::STATUS_ACTIVE) {
    echo Html::a('<span class="glyphicon glyphicon glyphicon-lock"></span> Заблокировать', ['change-status', 'id' => (string) $user->getPrimaryKey(), 'status' => $user::STATUS_BLOCKED], ['class' => 'btn btn-danger', 'data-method' => 'post']);
} elseif ($user->status == $user::STATUS_BLOCKED) {
    echo Html::a('<span class="glyphicon glyphicon-arrow-up"></span> Активировать', ['change-status', 'id' => (string) $user->getPrimaryKey(), 'status' => $user::STATUS_ACTIVE], ['class' => 'btn btn-success', 'data-method' => 'post']);
}
?>
            </div>
                    <div class="message-area-2" style="color: #1F2340; margin-bottom: 15px"></div>
                    <form id="contact-form">
                        <div class="control-group">
                            <div class="controls">
                                <?php 
echo $form->field($user, 'username')->textInput(['placeholder' => 'ФИО'])->label(false);
?>
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="controls">
                                <?php 
echo $form->field($user, 'phone', ['template' => '
                                {input}
                                <div>{error}</div>
                    '])->widget(\yii\widgets\MaskedInput::className(), ['mask' => '+7(999)-999-9999', 'model' => $user, 'attribute' => 'phone', 'options' => ['placeholder' => '+7(___)-___-____', 'class' => 'input-type-text-medium']]);
?>
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="controls">
                                <?php 
echo $form->field($user, 'password')->passwordInput(['placeholder' => 'Пароль'])->label(false);
?>
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="controls">
                                <?php 
echo $form->field($user, 'password_repeat')->passwordInput(['placeholder' => 'Повторите пароль'])->label(false);
?>