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


PHP Select2::className方法代码示例

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


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

示例1:

if (!in_array('createMigration', $notVisible)) {
    echo $form->field($generator, $addition . 'createMigration')->checkbox();
}
if (!in_array('autoCreateTable', $notVisible)) {
    echo $form->field($generator, $addition . 'autoCreateTable')->checkbox();
}
if (!in_array('useTablePrefix', $notVisible)) {
    echo $form->field($generator, $addition . 'useTablePrefix')->checkbox();
}
if (!in_array('dropIfExists', $notVisible)) {
    echo $form->field($generator, $addition . 'dropIfExists')->checkbox();
}
if (!$emptyBox) {
    Box::end();
}
Box::begin(['type' => Box::TYPE_PRIMARY, 'withBorder' => true, 'title' => $titleBox, 'collapse' => true]);
if (!in_array('migrationName', $notVisible)) {
    echo $form->field($generator, $addition . 'migrationName')->hiddenInput()->label(false);
}
if (!in_array('tableName', $notVisible)) {
    echo $form->field($generator, $addition . 'tableName');
}
Box::begin(['type' => Box::TYPE_PRIMARY, 'withBorder' => true, 'title' => 'Input columns origin table', 'collapse' => true]);
echo $form->field($generator, $addition . 'fields')->widget(\infinitydevphp\MultipleModelValidator\widgets\MultipleInput::className(), ['attributeOptions' => ['enableAjaxValidation' => false, 'enableClientValidation' => true, 'validateOnChange' => true, 'validateOnSubmit' => true, 'validateOnBlur' => true], 'data' => $generator->fields, 'baseModel' => \infinitydevphp\gii\models\Field::className(), 'columns' => [['name' => 'name', 'enableError' => true, 'title' => 'Name'], ['name' => 'type', 'type' => \kartik\widgets\Select2::className(), 'options' => ['data' => \infinitydevphp\gii\models\Field::getTypes()], 'title' => 'Type'], ['name' => 'length', 'enableError' => true, 'title' => 'Length'], ['name' => 'isCompositeKey', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Composite PK'], ['name' => 'is_not_null', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Is Not Null'], ['name' => 'is_unique', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Unique'], ['name' => 'unsigned', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Unsigned'], ['name' => 'comment', 'enableError' => true, 'title' => 'Comment'], ['name' => 'default', 'enableError' => true, 'title' => 'Default Value'], ['name' => 'precision', 'enableError' => true, 'title' => 'Precision'], ['name' => 'scale', 'enableError' => true, 'title' => 'Scale'], ['name' => 'fk_name', 'enableError' => true, 'title' => 'FK Name'], ['name' => 'related_table', 'enableError' => true, 'title' => 'Related table'], ['name' => 'related_field', 'enableError' => true, 'title' => 'Related field']]]);
Box::end();
Box::end();
?>

<script>

</script>
开发者ID:infinitydevphp,项目名称:infinity-gii,代码行数:31,代码来源:form.php

示例2: JsExpression

use kartik\widgets\Select2;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\web\JsExpression;
use yii\widgets\ActiveForm;
?>

<div class="city-form">

    <?php 
$form = ActiveForm::begin(['id' => 'city-form']);
?>

    <hr>
    <?php 
echo $form->field($model, 'name')->widget(Select2::className(), ['size' => Select2::MEDIUM, 'language' => 'ru', 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => Url::to(['/city/city/city-list']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function(city) { return city.text; }'), 'templateSelection' => new JsExpression('function (city) { return city.text; }')]]);
?>

    <hr>
    <div class="form-group">
        <?php 
echo Html::submitButton('Создать', ['class' => 'btn btn-success']);
?>
        <?php 
echo Html::button('Закрыть', ['class' => 'btn btn-default', 'data-dismiss' => 'modal']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
开发者ID:vampir2236,项目名称:cities.ru,代码行数:31,代码来源:_form.php

示例3: explode

	<?php 
echo $form->field($model, 'action')->widget(Select2::className(), ['data' => $model->setting('actions'), 'theme' => Select2::THEME_KRAJEE, 'options' => ['id' => 'alert-action' . $uniqid, 'placeholder' => 'Alert me...', "allowClear" => true]])->label("Action");
?>
    
	<?php 
echo $form->field($model, 'remote_type')->widget(DepDrop::className(), ['value' => $model->remote_type, 'data' => [$model->remote_type => $model->properName($model->remote_type)], 'options' => ['placeholder' => ' select something ', 'id' => 'alert-type' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-remote-type' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-action' . $uniqid], 'url' => Url::to(['/alerts/list/types']), 'loadingText' => '...', 'placeholder' => ' type of ']])->label("Remote Type");
?>
    
	<?php 
echo $form->field($model, 'remote_for')->widget(DepDrop::className(), ['value' => $model->remote_for, 'data' => [$model->remote_for => $model->properName($model->remote_for)], 'options' => ['placeholder' => ' for ', 'id' => 'alert-for' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-remote-type' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-type' . $uniqid], 'url' => Url::to(['/alerts/list/for']), 'loadingText' => '...', 'placeholder' => ' and it\'s for a/an ']])->label("Remote For");
?>
	<?php 
echo $form->field($model, 'priority')->widget(DepDrop::className(), ['value' => $model->priority, 'data' => [$model->priority => $model->properName($model->priority)], 'options' => ['placeholder' => ' and it if has a priority of ', 'id' => 'priority' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-priority' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-type' . $uniqid], 'url' => Url::to(['/alerts/list/priority']), 'loadingText' => '...', 'placeholder' => ' and has a proiority of ']])->label("Priority");
?>
	<?php 
echo $form->field($model, 'methods')->widget(Select2::className(), ['value' => explode(',', $model->methods), 'options' => ['id' => 'alert-methods' . $uniqid, 'placeholder' => ' then alert me using'], 'data' => \nitm\helpers\alerts\DispatcherData::supportedMethods()])->label("Priority");
?>
	
		
	<?php 
if (!\Yii::$app->request->isAjax) {
    ?>
	<div class="btn-group">
		<?php 
    echo Html::submitButton(ucfirst($action), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
    ?>
	</div>
	<?php 
}
?>
	
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:30,代码来源:_form.php

示例4:

            <?php 
echo $form->field($filterModel, 'planProspektGod')->dropDownList(SpisokKursovFilterForm::planProspektGodItems());
?>

            <?php 
echo $form->field($filterModel, 'kategoriiSlushatelej')->widget(Select2::className(), ['data' => KategoriyaSlushatelya::find()->formattedAll(EntityQuery::CHECKBOX_LIST, 'nazvanie'), 'options' => ['placeholder' => '', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>

        <div class="col-md-8">
            <?php 
echo $form->field($filterModel, 'nazvanie');
?>

            <?php 
echo $form->field($filterModel, 'rukovoditel')->widget(Select2::className(), ['data' => FizLico::findRukovoditeliKursov()->formattedAll(EntityQuery::DROP_DOWN, 'familiyaInicialy'), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>

            <?php 
echo $form->field($filterModel, 'chasy')->widget(TouchSpin::className());
?>
            <div class="row">
                <div class="col-md-6">
                    <?php 
echo $form->field($filterModel, 'nachalo')->widget(DeprecatedDatePicker::className());
?>
                </div>
                <div class="col-md-6">
                    <?php 
echo $form->field($filterModel, 'konec')->widget(DeprecatedDatePicker::className());
?>
开发者ID:tsyrya,项目名称:mybriop,代码行数:31,代码来源:spisok.php

示例5:

<!--    --><?php 
//echo $form->field($model, 'home_id')
?>

<!--    --><?php 
//echo $form->field($model, 'guest_id')
?>
    <div class="row">
        <div class="col-xs-4">
            <?php 
echo $form->field($model, 'season_id')->widget(Select2::classname(), ['data' => ArrayHelper::map($model->getAllSeasons(), 'id', 'name'), 'options' => ['placeholder' => 'Выберите сезон ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
        <div class="col-xs-4">
            <?php 
echo $form->field($model, 'category_id')->widget(Select2::className(), ['data' => ArrayHelper::map($model->getAllCategories(), 'id', 'name'), 'options' => ['placeholder' => 'Выберите категорию ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
        <div class="col-xs-4">
            <div class="form-group" style="margin-top: 25px">
                <?php 
echo Html::submitButton('Поиск', ['class' => 'btn btn-primary']);
?>
<!--                --><?php 
//echo Html::resetButton('Сбросить', ['class' => 'btn btn-default'])
?>
                <?php 
echo Html::a('Сбросить', ['/games'], ['class' => 'btn btn-default']);
?>
            </div>
        </div>
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:_search.php

示例6:

?>

    <?php 
echo $form->field($searchModel, 'nazvanie')->textInput();
?>

    <?php 
echo $form->field($searchModel, 'kategorii_slushatelej')->widget(Select2::className(), ['data' => $kategoriiSlushatelej, 'options' => ['multiple' => true], 'pluginOptions' => ['allowClear' => true]]);
?>

</div>

<div class="col-md-6">

    <?php 
echo $form->field($searchModel, 'rukovoditel')->widget(Select2::className(), ['data' => $rukovoditeliKursov, 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($searchModel, 'raschitano_chasov')->widget(TouchSpin::className());
?>

    <?php 
echo $form->field($searchModel, 'nachnutsya_posle')->widget(DatePicker::className());
?>

    <?php 
echo $form->field($searchModel, 'zakonchatsya_do')->widget(DatePicker::className());
?>

</div>
开发者ID:tsyrya,项目名称:mybriop,代码行数:31,代码来源:_grid-search.php

示例7: JsExpression

                'pluginOptions' => [
                    'autoclose' => true
                ]
            ],
            'displayFormat' => 'dd/MM/yyyy',
            'language' => 'pt',
        ]); ?>


        <div class="divborda">
            <div class="row">
                <div class="col-md-6">

                    <?=
                    $form->field($compraProduto, 'idProduto[]')->widget(Select2::className(), [
                        'data' => $produtos,
                        'options' => ['placeholder' => 'Selecione o produto',
                            'onChange' => 'mudarFoto(this)',

                        ],
                        'pluginOptions' => [
                            'allowClear' => true,

                            'language' => [
                                'errorLoading' => new JsExpression("function () { return 'Aguardando por resultados...'; }"),
                                'noResults'=>new JsExpression("function () { return 'Nenhum resultado encontrado...'; }"),
                            ],
                            'ajax' => [
                                'url' => yii\helpers\Url::to(['produto/produto-list']),
                                'dataType' => 'json',
开发者ID:aryangomes,项目名称:applanchonete,代码行数:30,代码来源:_form.php

示例8: isset

<?php

/**
 * @var \yii\web\View $this
 * @var \yii\widgets\ActiveForm $form
 * @var \yii\db\ActiveRecord $model
 * @var string $modelAttribute
 * @var array $initialData
 * @var bool $multiple
 * @var string $searchUrl
 * @var array $pluginOptions
 * @var array $additional
 */
$defaultOptions = ['multiple' => $multiple, 'allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => $searchUrl, 'dataType' => 'json', 'data' => new \yii\web\JsExpression('function(term,page) { return {search:term}; }'), 'results' => new \yii\web\JsExpression('function(data,page) { return {results:data.results}; }'), 'cache' => false]];
echo $form->field($model, $modelAttribute, !empty($additional['fieldOptions']) ? $additional['fieldOptions'] : [])->widget(\kartik\widgets\Select2::className(), ['language' => Yii::$app->language, 'data' => $initialData, 'options' => ['placeholder' => isset($additional['placeholder']) ? $additional['placeholder'] : Yii::t('app', 'Type for search ...'), 'multiple' => $multiple], 'pluginOptions' => array_replace_recursive($defaultOptions, $pluginOptions)]);
开发者ID:Razzwan,项目名称:dotplant2,代码行数:15,代码来源:simple.php

示例9:

use yii\helpers\Url;
use app\entities\Dolzhnost;
use app\enums\EtapObrazovaniya;
use Yii;
use app\widgets\Select3;
$form = ActiveForm::begin(['id' => 'dolzhnostForm', 'options' => ['tabindex' => false]]);
echo $form->field($model, 'fizLicoId')->hiddenInput()->label(false);
echo $form->field($model, 'organizaciyaAdress')->widget(Select2::className(), ['data' => AdresnyjObjekt::findBurRajon()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'formalnoeNazvanie'), 'options' => ['placeholder' => 'Выберите район / город']]);
echo $form->field($model, 'organizaciyaVedomstvo')->widget(Select2::classname(), ['data' => Vedomstvo::find()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'), 'options' => ['placeholder' => 'Выберите ведомство']]);
echo '<label>Организация</label>';
echo Html::hiddenInput('', $model->organizaciyaId, ['id' => 'organizaciyaIdHiddenInput']);
$depdropUrl = '/attestaciya/rabota-org' . ($model->organizaciyaId ? '?oid=' . $model->organizaciyaId : '');
echo $form->field($model, 'organizaciyaId')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'pluginOptions' => ['depends' => [Html::getInputId($model, 'organizaciyaVedomstvo'), Html::getInputId($model, 'organizaciyaAdress')], 'placeholder' => 'Выберите школу', 'url' => Url::to([$depdropUrl]), 'initialize' => true, 'allowClear' => true], 'pluginEvents' => ['change' => 'function (){
            var organizaciyaIdInput = \'' . Html::getInputId($model, 'organizaciyaId') . '\';
            var organizaciyaNazvanieInput = \'' . Html::getInputId($model, 'organizaciyaNazvanie') . '\';
            if ($(\'#\'+organizaciyaIdInput).val()){
                $(\'#\'+organizaciyaNazvanieInput).val("");
            }
        }']])->label(false);
echo '<p>Не нашли организацию в списке? <span class="slink" onclick="showOrganizaciyaNazvanie(\'' . Html::getInputId($model, 'organizaciyaNazvanie') . '\')">ввести наименование организации вручную</span></p>';
echo $form->field($model, 'organizaciyaNazvanie')->input('text', ['class' => 'hidden form-control', 'placeholder' => 'Наименование организации', 'onkeyup' => 'onOrganizaciyaNazvanieKeyUp(\'' . Html::getInputId($model, 'organizaciyaId') . '\',this.value,event)'])->label(false);
//echo $form->field($model,'dolzhnostId')->widget(Select2::className(),[
//    'data' => Dolzhnost::getObshieDolzhnosti()->orderBy('nazvanie')->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'),
//    'options' => ['placeholder' => 'Выберите должность'],
//]);
echo Select3::widget(['model' => $model, 'attribute' => "dolzhnostId", 'secondAttribute' => "dolzhnostNazvanie", 'data' => Dolzhnost::getObshieDolzhnosti()->orderBy('nazvanie')->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'), 'placeholder' => 'Выберите должность', 'secondPlaceholder' => 'Введите наименование должности']);
//dolzhnostNazvanie
echo $form->field($model, 'etapObrazovaniya')->widget(Select2::className(), ['data' => EtapObrazovaniya::namesMap(), 'options' => ['placeholder' => 'Выберите уровень образования']]);
echo '<button class="btn btn-default" onclick="close_modal()">Закрыть</button>
      <button class="btn btn-primary">Сохранить</button>';
ActiveForm::end();
开发者ID:tsyrya,项目名称:mybriop,代码行数:31,代码来源:dolzhnost.php

示例10:

echo $form->field($userModel, 'mid_name', ['options' => ['class' => 'col-xs-4 padding-right0']])->textInput(['readonly' => $readonly])->label('MI');
?>
								<?php 
echo $form->field($userModel, 'last_name', ['options' => ['class' => 'col-xs-4 padding-right0']])->textInput(['readonly' => $readonly])->label('Last Name <span class="color-red font-normal">*</span>');
?>
							</div>			
							

							<?php 
if (Yii::$app->user->getIdentity()->id_user_role != Dict::USER_ROLE_CLIENT) {
    ?>
		
								<div class="form-ul pb20 clearfix">
									<?php 
    if ($model->getIsNewRecord()) {
        echo $form->field($model, 'id_group', ['options' => ['class' => 'col-xs-6 padding-left0']])->widget(Select2::className(), ['data' => $group, 'options' => ['disabled' => Yii::$app->user->getIdentity()->id_user_role == Dict::USER_ROLE_ADVISOR && !$model->isNewRecord && !$model->isNewRecord || Yii::$app->user->getIdentity()->id_user_role == Dict::USER_ROLE_CLIENT || Yii::$app->user->getIdentity()->id_user_role == Dict::USER_ROLE_BETTERDEBT ? true : false, 'placeholder' => 'Please select a group'], 'pluginOptions' => ['allowClear' => true]])->label('Group <span class="color-red font-normal">*</span>');
    } else {
        echo $form->field($model->group, 'group_id', ['options' => ['class' => 'col-xs-6 padding-left0']])->textInput(['readonly' => true])->label('Group <span class="color-red font-normal">*</span>');
    }
    ?>
									 	              		
	                        		<?php 
    //if (empty($userModel->new_email)) {
    ?>
								    		<?php 
    echo $form->field($userModel, 'email', ['options' => ['class' => 'col-xs-6 padding-right0']])->textInput(['maxlength' => true, 'readonly' => $readonly])->label('Email <span class="color-red font-normal">*</span>');
    ?>
								    <?php 
    //} else {
    ?>
								    		<?php 
开发者ID:ailingsen,项目名称:betterdebt,代码行数:31,代码来源:_form.php

示例11:

    <div class="col-md-5 form-horizontal">
        <div class="fields-group-heading">
            <h3>Образование</h3>
        </div>

        <?php 
echo SwitchingFields::widget(['commonOptions' => ['form' => $form, 'model' => $model, 'options' => ['template' => "{label}\n<div class=\"col-md-8\">\n{input}\n{hint}\n{error}\n{switch}\n</div>", 'options' => ['class' => 'form-group']]], 'field1Options' => ['attribute' => 'obrOrgId', 'switchIntroText' => 'Не нашли в списке?', 'switchLinkText' => 'Нажмите здесь чтобы ввести организацию вручную.', 'widgetClass' => Select2::className(), 'widgetConfig' => ['data' => Organizaciya::findVysshegoProfessionalnogoObrazovaniya()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')], 'widgetConfigDisabled' => ['disabled' => true]], 'field2Options' => ['attribute' => 'obrOrgNazvanie', 'switchIntroText' => 'Возможно ваша организация есть в списке.', 'switchLinkText' => 'Нажмите здесь чтобы найти её в списке.']]);
?>

        <?php 
echo SwitchingFields::widget(['commonOptions' => ['form' => $form, 'model' => $model, 'options' => ['template' => "{label}\n<div class=\"col-md-8\">\n{input}\n{hint}\n{error}\n{switch}\n</div>", 'options' => ['class' => 'form-group']]], 'field1Options' => ['attribute' => 'obrKvalifikaciyaId', 'switchIntroText' => 'Не нашли в списке?', 'switchLinkText' => 'Нажмите здесь чтобы ввести квалификацию вручную.', 'widgetClass' => Select2::className(), 'widgetConfig' => ['data' => Kvalifikaciya::find()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')], 'widgetConfigDisabled' => ['disabled' => true]], 'field2Options' => ['attribute' => 'obrKvalifikaciyaNazvanie', 'switchIntroText' => 'Возможно ваша квалификация есть в списке.', 'switchLinkText' => 'Нажмите здесь чтобы найти её в списке.']]);
?>

        <?php 
echo $form->field($model, 'obrDocTip')->widget(Select2::className(), ['data' => TipDokumentaObObrazovanii::namesMap()]);
?>

        <?php 
echo $form->field($model, 'obrDocSeriya');
?>
        <?php 
echo $form->field($model, 'obrDocNomer');
?>
        <?php 
echo $form->field($model, 'obrDocData')->widget(DeprecatedDatePicker::classname());
?>

    </div>

</div>
开发者ID:tsyrya,项目名称:mybriop,代码行数:30,代码来源:zapis-na-kurs.php

示例12: in_array

	<?php 
}
?>
	<?php 
echo Html::error($model, 'name', ['class' => 'help-block']);
?>
	<?php 
echo $form->endField();
?>

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

	<?php 
echo $form->field($model, 'type')->widget(Select2::className(), ['data' => Setting::TYPE, 'options' => ['placeholder' => Yii::t('setting', 'Select a type ...')], 'pluginOptions' => ['allowClear' => true]]);
?>

	<?php 
echo $form->field($model, 'store_range')->textarea(['rows' => 6, 'placeholder' => Yii::t('setting', 'Required if type in (select, multiselect, checkbox, radio), supported string with comma, json, callback function.') . ' 
Example: 
 - String: 1,2,3 or A,bcd,ef
 - Json: {"0" : "abc", "1" : "def"}
 - Callback: app\\models\\Setting::getItems()']);
?>
	<div class="store" style="display: <?php 
echo in_array($model->type, [Setting::TYPE_FILE_URL, Setting::TYPE_FILE_PATH]) ? 'block' : 'none';
?>
;">
		<?php 
echo $form->field($model, 'store_dir')->textInput(['maxlength' => true, 'placeholder' => Yii::t('setting', 'Required if type in (file, url). Example & default: @app/web/uploads')]);
开发者ID:navatech,项目名称:yii2-setting,代码行数:31,代码来源:_form.php

示例13:

	</div>
</div>


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

<div class="row">
	<div class="col-sm-6">
	    <?php 
echo $form->field($model, 'imageFile')->widget(FileInput::className());
?>

	    <?php 
echo $form->field($model, 'parent', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-heart"></i>']]])->widget(Select2::className(), ['data' => [null => Yii::t('shop', '-- Select parent Category --')] + Category::CategoryOptions()]);
?>

	</div>
</div>



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

    <?php 
ActiveForm::end();
开发者ID:karsel,项目名称:yii2-shop-module,代码行数:31,代码来源:_formCategory.php

示例14:

echo $form->field($model, 'request_for_id')->widget(Select2::className(), ['options' => ['multiple' => true, 'placeholder' => 'Select for...'], 'data' => $model->primaryModel->getCategoryList($model->primaryModel->isWhat() . '-for')])->label("For");
?>

	<?php 
echo $form->field($model, 'author_id')->widget(Select2::className(), ['options' => ['multiple' => true, 'placeholder' => 'Select authors...'], 'data' => $model->getFilter('author')])->label("Author");
?>

	<?php 
echo $form->field($model, 'closed')->checkboxList($model->getFilter('boolean'), ['inline' => true])->label("Closed");
?>

	<?php 
echo $form->field($model, 'completed')->checkboxList($model->getFilter('boolean'), ['inline' => true])->label("Completed");
?>

	<?php 
echo $form->field($model, 'filter[order]')->widget(Select2::className(), ['data' => $model->getFilter('order')])->label("Order");
?>

	<?php 
echo $form->field($model, 'filter[order_by]')->widget(Select2::className(), ['data' => $model->getFilter('order_by')])->label("Order By");
?>
	<?php 
echo Html::submitButton(Html::tag('span', '', ['class' => 'glyphicon glyphicon-filter']), ['class' => 'btn btn-primary btn-lg', "title" => "Run this filer"]);
?>
<br><br>
<?php 
ActiveForm::end();
?>
</div>
<br>
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:31,代码来源:_search.php

示例15:

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

        
    <?php 
echo $form->field($model, 'id_empresa')->widget(Select2::className(), ['data' => $empresas, 'options' => ['placeholder' => 'Seleccione el titular de la cuenta ...']]);
?>

    <?php 
echo $form->field($model, 'banco')->textInput(['maxlength' => true]);
?>
    
    <?php 
echo $form->field($model, 'tipo_cuenta')->widget(Select2::className(), ['data' => [1 => 'AHORRO', 2 => 'CORRIENTE'], 'options' => ['placeholder' => 'Seleccione un tipo de cuenta ...']]);
?>
   


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

    <?php 
ActiveForm::end();
?>

</div>
开发者ID:jmcaro,项目名称:sigerapp,代码行数:30,代码来源:_form.php


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