当前位置: 首页>>代码示例>>PHP>>正文


PHP Select2::widget方法代码示例

本文整理汇总了PHP中kartik\widgets\Select2::widget方法的典型用法代码示例。如果您正苦于以下问题:PHP Select2::widget方法的具体用法?PHP Select2::widget怎么用?PHP Select2::widget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kartik\widgets\Select2的用法示例。


在下文中一共展示了Select2::widget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

					<?php 
$form = ActiveForm::begin(['id' => 'mapping']);
?>
					<input type="hidden"  name= custkd id="tes">
					<div class="form-group">
    			<!-- <label for="pwd">Nama Customers:</label> -->
    			<input type="hidden" class="form-control" id="cusnm">
					<!-- <label for="hidden">Alamat:</label> -->
					<input type="hidden" class="form-control" id="alam" >
  				</div>
					<?php 
echo '<label class="control-label">Group Name </label>';
?>
					<?php 
echo Select2::widget(['name' => 'group', 'data' => $data, 'options' => ['id' => 'select-group', 'placeholder' => 'Select Group ...']]);
?>



        <div class="modal-footer">
					  <?php 
echo Html::submitButton('SAVE', ['class' => 'btn btn-primary', 'id' => 'btn']);
?>
							<?php 
ActiveForm::end();
?>
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
开发者ID:adem-team,项目名称:advanced,代码行数:29,代码来源:index.php

示例2: run

    public function run()
    {
        FlagIconAsset::register($this->getView());
        $locales = [];
        $languages = [];
        if (!empty($this->countries)) {
            array_walk($this->countries, function (&$data) {
                $data = strtolower($data);
            });
        }
        $countryRepository = new Country();
        $data = $countryRepository->findAll();
        foreach ($data as $code => $lang) {
            if (empty($this->countries) || in_array(strtolower($code), $this->countries)) {
                $locales[$code] = FlagIcon::flag($code);
                $languages[$code] = $lang->name['english']['common'] . ' (' . reset($lang->name['native'])['common'] . ')';
            }
        }
        $format = '
        function format(state) {
            var locales = ' . Json::encode($locales) . ';
            if (!state.id) { return state.text; }

            return locales[state.id] + " " + state.text;
        }';
        $escape = new JsExpression('function(m) { return m; }');
        $this->getView()->registerJs($format, View::POS_HEAD);
        $this->options = array_merge(['placeholder' => Yii::$app->translate->t('Choose country')], $this->options);
        $pluginOptions = array_merge(['templateResult' => new JsExpression('format'), 'templateSelection' => new JsExpression('format'), 'escapeMarkup' => $escape], $this->pluginOptions);
        $pluginEvents = array_merge([], $this->pluginEvents);
        return Select2::widget(['model' => $this->model, 'attribute' => $this->attribute, 'name' => $this->name, 'value' => $this->value, 'options' => $this->options, 'data' => $languages, 'pluginOptions' => $pluginOptions, 'pluginEvents' => $pluginEvents]);
    }
开发者ID:dbsparkle-team,项目名称:unispot,代码行数:32,代码来源:DropDown.php

示例3: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     FlagIconAsset::register($this->getView());
     $locales = [];
     $ids = [];
     $countryRepository = new Country();
     $data = $countryRepository->findAll();
     foreach ($this->currencies as $value) {
         $key = $value->id;
         if (!empty($value->country_flag)) {
             $locales[$key] = FlagIcon::flag($value->country_flag);
         } else {
             // iterate data (countries list) to find country code with defined ($value->code) currency
             foreach ($data as $code => $country_value) {
                 if (strcasecmp($country_value->currency['code'], $value->code) == 0) {
                     $locales[$key] = FlagIcon::flag($code);
                     break;
                 }
             }
         }
         $ids[$key] = $value->code;
     }
     $currencyFormat = 'function currencyFormat(state) {
         var locales = ' . Json::encode($locales) . ';
         if (!state.id) { return state.text; }
         return locales[state.id] + " " + state.text;
     }';
     $escape = new JsExpression('function(m) { return m; }');
     $this->getView()->registerJs($currencyFormat, View::POS_HEAD);
     $this->options = array_merge(['placeholder' => Yii::$app->translate->t('select currency')], $this->options);
     $pluginOptions = array_merge(['templateResult' => new JsExpression('currencyFormat'), 'templateSelection' => new JsExpression('currencyFormat'), 'escapeMarkup' => $escape], $this->pluginOptions);
     $pluginEvents = array_merge([], $this->pluginEvents);
     return Select2::widget(['model' => $this->model, 'attribute' => $this->attribute, 'name' => $this->name, 'value' => $this->value, 'options' => $this->options, 'data' => $ids, 'pluginOptions' => $pluginOptions, 'pluginEvents' => $pluginEvents]);
 }
开发者ID:dbsparkle-team,项目名称:unispot,代码行数:37,代码来源:CurrencyDropDown.php

示例4: init

 /**
  * Initializes the widget
  *
  * @throw InvalidConfigException
  */
 public function init()
 {
     if (empty($this->pluginOptions['url'])) {
         throw new InvalidConfigException("The 'pluginOptions[\"url\"]' property has not been set.");
     }
     if (empty($this->pluginOptions['depends']) || !is_array($this->pluginOptions['depends'])) {
         throw new InvalidConfigException("The 'pluginOptions[\"depends\"]' property must be set and must be an array of dependent dropdown element ID.");
     }
     if (empty($this->options['class'])) {
         $this->options['class'] = 'form-control';
     }
     parent::init();
     if ($this->type !== self::TYPE_SELECT2 && !empty($this->options['placeholder'])) {
         $this->data = ['' => $this->options['placeholder']] + $this->data;
     }
     if ($this->type === self::TYPE_SELECT2 && (!empty($this->options['placeholder']) || !empty($this->select2Options['options']['placeholder']))) {
         $this->pluginOptions['placeholder'] = '';
     } elseif ($this->type === self::TYPE_SELECT2 && !empty($this->pluginOptions['placeholder']) && $this->pluginOptions['placeholder'] !== false) {
         $this->options['placeholder'] = $this->pluginOptions['placeholder'];
         $this->pluginOptions['placeholder'] = '';
     }
     $this->_view = $this->getView();
     $this->registerAssets();
     if ($this->type === self::TYPE_SELECT2) {
         if (empty($this->data)) {
             $this->data = ['' => ''];
         }
         if ($this->hasModel()) {
             $settings = ArrayHelper::merge($this->select2Options, ['model' => $this->model, 'attribute' => $this->attribute, 'data' => $this->data, 'options' => $this->options]);
         } else {
             $settings = ArrayHelper::merge($this->select2Options, ['name' => $this->name, 'value' => $this->value, 'data' => $this->data, 'options' => $this->options]);
         }
         echo Select2::widget($settings);
         $id = 'jQuery("#' . $this->options['id'] . '")';
         $text = ArrayHelper::getValue($this->pluginOptions, 'loadingText', 'Loading ...');
         $this->_view->registerJs("{$id}.on('depdrop.beforeChange',function(e,i,v){{$id}.select2('data',{text: '{$text}'});});");
         $this->_view->registerJs("{$id}.on('depdrop.change',function(e,i,v,c){{$id}.select2('val',{$id}.val());});");
     } else {
         echo $this->getInput('dropdownList', true);
     }
 }
开发者ID:CBETOBuT,项目名称:yii2-widgets,代码行数:46,代码来源:DepDrop.php

示例5:

    case 5:
        // Текст
        echo "<div class='{$class}'><div>" . Html::activeLabel($model, $option, ['class' => 'control-label']) . "</div><div>" . Html::activeTextarea($model, $option, $options_attributes) . "</div><div class='help-block'>" . $error . "</div></div>";
        break;
    case 6:
        // Файл (выбор)
        echo "<div class='{$class}'><div>" . Html::activeLabel($model, $option, ['class' => 'control-label']) . "</div><div>" . InputFile::widget(['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'template' => '<div class="input-group">
                                        {input}<span class="input-group-btn">{button}</span>
                                    </div>', 'options' => $options_attributes, 'buttonOptions' => ['class' => 'btn btn-default'], 'buttonName' => 'Выбрать файл', 'name' => 'Document[option_' . $i . ']', 'value' => $model->{$option}]) . "</div><div class='help-block'>" . $error . "</div></div>";
        break;
    case 7:
        // Изображение (загрузка)
        echo "<div class='{$class}'>" . Html::activeLabel($model, $option, ['class' => 'control-label']) . FileInput::widget(['model' => $model, 'attribute' => $option_file, 'pluginOptions' => ['browseClass' => 'btn btn-default', 'browseLabel' => 'Загрузить файл', 'removeLabel' => 'Удалить', 'removeClass' => 'btn btn-default', 'browseIcon' => '', 'removeIcon' => '', 'showUpload' => false]]) . Html::activeHiddenInput($model, $option_file, $options_attributes);
        if (!$model->isNewRecord && $model->{$option} && $model->last_template_id == $model->template_id) {
            echo Html::img($model->{$option}, ['class' => 'doc_img img-thumbnail']) . "<p>" . Html::a('Удалить изображение', ['/document/deleteimg', 'document_id' => $model->id, 'option_id' => $i], ['class' => 'lnk delete_photo']) . "</p>";
        }
        echo "<div class='help-block'>" . $error . "</div></div>";
        break;
    case 8:
        // Список дочерних документов
        echo "<div class='{$class}'>" . Html::activeLabel($model, $option, ['class' => 'control-label']) . Select2::widget(['model' => $model, 'attribute' => $option, 'data' => Document::getChilds($template->{$option_param}, true), 'options' => ['placeholder' => ''], 'pluginOptions' => $options_attributes]) . "<div class='help-block'>" . $error . "</div></div>";
        break;
    case 9:
        // Список потомков документов
        echo "<div class='{$class}'>" . Html::activeLabel($model, $option, ['class' => 'control-label']) . Select2::widget(['model' => $model, 'attribute' => $option, 'data' => Document::getChilds($template->{$option_param}, false), 'options' => ['placeholder' => ''], 'pluginOptions' => $options_attributes]) . "<div class='help-block'>" . $error . "</div></div>";
        break;
    case 10:
        // Список пользователя
        echo "<div class='{$class}'>" . Html::activeLabel($model, $option, ['class' => 'control-label']) . Select2::widget(['model' => $model, 'attribute' => $option, 'data' => User::getAll(), 'options' => ['placeholder' => ''], 'pluginOptions' => $options_attributes]) . "<div class='help-block'>" . $error . "</div></div>";
        break;
}
开发者ID:darkffh,项目名称:yii2-lowbase,代码行数:31,代码来源:_option.php

示例6:

$this->title = 'Lista de produtos de venda por insumo';

?>
<div class="produto-view">

    <h1><?= Html::encode($this->title) ?></h1>


    <?php $form = ActiveForm::begin(); ?>
    <?= '<label class="control-label">Insumo</label>'; ?>
    <?= Select2::widget([
        'name' => 'idinsumo',
        'data' => $insumos,
        'options' => [
            'required' => true,
            'placeholder' => 'Digite o insumo',
            //  'multiple' => true
        ],
    ]); ?>
    </br>
    <div class="form-group">
        <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary btn-block',
            'title' => 'Clique para listar os produtos do Insumo selecionado',]) ?>
    </div>

    <?php ActiveForm::end(); ?>
    <div class="panel panel-default">

        <?php
        if (isset($produtosVenda)) {
开发者ID:aryangomes,项目名称:applanchonete,代码行数:30,代码来源:listadeprodutosporinsumo.php

示例7:

        <div class="col-xs-12 col-sm-4 col-md-4">
            <?php 
echo $form->field($model, 'from_email')->textInput(['maxlength' => 250]);
?>

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

            <div class="m-b-lg">
                <label class="control-label"><?php 
echo Adm::t('adm_email_config', 'Send copy to:', ['dot' => true]);
?>
</label>
                <?php 
echo Select2::widget(['name' => 'params', 'value' => $paramsValue, 'options' => ['multiple' => true, 'placeholder' => Adm::t('', 'Select ...', ['dot' => false])], 'data' => $data, 'pluginOptions' => ['tags' => true, 'maximumInputLength' => 250, 'tokenSeparators' => [EmailConfig::EMAIL_SEPARATOR]]]);
?>
            </div>
        </div>

        <div class="col-xs-12 col-sm-4 col-md-4 readonly-cont">
            <?php 
echo $form->field($model, 'username')->textInput(['maxlength' => 250]);
?>

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

            <?php 
echo $form->field($model, 'enable_smtp', ["template" => "{input}\n{label}\n{hint}\n{error}"])->widget(CheckboxX::classname(), ['pluginOptions' => ['threeState' => false]]);
开发者ID:pavlinter,项目名称:yii2-adm-email-config,代码行数:31,代码来源:_form.php

示例8: empty

?>
<div class="site-index">

        

        <p class="lead">
            <div class="alert alert-success">
            <div class="row">
                <div class="col-lg-4" style="text-align: center;">
                </div>
                <div class="col-lg-4" style="text-align: center;">
                    <p>เลือกสถานบริการสาธารณสุข</p>
                    <form method="POST">
                        <p>
                        <?php 
echo Select2::widget(['name' => 'hospcode', 'data' => ArrayHelper::map(ChospitalAmp::find()->all(), 'hoscode', 'hosname'), 'options' => ['placeholder' => empty($hosname) ? 'Select here...' : $hosname]]);
?>
                        </p>
                        <p>
                        <div>
                            <button class = 'btn btn-success'>Search</button>
                        </div>
                        </p>
                    </form>
                    
                    <div id="resp" style="display: none">
                        <img src="backend\web\images\Processing.gif">
                    </div>
                </div>
                <div class="col-lg-4" style="text-align: center;">
                </div>
开发者ID:WittayaSi,项目名称:tsy_dhdc,代码行数:31,代码来源:index.php

示例9:

        echo $form->field($user, 'username');
        ?>
    <?php 
    }
    ?>

    <?php 
    echo $form->field($user, 'newPassword')->passwordInput();
    ?>

</div>

<div>
    <?php 
    echo Html::label('Permissões') . '</br>';
    echo Select2::widget(['name' => 'roles', 'data' => $permissoes, 'attribute' => 'roles', 'pluginOptions' => ['allowClear' => true, 'multiple' => true]]);
    echo "</br>";
    ?>
</div>




<div class="linha">
    <div class="user-default-register">
      
    </div>
    <?php 
    /* uncomment if you want to add profile fields here
    <?= $form->field($profile, 'full_name') ?>
            */
开发者ID:aryangomes,项目名称:applanchonete,代码行数:31,代码来源:register.php

示例10:

    echo $i;
    ?>
" name="value-<?php 
    echo $i;
    ?>
" multiple="multiple" style="width: 100%;">
                                </select>
                            </div>
                            <div class="col-md-1 col-right">
                                <?php 
    echo \kartik\widgets\Select2::widget(['name' => 'right-' . $i, 'theme' => \kartik\select2\Select2::THEME_BOOTSTRAP, 'data' => \common\populac\models\Preferences::getByClassmark('tRight'), 'options' => ['prompt' => '', 'title' => '如需要选择右括号,请选择..'], 'pluginOptions' => ['allowClear' => true, 'minimumResultsForSearch' => 'Infinity']]);
    ?>
                            </div>
                            <div class="col-md-1 col-relation">
                                <?php 
    echo \kartik\widgets\Select2::widget(['name' => 'relation-' . $i, 'theme' => \kartik\select2\Select2::THEME_BOOTSTRAP, 'data' => \common\populac\models\Preferences::getByClassmark('tRelation'), 'value' => 'and', 'options' => ['multiple' => false], 'pluginOptions' => ['minimumResultsForSearch' => 'Infinity']]);
    ?>
                            </div>
                        </div>
                    <?php 
}
?>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关 闭</button>
                    <button type="button" class="btn btn-primary" id="btn-view-adv-search-relation">确 定</button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
开发者ID:tqsq2005,项目名称:Yii2adv,代码行数:31,代码来源:index.php

示例11:

<style>
    .search .form-control{ width:300px;}
    .search .form-group{ margin:0 10px;}
</style>
<?php 
use kartik\widgets\ActiveForm;
use kartik\helpers\Html;
$form = ActiveForm::begin(['method' => 'get', 'type' => ActiveForm::TYPE_INLINE, 'options' => ['class' => 'search']]);
if ($model->render == 'reg-user') {
    echo $form->field($model, 'userId');
}
//echo $form->field($model, 'filter_limit');
echo $form->field($model, 'regdate', [])->widget(\kartik\daterange\DateRangePicker::classname(), ['attribute' => "regdate", 'model' => $model, 'convertFormat' => true, 'pluginOptions' => ['timePicker' => true, 'timePickerIncrement' => 15, 'timePicker24Hour' => true, 'locale' => ['separator' => ' 至 ', 'format' => 'Y-m-d H:i:s'], 'opens' => 'right']]);
?>
<div style="display: inline-block">
<?php 
echo \kartik\widgets\Select2::widget(['name' => 'filter_limit', 'value' => \yii::$app->request->get('filter_limit', 50), 'data' => [20 => 20, 50 => 50, 100 => 100, 200 => 200], 'options' => ['placeholder' => '每页条数']]);
?>
</div>
<?php 
echo Html::submitButton("搜索", ['class' => 'btn btn-success', 'name' => Html::getInputName($model, 'do'), 'value' => 'search']);
//echo "&nbsp;&nbsp;";
//echo Html::submitButton("更新", [
//    'class' => 'btn btn-info',
//    'name' =>Html::getInputName($model,'do'),
//    'value'=>'update'
//]);
ActiveForm::end();
开发者ID:oyoy8629,项目名称:yii-core,代码行数:28,代码来源:_search.php

示例12: function

$this->params['breadcrumbs'][] = $this->title;
?>
<div class="events-index">
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
/* echo Html::a('Create Events', ['create'], ['class' => 'btn btn-success'])*/
?>
    </p>

    <?php 
Pjax::begin();
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'user_id', 'value' => 'user.username', 'options' => ['width' => '20%'], 'filter' => \kartik\widgets\Select2::widget(['model' => $searchModel, 'attribute' => 'user_id', 'data' => \yii\helpers\ArrayHelper::map(\dektrium\user\models\User::find()->all(), 'id', 'username'), 'options' => ['prompt' => '---请选择需要筛选的用户---'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 3, 'allowClear' => true]])], 'title', 'data:ntext', 'time:datetime', ['class' => 'yii\\grid\\ActionColumn', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil" style="cursor: pointer;"></span>', false, ['class' => 'showModalButton', 'value' => Yii::$app->urlManager->createUrl(['events/view', 'id' => $model->id, 'edit' => 't']), 'title' => Yii::t('yii', 'Edit')]);
}, 'view' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-eye-open" style="cursor: pointer;"></span>', false, ['class' => 'showModalButton', 'value' => Yii::$app->urlManager->createUrl(['events/view', 'id' => $model->id]), 'title' => Yii::t('yii', 'View')]);
}]]], 'responsive' => true, 'hover' => true, 'condensed' => true, 'floatHeader' => true, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th-list"></i> ' . Html::encode($this->title) . ' </h3>', 'type' => 'info', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> 新增', false, ['class' => 'showModalButton btn btn-success', 'value' => \yii\helpers\Url::to(['events/create']), 'title' => '新增事件']), 'after' => Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset List', ['index'], ['class' => 'btn btn-info']), 'showFooter' => false], 'filterSelector' => "select[name='" . $dataProvider->getPagination()->pageSizeParam . "'],input[name='" . $dataProvider->getPagination()->pageParam . "']", 'pager' => ['class' => \common\widgets\LinkPager::className(), 'template' => '{pageButtons} {customPage} {pageSize}', 'pageSizeMargin' => 'margin-left:5px;margin-right:5px;', 'pageSizeOptions' => ['class' => 'form-control', 'style' => 'display: inline-block;width:auto;margin-top:0px; margin-bottom: 2px;'], 'customPageWidth' => 50, 'customPageBefore' => ' <span class="text-center text-primary" style="margin-left: 10px;"><i class="fa fa-cog fa-lg fa-spin"></i> 跳转至第</span> ', 'customPageAfter' => ' <span class="text-center text-primary">页 每页显示</span> ', 'customPageMargin' => 'margin-left:5px;margin-right:5px; ime-mode:disabled; margin-bottom: 2px;', 'firstPageLabel' => '<span class="fa fa-step-backward" />', 'prevPageLabel' => '<span class="fa fa-chevron-left" />', 'nextPageLabel' => '<span class="fa fa-chevron-right" />', 'lastPageLabel' => '<span class="fa fa-step-forward" />', 'maxButtonCount' => 15]]);
Pjax::end();
?>

</div>
<?php 
\common\widgets\JsBlock::begin();
?>
<script type="text/javascript">
    //js获取get参数
    function GetUrlParms()
    {
开发者ID:tqsq2005,项目名称:Yii2adv,代码行数:31,代码来源:index.php

示例13: foreach

echo Html::hiddenInput('Orders[product_price]', $price, ["id" => "price", "class" => "item-shopcart"]);
echo '<div class="form-group' . ($price > 0 ? "" : " hidden") . '"><label class="control-label">' . Yii::t("app", "Quantity") . '</label>';
echo TouchSpin::widget(['name' => 'Orders[product_qty]', 'value' => 1, 'options' => ["id" => "quantity", 'class' => 'item-shopcart'], 'pluginOptions' => ['min' => 1, 'step' => 1, 'max' => 100000000000, 'boostat' => 10, 'maxboostedstep' => 100000, 'handle' => 'triangle', 'tooltip' => 'always']]);
echo '</div>';
$data = json_decode($model->data);
foreach ($data as $d) {
    $type = $d->type;
    if ($type == 0) {
        $options = [];
        $deval = "";
        foreach (explode(",", $d->value) as $v) {
            $options[trim($v)] = trim($v);
            $deval = $deval == "" ? trim($v) : $deval;
        }
        echo '<div class="form-group"><label class="control-label">' . Html::encode($d->label) . '</label>';
        echo Select2::widget(['name' => 'Orders[data][' . $d->label . ']', 'data' => $options, 'value' => $deval, 'options' => ['placeholder' => Yii::t('app', 'Select ') . $d->label, 'class' => 'item-shopcart', "id" => "data_" . str_replace(" ", "_", $d->label)]]);
        echo '</div>';
    } else {
        if ($type == 1) {
            echo '<div class="form-group"><label class="control-label">' . Html::encode($d->label) . '</label>';
            echo Html::textInput('Orders[data][' . $d->label . ']', $d->value, ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "form-control item-shopcart", "placeholder" => Yii::t("app", $d->label), "style" => "width:100%"]);
            echo '</div>';
        } else {
            if ($type == 2) {
                echo '<div class="form-group"><label class="control-label">' . Html::encode($d->label) . '</label>';
                echo TouchSpin::widget(['name' => 'Orders[data][' . $d->label . ']', 'value' => $d->value == null ? 0 : $d->value, 'options' => ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "item-shopcart"], 'pluginOptions' => ['min' => 1, 'step' => 1, 'max' => 100000000000, 'boostat' => 10, 'maxboostedstep' => 100000, 'handle' => 'triangle', 'tooltip' => 'always']]);
                echo '</div>';
            } else {
                if ($type == 3) {
                    echo '<div class="form-group"><label class="control-label">' . Html::encode($d->label) . '</label>';
                    echo Html::textArea('Orders[data][' . $d->label . ']', $d->value, ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "form-control item-shopcart", "placeholder" => Yii::t("app", $d->label), "style" => "width:100%"]);
开发者ID:highestgoodlikewater,项目名称:yes,代码行数:31,代码来源:view.php

示例14: isset

        // Строка
        case 9:
            // Регулярное выражение
            echo Html::activeInput('text', $model, $attr_value, ['class' => 'form-control', 'id' => $attr_id]);
            break;
        case 3:
            // Флажок
            echo Html::activeCheckbox($model, $attr_value, ['class' => 'form-control', 'id' => $attr_id, 'label' => null]);
            break;
        case 5:
            // Текст
            echo Html::activeTextarea($model, $attr_value, ['class' => 'form-control', 'id' => $attr_id]);
            break;
        case 6:
            // Список (дочерние документы
            echo Select2::widget(['model' => $model, 'attribute' => $attr_value, 'data' => Document::getAll($field['param']), 'options' => ['id' => $attr_id, 'placeholder' => ''], 'pluginOptions' => ['allowClear' => true, 'class' => 'form-control', 'id' => $attr_id]]);
            break;
        case 8:
            // Файл (выбор с сервера)
            echo InputFile::widget(['controller' => 'elfinder', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control', 'id' => $attr_id], 'buttonOptions' => ['class' => 'btn btn-default'], 'buttonName' => Yii::t('document', 'Выбрать файл'), 'multiple' => false, 'name' => 'Document[fields][' . $field_id . '][data][' . $data_id . '][value]', 'value' => isset($model->fields[$field_id]['data'][$data_id]['value']) ? $model->fields[$field_id]['data'][$data_id]['value'] : null]);
            break;
        case 7:
            // Дата
            echo DatePicker::widget(['model' => $model, 'attribute' => $attr_value, 'options' => ['id' => $attr_id, 'placeholder' => ''], 'pluginOptions' => ['format' => 'dd.mm.yyyy', 'class' => 'form-control', 'id' => $attr_id]]);
            break;
    }
}
?>
            </div>
            <div class="help-block">
                <?php 
开发者ID:lowbase,项目名称:yii2-document,代码行数:31,代码来源:_field.php

示例15: rgba

    echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary', 'id' => 'smbBtn'] + ($registraciya->podtvershdenieNaObrabotku ? [] : ['disabled' => 'disabled']));
}
if ($registraciya->status == \app\enums\StatusZayavleniyaNaAttestaciyu::REDAKTIRUETSYA_PED_RABOTNIKOM || $registraciya->status == \app\enums\StatusZayavleniyaNaAttestaciyu::OTKLONENO) {
    echo Html::button('Отправить в отдел аттестации', ['class' => 'btn btn-primary', 'style' => 'margin-left:1em', 'id' => 'changeStatusBtn']);
}
if ($registraciya->status) {
    echo Html::a('Печать', '/attestaciya/print-zayavlenie?id=' . $registraciya->id, ['class' => 'btn btn-primary', 'style' => 'margin-left:1em', 'target' => 'blank']);
}
ActiveForm::end();
//Модальное окно для добавляние Должности
//$dolzhnostModel =  new DolzhnostFizLica();
//$dolzhnostModel->fizLicoId = $registraciya->fizLicoId;
//$dolzhnostModel->organizaciyaAdress = 421574;
//$dolzhnostModel->organizaciyaVedomstvo = 18;
Modal::begin(['options' => ['id' => 'dolzhnostModal', 'tabindex' => false], 'header' => '<h3>Добавление должности</h3>']);
echo Select2::widget(['name' => 'state_40', 'data' => AdresnyjObjekt::findBurRajon()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'formalnoeNazvanie'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]);
Modal::end();
?>

<div onkeydown="modalKeyDown(event)" id="myModal" class="myModal" style="position: fixed;height:100%;width:100%;background: rgba(0,0,0,0.6);left:0;top:0;z-index:1000;display: none;">
    <div class="mmBody" style="width: 750px;height: 550px;overflow: scroll;background: #fff;margin:auto;position: absolute;top:0;bottom:0;left:0;top:0;right:0;padding: 0.5em 1em;border-radius: 5px;max-height: 100%;">
        <div style="border-bottom: 1px solid #eee">
            <button onclick="close_modal()" class="close">×</button>
            <h3>Добавление должности</h3>
        </div>
        <div id="modal_content" style="padding: 1em 0"></div>
    </div>
</div>


开发者ID:tsyrya,项目名称:mybriop,代码行数:28,代码来源:registraciya.php


注:本文中的kartik\widgets\Select2::widget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。