<?php use app\assets\MultipleSelectAsset; use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; use dosamigos\multiselect\MultiSelect; use kartik\grid\GridView; MultipleSelectAsset::register($this); /* @var $this yii\web\View */ /* @var $model app\models\Form */ /* @var $form yii\widgets\ActiveForm */ $banks = ['' => 'Bitte wählen Sie'] + ArrayHelper::map(app\models\Bank::find()->orderBy('bezeichnung')->all(), 'b_id', 'bezeichnung'); $groups = ['' => 'Bitte wählen Sie'] + ArrayHelper::map(app\models\Group::find()->orderBy('bezeichnung')->all(), 'p_id', 'bezeichnung'); $pageSize = Yii::$app->session->get('pageSize', Yii::$app->params['defaultPageSize']); ?> <div class="form-form"> <?php $form = ActiveForm::begin(); ?> <div class="form-group <?php if (isset($model->errors['s_b_id'])) { ?> has-error <?php } ?> "> <label for="">Bank</label> <?php echo MultiSelect::widget(['data' => $banks, 'name' => 'Style[s_b_id]', 'clientOptions' => ['maxHeight' => 300, 'enableCaseInsensitiveFiltering' => true, 'buttonWidth' => '400px'], 'options' => ['multiple' => false, 'nonSelectedValue' => 0], 'value' => $model->s_b_id]);
<?php use app\assets\MultipleSelectAsset; use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; use dosamigos\multiselect\MultiSelect; MultipleSelectAsset::register($this); /* @var $this yii\web\View */ /* @var $model app\models\UserText */ /* @var $form yii\widgets\ActiveForm */ $banks = ['0' => 'Alle'] + ArrayHelper::map(app\models\Bank::find()->orderBy('klasse')->all(), 'klasse', 'bezeichnung'); $groups = ['0' => 'Alle'] + ArrayHelper::map(app\models\Group::find()->orderBy('bezeichnung')->all(), 'p_id', 'bezeichnung'); $languages = ['0' => 'Default'] + ArrayHelper::map(app\models\Language::find()->orderBy('name')->all(), 'l_id', 'name'); $texts = ArrayHelper::map(app\models\Text::find()->orderBy('name')->all(), 't_id', 'name'); ?> <div class="user-text-form"> <?php $form = ActiveForm::begin(); ?> <?php if ($model->exists()) { ?> <?php echo $form->field($model, 'p_id')->dropDownList($groups); ?>
</div> </div> </div> </div> <div class="modal modal-lg fade" style="width:100%" id="selectBank" tabindex="-2" role="dialog" aria-labelledby="selectBankLabel" aria-hidden="true"> <div class="modal-dialog" style="width:900px"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="myModalLabel">Select Bank Name</h4> </div> <div class="modal-body"> <?php if ($model->f_klasse) { $banken = ArrayHelper::map(app\models\Bank::find()->where(['klasse' => $model->f_klasse])->orderBy('bezeichnung')->all(), 'b_id', 'bezeichnung'); echo $form->field($model, 'bank')->dropDownList($banken); } ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <input type="hidden" id="questionnaireURL" value="<?php echo Url::toRoute('/site/questionnaire/bezeichnung/' . $model->f_p_id . '/default'); ?> "> <?php echo Html::button('URL generieren', ['class' => 'btn btn-info', 'id' => 'openURL']); ?> </div> </div>