Пример #1
0
?>
</label>
            <?php 
echo TreeViewInput::widget(['query' => Category::find()->addOrderBy('root, lft'), 'headingOptions' => ['label' => 'Категория'], 'attribute' => 'category_id', 'model' => $model, 'asDropdown' => true, 'multiple' => false, 'fontAwesome' => true, 'rootOptions' => ['label' => '<i class="fa fa-tree"></i>', 'class' => 'text-success']]);
?>
            <?php 
echo $form->field($model, 'tagged');
?>
            <div class="form-group">
                <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('blog', 'Create') : Yii::t('blog', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            </div>
        </div>
    </div>
    <?php 
echo $form->field($model, 'body')->widget(\zxbodya\yii2\tinymce\TinyMce::className(), ['language' => 'ru', 'settings' => ['image_class_list' => [['title' => 'responsive', 'value' => 'img-responsive'], ['title' => 'none', 'value' => '']], 'rel_list' => [[title => 'FancyBox', value => 'fancybox'], [title => 'Обычная', value => '']], 'force_br_newlines' => true, 'force_p_newlines' => false, 'forced_root_block' => false, 'height' => 500, 'image_dimensions' => false, 'extended_valid_elements' => 'img[*],div[*]'], 'fileManager' => ['class' => \zxbodya\yii2\elfinder\TinyMceElFinder::className(), 'connectorRoute' => '/blog/el-finder/connector'], 'spellcheckerUrl' => 'http://speller.yandex.net/services/tinyspell']);
?>

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

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

</div>
Пример #2
0
    
                    <?php 
echo $form->field($model, 'content_de')->widget(TinyMce::className(), ['fileManager' => ['class' => TinyMceElFinder::className(), 'connectorRoute' => 'el-finder/connector']]);
?>
                </div>
                <div id="spanish" role="tabpanel" class="tab-pane">
                    <?php 
echo $form->field($model, 'title_es')->textInput(['maxlength' => 255]);
?>
   
                    <?php 
echo $form->field($model, 'subject_es')->textInput(['maxlength' => 255]);
?>
    
                    <?php 
echo $form->field($model, 'content_es')->widget(TinyMce::className(), ['fileManager' => ['class' => TinyMceElFinder::className(), 'connectorRoute' => 'el-finder/connector']]);
?>
                </div>
                <?php 
echo $form->field($model, 'email_key')->textInput(['maxlength' => 255]);
?>

                <div class="form-group">
                    <?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>
        </div>
    </div>
Пример #3
0
use yii\bootstrap\ActiveForm;
?>

<div class="page-form">

    <?php 
$form = ActiveForm::begin();
?>
    <?php 
echo $form->field($model, 'alias')->textInput(['maxlength' => 1024]);
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => 512]);
?>
    <?php 
echo $form->field($model, 'body')->widget(\zxbodya\yii2\tinymce\TinyMce::className(), ['spellcheckerUrl' => 'http://speller.yandex.net/services/tinyspell', 'language' => Yii::$app->language, 'compressorRoute' => 'el-finder/tinyMceCompressor', 'fileManager' => ['class' => \zxbodya\yii2\elfinder\TinyMceElFinder::className(), 'connectorRoute' => 'el-finder/connector']]);
?>
    <?php 
echo $form->field($model, 'status')->checkbox();
?>
    
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('page', 'Create') : Yii::t('page', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

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