Exemplo n.º 1
0
            <?php 
$form = ActiveForm::begin(['id' => 'VidmageAuthor', 'layout' => 'horizontal', 'enableClientValidation' => true, 'errorSummaryCssClass' => 'error-summary alert alert-error']);
?>

            <div class="">
                <?php 
$this->beginBlock('main');
?>

                <p>
                    
			<?php 
echo $form->field($model, 'vidmage_id')->dropDownList(Vidmage::getMappedArray());
?>
			<?php 
echo $form->field($model, 'author_id')->dropDownList(Author::getMappedArray());
?>
			<?php 
echo $form->field($model, 'is_main_author')->checkBox();
?>
                </p>
                <?php 
$this->endBlock();
?>
                
                <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => 'VidmageAuthor', 'content' => $this->blocks['main'], 'active' => true]]]);
?>
                <hr/>
                <?php 
echo $form->errorSummary($model);
Exemplo n.º 2
0
                        </label>
                        <div class="col-sm-6">
                            <?php 
echo Select2::widget(['name' => 'vidmageCategories', 'data' => Category::getMappedArray(), 'value' => ArrayHelper::getColumn($model->vidmageCategories, 'category_id'), 'options' => ['placeholder' => 'Select a category ...', 'multiple' => true], 'pluginOptions' => []]);
?>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3" for="vidmage-vidmageauthors">
                            <?php 
echo $model->getAttributeLabel('vidmageAuthors');
?>
                        </label>
                        <div class="col-sm-6">
                            <?php 
echo Select2::widget(['name' => 'vidmageAuthors', 'data' => Author::getMappedArray(), 'value' => ArrayHelper::getColumn($model->vidmageAuthors, 'author_id'), 'options' => ['placeholder' => 'Select an author ...', 'multiple' => true], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',']]]);
?>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3" for="vidmage-vidmagetags">
                            <?php 
echo $model->getAttributeLabel('vidmageTags');
?>
                        </label>
                        <div class="col-sm-6">
                            <?php 
echo Select2::widget(['name' => 'vidmageTags', 'data' => Tag::getMappedArray(), 'value' => ArrayHelper::getColumn($model->vidmageTags, 'tag_id'), 'options' => ['placeholder' => 'Select a tag ...', 'multiple' => true], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' ']]]);
?>
                        </div>
                    </div>