Example #1
0
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>
Example #2
0
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();
?>
Example #3
0
	<?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 
}
?>
	
Example #4
0
            <?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());
?>
Example #5
0
<!--    --><?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>
Example #6
0
<?php

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $generator \infinitydevphp\gii\crud\Generator */
use infinitydevphp\gii\assets\CrudGeneratorAssets;
use kartik\form\ActiveForm;
use infinitydevphp\gii\models\WidgetsCrud;
use infinitydevphp\MultipleModelValidator\widgets\MultipleInput;
use kartik\widgets\Select2;
CrudGeneratorAssets::register($this);
$form = ActiveForm::begin();
echo $form->field($generator, 'modelClass')->textInput(['id' => 'model-class']);
echo $form->field($generator, 'searchModelClass');
echo $form->field($generator, 'controllerClass');
echo $form->field($generator, 'baseControllerFrontendClass');
echo $form->field($generator, 'baseControllerBackendClass');
//echo $form->field($generator, 'moduleID');
echo $form->field($generator, 'indexWidgetType')->dropDownList(['grid' => 'GridView', 'list' => 'ListView']);
echo $form->field($generator, 'columns')->widget(MultipleInput::className(), ['attributeOptions' => ['enableAjaxValidation' => false, 'enableClientValidation' => true, 'validateOnChange' => true, 'validateOnSubmit' => true, 'validateOnBlur' => true], 'data' => $generator->columns, 'baseModel' => WidgetsCrud::className(), 'columns' => [['name' => 'fieldName', 'enableError' => true, 'title' => 'Length'], ['name' => 'widgetType', 'type' => Select2::className(), 'options' => ['data' => $generator->getWidgets()], 'title' => 'Widget Type']]]);
echo $form->field($generator, 'enableI18N')->checkbox();
echo $form->field($generator, 'messageCategory');
$form->end();
Example #7
0
?>

    <?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>
Example #8
0
                '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',
Example #9
0
<?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)]);
Example #10
0
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();
Example #11
0
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 
Example #12
0
    <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>
Example #13
0
	<?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')]);
Example #14
0
	</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();
Example #15
0
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>
Example #16
0
    <?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>
Example #17
0
echo $form->field($model, 'sync_source')->hiddenInput(['value' => 'New'])->label('');
?>
    
     
    <?php 
echo $form->field($model, 'cityId')->dropDownList(ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(\common\models\City::find()->andWhere(['status' => 1])->All(), 'Id', 'name')));
?>
          
      <?php 
echo $form->field($model, 'theaterId')->widget(DepDrop::classname(), ['options' => ['id' => strtolower($model->formName()) . '-theaterId'], 'data' => ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(\common\models\Theatre::find()->andWhere(['status' => 1, 'cityId' => $model->cityId])->All(), 'Id', 'name')), 'type' => DepDrop::TYPE_SELECT2, 'pluginOptions' => ['depends' => [strtolower($model->formName()) . '-cityid'], 'placeholder' => 'Select Theater', 'url' => Url::to(['/movieschedule/movie-theater-map/autosuggest'])]]);
if (isset($model->movieId)) {
    echo $form->field($model, 'movieId')->textInput(['disabled' => 'disabled']);
    //echo $form->field($model, '')->label('moviename',['moviename'=>'atul']);
    echo Html::label('Movie Name - ' . $model->moviename, 'movieId');
} else {
    echo $form->field($model, 'movieId')->widget(Select2::className(), ['options' => ['class' => 'form-control', 'placeholder' => 'Search for a Movie.'], 'pluginOptions' => ['createSearchChoice' => new JsExpression("function(term, data) {\n\t\tif (\$(data).filter(function() {\n\t\treturn this.text.localeCompare(term) === 0;\n\t\t}).length === 0) {\n\t\treturn {\n\t\tid: term,\n\t\ttext: term\n\t\t};\n\t\t}\n\t\t}"), 'minimumInputLength' => 2, 'maximumInputLength' => 10, 'initSelection' => new JsExpression('function (element, callback) {
		}'), 'ajax' => ["url" => Yii::$app->urlManager->createUrl(['/movieschedule/movie-theater-map/movieautosuggest']), "dataType" => 'json', "data" => new JsExpression('function(term, page) {
		return {
		"search": term
		};
		}'), "results" => new JsExpression('function(data, page) {
		return {
		results: data
		};
		}')]]]);
}
?>
    
          <?php 
//echo $form->field($model, 'movieId')->dropDownList(ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(common\models\Movie::find()->andWhere(['status' => 1])->All(), 'Id', 'name')));
?>
Example #18
0
use kartik\widgets\Select2;
use kartik\widgets\DatePicker;
/* @var $this yii\web\View */
/* @var $model app\models\Products */
/* @var $brands app\models\Brands */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="products-form">

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

    <?php 
echo $form->field($model, 'id_brand')->widget(Select2::className(), ['data' => ArrayHelper::map($brands, 'id', 'name'), 'language' => 'ru']);
?>

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

    <?php 
echo $form->field($model, 'made_year')->widget(DatePicker::className(), ['name' => 'made_year', 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

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

    <?php 
Example #19
0
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Meta $model
 * @var yii\widgets\ActiveForm $form
 */
$parents = \yii\helpers\ArrayHelper::map(\common\models\Meta::find()->where(['status' => \common\models\Meta::STATUS_ACTIVE, 'type' => \common\models\Meta::TYPE_ARTICLE_CATEGORIES, 'parent_id' => 0])->asArray()->all(), 'id', 'name');
$parents = \yii\helpers\ArrayHelper::merge([0 => '顶级分类'], $parents);
?>

<div class="meta-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['name' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 32, 'placeholder' => 'Enter Name...']], 'slug' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 255, 'placeholder' => 'Enter Slug...']], 'parent_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \kartik\widgets\Select2::className(), 'options' => ['data' => $parents]], 'description' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['rows' => 5, 'maxlength' => 255, 'placeholder' => 'Enter Description...']]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>
    <?php 
ActiveForm::end();
?>

</div>
Example #20
0
?>

        <?php 
echo $form->field($model, 'rabotaOrgAdres')->widget(Select2::classname(), ['data' => AdresnyjObjekt::findBurRajon()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'formalnoeNazvanie')]);
?>

        <?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' => 'rabotaOrgId', 'switchIntroText' => 'Не нашли в списке?', 'switchLinkText' => 'Нажмите здесь чтобы ввести организацию вручную.', 'widgetClass' => DepDrop::classname(), 'widgetConfig' => ['type' => DepDrop::TYPE_SELECT2, 'data' => [$model->rabotaOrgId => null], 'pluginOptions' => ['depends' => [Html::getInputId($model, 'rabotaOrgVedomstvo'), Html::getInputId($model, 'rabotaOrgAdres')], 'loadingText' => 'Загрузка организаций...', 'initialize' => true, 'placeholder' => 'Выберите образовательную организацию', 'url' => Url::to(['kadry/rabota-org'])]], 'widgetConfigDisabled' => ['disabled' => true]], 'field2Options' => ['attribute' => 'rabotaOrgNazvanie', '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' => 'rabotaDolzhnostId', 'switchIntroText' => 'Не нашли в списке?', 'switchLinkText' => 'Нажмите здесь чтобы ввести должность вручную.', 'widgetClass' => Select2::className(), 'widgetConfig' => ['data' => Dolzhnost::find()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')], 'widgetConfigDisabled' => ['disabled' => true]], 'field2Options' => ['attribute' => 'rabotaDolzhnostNazvanie', 'switchIntroText' => 'Возможно ваша должность есть в списке.', 'switchLinkText' => 'Нажмите здесь чтобы найти её в списке.']]);
?>

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

        <?php 
echo $form->field($model, 'rabotaTelefon')->widget(MaskedInput::className(), ['mask' => '+79999999999']);
?>

        <div class="fields-group-heading">
            <h3>Роли  пользователя в системе</h3>
        </div>

        <?php 
echo $form->field($model, 'roli')->widget(Select2::classname(), ['data' => Rol::names(), 'options' => ['multiple' => true, 'placeholder' => 'Выберите роль ...']]);
?>

    </div>
Example #21
0
use yii\widgets\ActiveForm;
use kartik\widgets\Select2;
/* @var $this yii\web\View */
/* @var $model app\models\Brands */
/* @var $countries app\models\Countries */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="brands-form">

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

    <?php 
echo $form->field($model, 'id_country')->widget(Select2::className(), ['data' => ArrayHelper::map($countries, 'id', 'name')]);
?>

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

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Изменить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Example #22
0
        <div class="col-md-12">
            <?php 
if (Yii::$app->user->isGuest) {
    ?>
                <?php 
    echo $form->field($model, 'email')->textInput(['maxlength' => true]);
    ?>
            <?php 
}
?>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <?php 
echo $form->field($model, 'category')->widget(Select2::className(), ['data' => $model->selectCategory(), 'language' => 'ru']);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <?php 
echo $form->field($model, 'short_description')->textInput(['maxlength' => true]);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <?php 
echo $form->field($model, 'full_description')->textarea(['rows' => 6]);
?>
Example #23
0
<?php

use kartik\grid\GridView;
use kartik\builder\TabularForm;
use yii\data\ArrayDataProvider;
use yii\helpers\Html;
use yii\widgets\Pjax;
Pjax::begin();
$dataProvider = new ArrayDataProvider(['allModels' => $row]);
echo TabularForm::widget(['dataProvider' => $dataProvider, 'formName' => 'ReportTest', 'checkboxColumn' => false, 'actionColumn' => false, 'attributeDefaults' => ['type' => TabularForm::INPUT_TEXT], 'attributes' => ['test_id' => ['label' => 'Test', 'type' => TabularForm::INPUT_WIDGET, 'widgetClass' => \kartik\widgets\Select2::className(), 'options' => ['data' => \yii\helpers\ArrayHelper::map(\app\models\plrs\Test::find()->orderBy('id')->asArray()->all(), 'id', 'name'), 'options' => ['placeholder' => Yii::t('app', 'Choose Test')]], 'columnOptions' => ['width' => '200px']], 'result' => ['type' => TabularForm::INPUT_TEXT], 'del' => ['type' => TabularForm::INPUT_STATIC, 'label' => '', 'value' => function ($model, $key) {
    return Html::a('<i class="glyphicon glyphicon-trash"></i>', '#', ['title' => Yii::t('app', 'Delete'), 'onClick' => 'delRowReportTest(' . $key . '); return false;', 'id' => 'report-test-del-btn']);
}]], 'gridSettings' => ['panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-book"></i> ' . Yii::t('app', 'Report Test') . '  </h3>', 'type' => GridView::TYPE_INFO, 'before' => false, 'footer' => false, 'after' => Html::button('<i class="glyphicon glyphicon-plus"></i>' . Yii::t('app', 'Add Row'), ['type' => 'button', 'class' => 'btn btn-success kv-batch-create', 'onClick' => 'addRowReportTest()'])]]]);
Pjax::end();
Example #24
0
?>
	
		<?php 
echo $form->field($model, 'title');
?>
	
		<?php 
echo $form->field($model, 'type_id')->widget(Select2::className(), ['data' => $model->getCategoryList($model->isWhat() . '-categories')])->label("Type");
?>
	
		<?php 
echo $form->field($model, 'request_for_id')->widget(Select2::className(), ['data' => $model->getCategoryList($model->isWhat() . '-for')])->label("Request For");
?>
	
		<?php 
echo $form->field($model, 'status')->widget(Select2::className(), ['data' => $model->getStatuses()])->label("Status");
?>
		<div class="wrapper">
			<div class="row">
				<div class="col-md-12 col-lg-12">
				<?php 
echo $this->context->RevisionsInputWidget(["parentId" => $model->getId(), "parentType" => $model->isWhat(), 'name' => 'request', 'revisionsModel' => $model->revisionModel(), 'model' => $model, 'value' => $model->request, 'editorOptions' => ['toolbarSize' => 'full', 'size' => 'full']]);
?>
				</div>
			</div>
		</div>
		
		<?php 
if (!\Yii::$app->request->isAjax) {
    ?>
		<div class="fixed-actions text-right">
Example #25
0
?>

    <?php 
echo $form->field($model, 'group_id')->dropDownList($subData['storeGroups']);
?>

    <?php 
echo $form->field($model, 'users_list')->widget(Select2::className(), ['data' => $subData['usersData'], 'size' => Select2::MEDIUM, 'options' => ['placeholder' => 'Select users', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'statuses_list')->widget(Select2::className(), ['data' => $subData['orderStatuses'], 'size' => Select2::MEDIUM, 'options' => ['placeholder' => 'Select users', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'order_template')->widget(Select2::className(), ['data' => $subData['orderAttributes'], 'size' => Select2::MEDIUM, 'options' => ['placeholder' => 'Select users', 'multiple' => true, 'options' => ['store_id' => ['disabled' => true]]], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'formula_purchase_p', ['inputOptions' => ['inline' => true, 'class' => 'input-lg col-xs-5']])->textInput()->hint('&nbsp;&nbsp;' . \yii\helpers\Html::a('<i class="fa fa-info"></i> Show help', '#', ['onclick' => "\$('#formula_hepl').toggle(); return false;"]), ['tag' => 'p']);
?>

    <div class="well well-sm" id="formula_hepl" style="display: none;">
        <code>{{var_purchase_price}}</code> - variable from field Price RMB. <br>
        <code>-, +, *, /</code> - aviable arithmetics. <br>
        <code>n%</code> - use n/100. Example: for 20% use 0.2, for 120% use 1.2. <br>
        <p class="para">
       Используйте одну из этих констант для задания способа округления.
       </p><table class="doctable informaltable">
        
         <thead>
Example #26
0
echo $form->field($model, 'status')->hiddenInput(['value' => 1])->label('');
?>

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

    <?php 
// Usage with model and Active Form (with no default initial value)
echo $form->field($model, 'launchdate')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter Launch Date ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'autoclose' => true]]);
?>



    <?php 
echo $form->field($model, 'tag')->widget(Select2::className(), ['options' => ['class' => 'form-control', 'value' => $model->tagstr], 'pluginOptions' => ['tags' => true, 'createSearchChoice' => new JsExpression("function(term, data) {\n                                            if (jQuery(data).filter(function() {\n                                              return this.text.localeCompare(term) === 0;\n                                            }).length === 0) {\n                                              return {\n                                                id: term,\n                                                text: term\n                                              };\n                                            }\n                                          }"), 'maximumInputLength' => 10, 'initSelection' => new JsExpression('function (element, callback) {
                                    var data = [];
                                    jQuery(element.val().split(",")).each(function () {
                                        data.push({id: this, text: this});
                                    });
                                    callback(data);
                                }'), 'ajax' => ["url" => Yii::$app->urlManager->createUrl(['/tags/tags/index']), "dataType" => 'json', "data" => new JsExpression('function(term, page) {
                                  return {
                                    "tagssearch[name]": term
                                  };
                                }'), "results" => new JsExpression('function(data, page) {                                    
                                  return {                                    
                                    results: data
                                  };
                                }')]]]);
?>
Example #27
0
?>
            <div class="row">
                <div class="col-sm-12">
                    <?php 
echo Html::submitButton('保 存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-info']);
?>
                </div>
            </div>
            <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 6, 'attributes' => ['personal_id' => ['type' => Form::INPUT_HIDDEN, 'label' => false, 'columnOptions' => ['colspan' => 0]], 's_date' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入登记日期..', 'maxlength' => 8]], 'code1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工编码..', 'maxlength' => 36]], 'name1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工姓名..', 'maxlength' => 50]]]]);
?>
        </div>

        <div class="col-sm-12">
            <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['fcode' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fcode', 'placeholder' => '身份证号', 'maxlength' => 18]], 'sex' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('psex'), 'options' => ['id' => 'p-sex', 'readOnly' => true]], 'birthdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-birthdate', 'placeholder' => '请输入出生日期..', 'maxlength' => 8, 'readOnly' => true]], 'unit' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-unit', 'readOnly' => true, 'maxlength' => 30]], 'flag' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pflag'), 'options' => ['placeholder' => 'Enter Flag...', 'maxlength' => 2]], 'hkxz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('chkxz'), 'options' => ['placeholder' => 'Enter Hkxz...', 'maxlength' => 2]], 'marry' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmarry'), 'options' => ['id' => 'p-marry', 'placeholder' => 'Enter Marry...', 'maxlength' => 2]], 'marrydate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-marrydate', 'placeholder' => 'Enter Marrydate...', 'maxlength' => 8]], 'memo1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmemo1'), 'options' => ['placeholder' => 'Enter Memo1...', 'maxlength' => 2]], 'selfno' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Selfno...']], 'lhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-lhdate', 'placeholder' => 'Enter Lhdate...', 'maxlength' => 8]], 'zhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-zhdate', 'maxlength' => 8]], 'work1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pwork1'), 'options' => ['placeholder' => 'Enter Work1...', 'maxlength' => 2]], 'childnum' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Childnum...']], 'obect1' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmark('pobect1'), 'options' => ['placeholder' => '--请选择--'], 'pluginOptions' => ['allowClear' => true]]], 'fhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fhdate', 'maxlength' => 8]], 'mz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmz'), 'options' => ['placeholder' => 'Enter Mz...', 'maxlength' => 2]], 'whcd' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pwhcd'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-whcd', 'data-classmark' => 'pwhcd', 'data-classmarkcn' => '文化程度'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'title' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('ptitle'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-title', 'data-classmark' => 'ptitle', 'data-classmarkcn' => '职称'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'zw' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('awork1'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-zw', 'data-classmark' => 'awork1', 'data-classmarkcn' => '职务'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'is_dy' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pis_dy'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-is_dy', 'data-classmark' => 'pis_dy', 'data-classmarkcn' => '政治面貌'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'onlysign' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('ponlysign'), 'options' => ['placeholder' => 'Enter Onlysign...', 'maxlength' => 2]], 'tel' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Tel...', 'maxlength' => 50]], 'jobdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Jobdate...', 'maxlength' => 8]], 'address1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Address1...', 'maxlength' => 80]], 'grous' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pgrous'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-grous', 'data-classmark' => 'pgrous', 'data-classmarkcn' => '所属街道'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'ingoingdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Ingoingdate...', 'maxlength' => 8]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['hkaddr' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Hkaddr...', 'maxlength' => 80]], 'logout' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('plogout'), 'options' => ['placeholder' => 'Enter Logout...']], 'e_date' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter E Date...', 'maxlength' => 8]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['memo' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Memo...', 'maxlength' => 254]], 'checktime' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pchecktime'), 'options' => ['id' => 'p-checktime', 'placeholder' => 'Enter Checktime...', 'maxlength' => 2]]]]);
ActiveForm::end();
?>
        </div>
    </div>

</div>

<?php 
\common\widgets\JsBlock::begin();
?>
    <script type="text/javascript">
        //身份证合法性
        function certificateNoParse(certificateNo){
Example #28
0
?>
            <?php 
echo $form->field($filterModel, 'dolzhnost')->widget(Select2::className(), ['data' => Dolzhnost::find()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'), 'options' => ['placeholder' => 'Выберите должность', 'multiple' => true]]);
?>
        </div>
        <div class="col-md-3">
            <?php 
echo $form->field($filterModel, 'varIspytanie2')->widget(Select2::className(), ['data' => \app\entities\AttestacionnoeVariativnoeIspytanie_2::find()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'), 'options' => ['multiple' => true]]);
?>
            <?php 
echo $form->field($filterModel, 'varIspytanie3')->widget(Select2::className(), ['data' => \app\entities\AttestacionnoeVariativnoeIspytanie_2::find()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'), 'options' => ['multiple' => true]]);
?>
        </div>
        <div class="col-md-3">
            <?php 
echo $form->field($filterModel, 'kategoriya')->widget(Select2::className(), ['data' => \app\enums\KategoriyaPedRabotnika::namesOnlyPositive(), 'options' => ['multiple' => true]]);
?>
            <?php 
echo $form->field($filterModel, 'fio');
?>
        </div>
        <div class="col-md-3">
            <br>
            <?php 
echo $form->field($filterModel, 'podtverzhdenieRegistracii')->checkbox(['label' => 'Подтвержден']);
?>
            <?php 
echo $form->field($filterModel, 'zayavlenieId', ['options' => ['style' => 'margin-top:2em']]);
?>
        </div>
    </div>
Example #29
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\Helpdoc */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="helpdoc-form">

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

    <?php 
echo $form->field($model, 'upid')->widget(\kartik\widgets\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(\backend\models\Helpdoc::findAll(['status' => 1]), 'id', 'title'), 'options' => ['placeholder' => '请选择上级标题'], 'pluginOptions' => ['allowClear' => true, 'tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 50]]);
?>

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

    <?php 
echo $form->field($model, 'tagNames')->widget(\dosamigos\selectize\SelectizeTextInput::className(), ['loadUrl' => ['tag/list'], 'options' => ['class' => 'form-control'], 'clientOptions' => ['plugins' => ['remove_button'], 'valueField' => 'name', 'labelField' => 'name', 'searchField' => ['name'], 'create' => true]])->hint('提示:用逗号或者回车键分隔标签');
?>

    <?php 
echo $form->field($model, 'content')->widget(\kucha\ueditor\UEditor::className(), ['clientOptions' => ['initialFrameHeight' => '200', 'lang' => 'zh-cn', 'toolbars' => [['fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|']]]]);
?>

    <?php 
Example #30
0
?>
            </div>
        </div>
        <div class="col-md-4">
            <?php 
echo \kartik\tabs\TabsX::widget(['renderTabContent' => false, 'items' => [['label' => Yii::t('app', 'Options'), 'active' => true, 'options' => ['id' => 'options']], ['label' => Yii::t('app', 'Attachment'), 'options' => ['id' => 'attachments']]]]);
?>
            <div class="tab-content">
                <div id="options" class="tab-pane active">

                    <?php 
echo $form->field($model, 'status')->radioList($model->getStatusOptions(), ['inline' => true]);
?>

                    <?php 
echo $form->field($model, 'category')->widget(\kartik\widgets\Select2::className(), ['pluginOptions' => ['placeholder' => ' - 请选择分类 - '], 'data' => \yii\helpers\ArrayHelper::map(\common\helpers\Category::getInstance()->getAll(['id', 'name']), 'id', 'name')]);
?>

                    <?php 
echo $form->field($model, 'tags')->widget(\dosamigos\selectize\SelectizeTextInput::className(), ['loadUrl' => ['/tag/index'], 'clientOptions' => ['placeholder' => '标签(可选)', 'allowEmptyOption' => false, 'valueField' => 'name', 'labelField' => 'name', 'searchField' => 'name', 'delimiter' => ',', 'maxItems' => 5, 'plugins' => ['remove_button'], 'persist' => false, 'create' => true], 'options' => ['value' => implode(',', \yii\helpers\ArrayHelper::getColumn($model->tags, 'name'))]]);
?>

                    <?php 
echo $form->field($model, 'order')->textInput(['placeholder' => 'Enter Order...']);
?>

                    <?php 
echo $form->field($model, 'password')->passwordInput(['placeholder' => 'Enter Password...']);
?>

                    <?php