Ejemplo n.º 1
0
// $form->field($model, 'informasi')->widget(TinyMce::className(), [
//     'options' => ['rows' => 15],
//     'clientOptions' => [
//      'content_style'=>'p {font-size:15px;}',
//         'plugins' => [
//             "advlist autolink lists link charmap print preview anchor",
//             "searchreplace visualblocks code fullscreen",
//             "insertdatetime media table contextmenu paste"
//         ],
//         'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
//     ]
// ]);
?>
 
<?php 
echo $form->field($model, 'informasi')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => 'some/sub/path'], ['preset' => Yii::$app->devicedetect->isMobile() ? 'basic' : 'full', 'skin' => 'office2013'])]);
?>



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

    <?php 
//= $form->field($model, 'created_at')->textInput()
?>

    <?php 
//= $form->field($model, 'modified_at')->textInput()
?>
Ejemplo n.º 2
0
 public function init()
 {
     $this->editorOptions = \mihaildev\elfinder\ElFinder::ckeditorOptions('/admin/file-manager-elfinder', ['preset' => 'full', 'extraPlugins' => 'sourcedialog', 'allowedContent' => true, 'inline' => true, 'height' => 'auto']);
     parent::init();
 }
Ejemplo n.º 3
0
?>

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

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

    <?php 
echo $form->field($model, 'image')->widget(InputFile::className(), ['language' => 'en', 'controller' => 'elfinder', 'path' => 'image', 'filter' => 'image', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-success'], 'multiple' => false]);
?>

    <?php 
echo $form->field($model, 'content')->widget(CKEditor::className(), ['editorOptions' => elFinder::ckeditorOptions(['elfinder'], ['preset' => 'standard', 'entities' => false])]);
?>

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

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

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

    <?php 
Ejemplo n.º 4
0
/* @var $this yii\web\View */
/* @var $model app\modules\appointment\models\Locality */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="locality-form">

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

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

    <?php 
echo $form->field($model, 'contact')->widget(\mihaildev\ckeditor\CKEditor::className(), ['editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions('elfinder')]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('Сохранить', ['class' => 'btn btn-success']);
?>
    </div>

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

</div>
Ejemplo n.º 5
0
use kartik\select2\Select2;
/* @var $this yii\web\View */
/* @var $model yincart\item\models\Item */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="item-form">

    <?php 
$form = ActiveForm::begin();
$fieldGroups = [];
$fields = [];
$fields[] = $form->field($model, 'sku')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'name')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'description')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['elfinder/manager'])]]);
$fields[] = $form->field($model, 'short_description')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['elfinder/manager'])]]);
$fields[] = $form->field($model, 'meta_description')->textarea(['rows' => 6]);
$fields[] = $form->field($model, 'meta_keywords')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'sort')->textInput();
$fields[] = $form->field($model, 'status')->checkbox();
$fieldGroups[] = ['label' => 'Base Info', 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'original_price')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'price')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'stock_qty')->textInput();
$fields[] = $form->field($model, 'min_sale_qty')->textInput();
$fields[] = $form->field($model, 'max_sale_qty')->textInput();
$fields[] = $form->field($model, 'weight')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'shipping_fee')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'is_free_shipping')->checkbox();
$fieldGroups[] = ['label' => 'Price & Stock', 'content' => implode('', $fields)];
    <?php 
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
    ?>
        <p style="margin-top: -10px;" class="help-block"><?php 
    echo Yii::t('infoweb/email', 'Tags');
    ?>
: <?php 
    echo $template->supported_tags;
    ?>
</p>
    <?php 
}
?>

    <?php 
echo $form->field($model, "[{$model->language}]message")->widget(CKEditor::className(), ['name' => "TemplateLang[{$model->language}][message]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), Yii::$app->getModule('email')->ckEditorOptions, LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => $allowContentDuplication ? 'true' : 'false']]);
?>
    <?php 
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
    ?>
        <p style="margin-top: -10px;" class="help-block"><?php 
    echo Yii::t('infoweb/email', 'Tags');
    ?>
: <?php 
    echo $template->supported_tags;
    ?>
</p>
    <?php 
}
?>
</div>
<?php

use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
?>
<div class="tab-content downloads-tab">
    <?php 
echo $form->field($model, 'downloads')->widget(CKEditor::className(), ['editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), ['height' => 200])]);
?>
</div>
Ejemplo n.º 8
0
<div class="item-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
$fieldGroups = [];
$fields = [];
$fields[] = $form->field($model, 'title')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'price')->textInput(['maxlength' => 255]);
$currency = Currency::find()->all();
$fields[] = $form->field($model, 'currency')->dropDownList(ArrayHelper::map($currency, 'currency_id', 'name'));
$language = Language::find()->all();
$fields[] = $form->field($model, 'language')->dropDownList(ArrayHelper::map($language, 'language_id', 'name'));
$fieldGroups[] = ['label' => Yii::t('catalog', 'Base Info'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'desc')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['/elfinder/manager', 'filter' => 'image'])]]);
$fieldGroups[] = ['label' => Yii::t('catalog', 'Detailed Info'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'shipping_fee')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'is_show')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_promote')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_new')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_hot')->radioList(['No', 'Yes']);
$fields[] = $form->field($model, 'is_best')->radioList(['No', 'Yes']);
$fieldGroups[] = ['label' => Yii::t('catalog', 'Other Info'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'category_id')->dropDownList(Tree::getTreesByName('商品分类'), ['data-url' => Url::to(['/catalog/core/item/item-props']), 'data-item_id' => $model->item_id, 'data-tree_id' => $model->category_id ? $model->category_id : key(Tree::getTreesByName('商品分类'))]);
$fields[] = $this->render('_form_prop', ['model' => $model, 'tree_id' => $model->category_id ? $model->category_id : key(Tree::getTreesByName('商品分类'))]);
$fieldGroups[] = ['label' => Yii::t('catalog', 'Product Info'), 'content' => implode('', $fields)];
$fields = [];
if ($model->isNewRecord) {
Ejemplo n.º 9
0
echo $form->field($model, 'category_id')->widget(Select2::classname(), ['data' => \yii\helpers\ArrayHelper::map(\common\models\Categories::find()->all(), 'id', 'name'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'kitchensIds')->widget(Select2::classname(), ['data' => $model->getdropKitchens(), 'options' => ['placeholder' => 'Select a Kitchens ...', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]])->label('Kitchens');
?>
    <?php 
echo $form->field($model, 'servicesIds')->widget(Select2::classname(), ['data' => $model->getdropServices(), 'options' => ['placeholder' => 'Select a Services ...', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]])->label('Services');
?>

    <?php 
echo $form->field($model, 'metrosIds')->widget(Select2::classname(), ['data' => $model->getdropMetros(), 'options' => ['placeholder' => 'Select a Metros ...', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]])->label('Metros');
?>

    <?php 
echo $form->field($model, 'description')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'basic', 'inline' => false]]);
?>



    <?php 
echo $form->field($model, 'status')->checkbox(['value' => '0', 'label' => 'Active', 'uncheck' => '1']);
?>

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

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

use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
use infoweb\cms\helpers\LanguageHelper;
?>
<div class="tab-content default-language-tab">
    <?php 
echo $form->field($model, "[{$model->language}]name")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][name]", 'data-duplicateable' => Yii::$app->getModule('gallery')->allowContentDuplication ? 'true' : 'false']);
?>

    <?php 
if (Yii::$app->getModule('gallery')->enableDescription) {
    ?>
    <?php 
    echo $form->field($model, "[{$model->language}]description")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][description]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => Yii::$app->getModule('gallery')->allowContentDuplication ? 'true' : 'false']]);
    ?>
    <?php 
}
?>
</div>
Ejemplo n.º 11
0
Archivo: _form.php Proyecto: apuc/admin
                <a data-toggle='modal' data-target='#myModal' href='#'>Обзор</a> |
                <a class = 'del_img_pages' href = '#'>Удалить</a>
            </div>
            <?php 
echo $form->field($model, 'images')->textInput(['maxlength' => true])->hiddenInput()->label(false);
?>
            <div class="cleared"></div>
            <br>
            <?/*= $form->field($model, 'count_product')->textInput() */?><!--
            --><?/*= $form->field($model, 'hint')->textInput(['maxlength' => true]) */?>
            <?php 
echo $form->field($model, 'fix_menu')->dropDownList(['0' => 'Не прикреплять', '1' => 'Меню 1-го уровня', '2' => 'Меню 2-го уровня']);
?>

            <?php 
echo $form->field($model, 'description')->widget(CKEditor::className(), ['editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions('elfinder', ['preset' => 'standard', 'inline' => false])]);
?>
        </div>
        <div id="panel2" class="tab-pane fade <?php 
echo $tabContent2;
?>
">
            <h3>Вид</h3>
            <?php 
echo $form->field($model, 'blokc_id')->dropDownList($block);
?>
            <?php 
echo Html::button('Добавить блок', ['class' => 'btn btn-success', 'id' => 'addCustBlock']);
?>
            <br>
            <hr>
Ejemplo n.º 12
0
<div class="cms-form">

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

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

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

    <?php 
echo $form->field($model, 'content')->widget(CKEditor::className(), ['editorOptions' => ['filebrowserBrowseUrl' => Url::to(['elfinder/manager'])]]);
?>

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

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

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

Ejemplo n.º 13
0
?>

<div class="page-form">

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

    <div class="row">
        <div class="col-md-8">
            <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
            <?php 
echo $form->field($model, 'html')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'standard', 'inline' => false]])->label('Content');
?>
        </div>
        
        <div class="col-md-4">
            
            <div class="box">
                <div class="box-header with-border">
                    <div class="box-title">Publish</div>
                </div>
                <div class="box-body">
                    <div class="form-group">
                        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('halo/page', 'Create') : Yii::t('halo/page', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
                    </div>
Ejemplo n.º 14
0
?>

    <?php 
echo $form->errorSummary($model);
?>

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

    <?php 
echo $form->field($model, 'short_text')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder-backend', ['preset' => 'basic'])]);
?>

    <?php 
echo $form->field($model, 'text')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder-backend')]);
?>

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

    <?php 
echo $form->field($model, 'status')->dropDownList(Post::getStatuses());
?>

    <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>
Ejemplo n.º 15
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use mihaildev\ckeditor\CKEditor;
?>

<div class="feedback-form">
    <?php 
$form = ActiveForm::begin();
?>
        <?php 
echo $form->field($model, 'item_id')->hiddenInput(['value' => $_GET['id']]);
?>
        <?php 
echo $form->field($model, 'comment')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'standard', 'inline' => false, 'height' => '100px']]);
?>
        <?php 
echo $form->field($model, 'rate')->dropDownList(['5' => 'Отлично', '4' => 'Хорошо', '3' => 'Средне', '2' => 'Слабенько', '1' => 'Плохо'], ['promt' => 'Выставьте оценку']);
?>
    <div class="form-group">
        <?php 
echo Html::submitButton('Готово', ['class' => 'btn btn-primary']);
?>
    </div>
    <?php 
ActiveForm::end();
?>
</div>
    
Ejemplo n.º 16
0
 public function init()
 {
     parent::init();
     $bundle = \yii\bootstrap\BootstrapAsset::register(\Yii::$app->view);
     $this->editorOptions = \mihaildev\elfinder\ElFinder::ckeditorOptions('/admin/file-manager-elfinder', ['preset' => 'full', 'extraPlugins' => 'codemirror', 'entities' => false, 'allowedContent' => true, 'baseHref' => \Yii::$app->homeUrl, 'contentsCss' => [$bundle->baseUrl . '/css/bootstrap.css', '/main.css']]);
 }
Ejemplo n.º 17
0
    	<div class="col-lg-4"><?php 
echo $form->field($model, 'published')->dropDownList($model->publishedList, [$model->published]);
?>
</div>
    	<div class="col-lg-4"><?php 
echo $form->field($model, 'created_by')->dropDownList($model->authorsList, [$model->created_by]);
?>
</div>
    </div>

    <?php 
echo $form->field($model, 'intro')->textarea(['rows' => 6]);
?>
    
	<?php 
echo $form->field($model, 'text')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder', ['preset' => 'full', 'inline' => false])]);
?>

    
    <?php 
if ($model->image != '') {
    ?>
    <div class="row form-group">
    	<div class="col-lg-4">
    		<img src="<?php 
    echo $model->imageUrl;
    ?>
" alt="" class="img-responsive img-thumbnail" />
    		<br>
    		<?php 
    echo $form->field($model, 'image')->textInput()->label(false);
Ejemplo n.º 18
0
<?php

use mihaildev\ckeditor\CKEditor;
use yii\web\View;
/**
 * @var $form \yii\widgets\ActiveForm
 * @var $block \nullref\cms\blocks\html\Block
 * @var $this \yii\web\View
 */
list(, $footnotesUrl) = Yii::$app->assetManager->publish('@nullref/cms/assets/ckeditor-plugins/codemirror');
$this->registerJs("CKEDITOR.plugins.addExternal( 'codemirror', '" . $footnotesUrl . "/','plugin.js');", View::POS_END);
?>

<?php 
echo $form->field($block, 'content')->widget(CKEditor::className(), ['id' => 'editor', 'editorOptions' => ['preset' => 'full', 'inline' => false, 'extraPlugins' => 'codemirror', 'codemirror' => ['autoCloseBrackets' => true, 'autoCloseTags' => true, 'autoFormatOnStart' => true, 'autoFormatOnUncomment' => true, 'continueComments' => true, 'enableCodeFolding' => true, 'enableCodeFormatting' => true, 'enableSearchTools' => true, 'highlightMatches' => true, 'indentWithTabs' => false, 'lineNumbers' => true, 'lineWrapping' => true, 'mode' => 'htmlmixed', 'matchBrackets' => true, 'matchTags' => true, 'showAutoCompleteButton' => true, 'showCommentButton' => true, 'showFormatButton' => true, 'showSearchButton' => true, 'showTrailingSpace' => true, 'showUncommentButton' => true, 'styleActiveLine' => true, 'theme' => 'default', 'useBeautify' => true]]]);
?>

<div class="row">
    <div class="col-md-6">
        <?php 
echo $form->field($block, 'sliderConfig')->widget('trntv\\aceeditor\\AceEditor', ['mode' => 'json', 'theme' => 'github']);
?>
    </div>
    <div class="col-md-6">
        <?php 
echo $form->field($block, 'sliderWrapperName')->textInput();
?>
        <?php 
echo $form->field($block, 'defaultSliderName')->textInput();
?>
        <?php 
Ejemplo n.º 19
0
        <?php 
echo $form->field($model, 'state')->checkbox();
?>

        <hr>

        <?php 
echo $form->field($model, 'intro')->widget(\mihaildev\ckeditor\CKEditor::className(), ['editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions(['elfinder', 'path' => '/'], ['preset' => 'standart', 'allowedContent' => true, 'height' => '200px', 'toolbar' => Yii::$app->zoo->cke_editor_toolbar, 'contentsCss' => Yii::$app->zoo->cke_editor_css])]);
?>

        <?php 
echo $form->field($model, 'content')->widget(\mihaildev\ckeditor\CKEditor::className(), ['editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions(['elfinder', 'path' => '/'], ['preset' => 'standart', 'allowedContent' => true, 'height' => '200px', 'toolbar' => Yii::$app->zoo->cke_editor_toolbar, 'contentsCss' => Yii::$app->zoo->cke_editor_css])]);
?>

        <?php 
echo $form->field($model, 'quote')->widget(\mihaildev\ckeditor\CKEditor::className(), ['editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions(['elfinder', 'path' => '/'], ['preset' => 'standart', 'allowedContent' => true, 'height' => '200px', 'toolbar' => Yii::$app->zoo->cke_editor_toolbar, 'contentsCss' => Yii::$app->zoo->cke_editor_css])]);
?>

        <hr>

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

        <?php 
echo $form->field($model, 'metaDescription')->textarea(['rows' => 2, 'class' => 'uk-width-1-1']);
?>

        <?php 
echo $form->field($model, 'metaKeywords')->textInput(['maxlength' => true, 'class' => 'uk-width-1-1']);
?>
Ejemplo n.º 20
0
?>

<div class="content-body">
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">

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

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

            <?php 
echo $form->field($model, 'detail')->widget(\mihaildev\ckeditor\CKEditor::className(), ['editorOptions' => ['preset' => 'full', 'inline' => false]]);
?>

            <?php 
echo $form->field($model, 'enabled')->dropDownList(['0' => '不启用', '1' => '启用']);
?>

            <?php 
echo $form->field($model, 'start_date')->widget(\kartik\widgets\DatePicker::className(), ['options' => ['placeholder' => 'Select operating time ...', 'value' => date('Y-m-d', time())], 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd', 'todayHighlight' => true]]);
?>

            <?php 
echo $form->field($model, 'end_date')->widget(\kartik\widgets\DatePicker::className(), ['options' => ['placeholder' => 'Select operating time ...', 'value' => date('Y-m-d', time() + 365 * 24 * 60 * 60)], 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd', 'todayHighlight' => true]]);
?>

            <div class="form-group pull-right">
Ejemplo n.º 21
0
            <?php 
echo $form->field($model, 'twitter')->textInput(['maxlength' => 255]);
?>
        </div>

    </div>
    <div class="row">
        <div class="col-md-10">
            <?php 
echo $form->field($model, "privacyPolicy")->widget(CKEditor::className(), ["editorOptions" => ["preset" => "full", "inline" => false]]);
?>
            <?php 
echo $form->field($model, "legalNotice")->widget(CKEditor::className(), ["editorOptions" => ["preset" => "full", "inline" => false]]);
?>
            <?php 
echo $form->field($model, "terms")->widget(CKEditor::className(), ["editorOptions" => ["preset" => "full", "inline" => false]]);
?>

        </div>
    </div>

    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>

    <?php 
ActiveForm::end();
Ejemplo n.º 22
0
/* @var $model app\models\Category */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="category-form">

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

    <?php 
$tabsArray = array();
$i = 0;
$tinyConfigs = ['options' => ['class' => 'your_class'], 'configs' => ['plugins' => "link image", 'toolbar' => ['undo redo | styleselect fontselect fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image']]];
foreach (Yii::$app->params['languages'] as $key => $lang) {
    $tabsArray[$i++] = ['label' => $lang, 'active' => $key == Yii::$app->language ? true : false, 'content' => $form->field($model, 'name_' . $key)->textInput(['maxlength' => 255]) . $form->field($model, 'description_' . $key)->widget(CKEditor::className(), ['editorOptions' => ['toolbarGroups' => Yii::$app->params['CKEtoolbarGroups'], 'width' => '800px']])];
}
?>
    <?php 
echo Tabs::widget(['items' => $tabsArray]);
?>

    <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>

    <?php 
ActiveForm::end();
?>
Ejemplo n.º 23
0
</a></li>
            <li><a href="#meta-options" data-toggle="tab"><?php 
echo Yii::t('gromver.platform', 'Metadata');
?>
</a></li>
        </ul>
        <br/>
        <div class="tab-content">
            <div id="main-options" class="tab-pane active">
                <div class="form-group container">
                    <?php 
echo Html::activeLabel($model, 'detail_text');
?>
                    <div>
                        <?php 
echo \mihaildev\ckeditor\CKEditor::widget(['model' => $model, 'attribute' => 'detail_text', 'editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions('grom/media/manager', ['extraPlugins' => 'codesnippet'])]);
?>
                    </div>
                </div>
                <?php 
echo $form->field($model, 'language')->dropDownList(Yii::$app->getLanguagesList(), ['prompt' => Yii::t('gromver.platform', 'Select ...'), 'id' => 'language']);
?>

                <?php 
echo $form->field($model, 'category_id')->widget(\kartik\widgets\DepDrop::className(), ['pluginOptions' => ['depends' => ['language'], 'placeholder' => Yii::t('gromver.platform', 'Select ...'), 'url' => \yii\helpers\Url::to(['categories', 'selected' => $model->category_id])]]);
?>

                <?php 
echo $form->field($model, 'status')->dropDownList(['' => Yii::t('gromver.platform', 'Select ...')] + $model->statusLabels());
?>
<?php

use mihaildev\ckeditor\CKEditor;
use infoweb\cms\helpers\LanguageHelper;
use yii\helpers\ArrayHelper;
?>
<div class="tab-content language-tab">

    <?php 
echo $form->field($model, "[{$model->language}]name")->textInput(['name' => "Lang[{$model->language}][name]"]);
?>

    <?php 
echo $form->field($model, "[{$model->language}]content")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][content]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : [])]);
?>

</div>
Ejemplo n.º 25
0
?>

    <?php 
echo $form->field($model, 'name')->textInput(['value' => $tour->name]);
?>
    <?php 
echo $form->field($model, 'org')->textInput(['value' => $tour->org]);
?>
    <?php 
echo $form->field($model, 'tel')->textInput(['value' => $tour->tel]);
?>
    <?php 
echo $form->field($model, 'address')->textInput(['value' => $tour->address]);
?>
    <?php 
echo $form->field($model, 'info')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'full', 'inline' => false]])->textInput(['value' => $tour->info]);
//$form->field($model, 'info')
?>

    <?php 
echo $form->field($model, 'site')->textInput(['value' => $tour->site]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('Обновить', ['class' => 'btn btn-primary']);
?>
    </div>
    <?php 
ActiveForm::end();
?>
Ejemplo n.º 26
0
<?php

use mihaildev\ckeditor\CKEditor;
use mihaildev\elfinder\ElFinder;
use yii\web\View;
/**
 * @var $form \yii\widgets\ActiveForm
 * @var $block \nullref\cms\blocks\html\Block
 * @var $this \yii\web\View
 */
list(, $footnotesUrl) = Yii::$app->assetManager->publish('@nullref/cms/assets/ckeditor-plugins/codemirror');
$this->registerJs("CKEDITOR.plugins.addExternal( 'codemirror', '" . $footnotesUrl . "/','plugin.js');\nObject.keys(CKEDITOR.dtd.\$removeEmpty).forEach(function(key){CKEDITOR.dtd.\$removeEmpty[key] = 0;});\n", View::POS_END);
$editorConfig = ['id' => 'editor', 'editorOptions' => ['preset' => 'full', 'inline' => false, 'extraPlugins' => 'codemirror', 'allowedContent' => true, 'basicEntities' => false, 'entities' => false, 'entities_greek' => false, 'entities_latin' => false, 'htmlEncodeOutput' => false, 'entities_processNumerical' => false, 'fillEmptyBlocks' => false, 'fullPage' => false, 'codemirror' => ['autoCloseBrackets' => true, 'autoCloseTags' => true, 'autoFormatOnStart' => true, 'autoFormatOnUncomment' => true, 'continueComments' => true, 'enableCodeFolding' => true, 'enableCodeFormatting' => true, 'enableSearchTools' => true, 'highlightMatches' => true, 'indentWithTabs' => false, 'lineNumbers' => true, 'lineWrapping' => true, 'mode' => 'htmlmixed', 'matchBrackets' => true, 'matchTags' => true, 'showAutoCompleteButton' => true, 'showCommentButton' => true, 'showFormatButton' => true, 'showSearchButton' => true, 'showTrailingSpace' => true, 'showUncommentButton' => true, 'styleActiveLine' => true, 'theme' => 'default', 'useBeautify' => true]]];
$editorConfig['editorOptions'] = ElFinder::ckeditorOptions('elfinder-backend', $editorConfig['editorOptions']);
echo $form->field($block, 'content')->widget(CKEditor::className(), $editorConfig);
echo $form->field($block, 'tag')->textInput();
echo $form->field($block, 'tagClass')->textInput();
Ejemplo n.º 27
0
Archivo: _form.php Proyecto: poykub/wph
                <!-- /.box-header -->
                <div class="box-body">
                    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

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

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

                    <?php 
echo $form->field($model, 'content')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'full', 'inline' => false]]);
?>

                    <?php 
echo '<label class="control-label" for="photos[]"> ไฟล์ที่เกี่ยวข้อง  (เฉพาะไฟล์ pdf,doc,docx,zip,rar)</label>';
echo '<div class="well well-small">';
echo FileInput::widget(['name' => 'files[]', 'pluginOptions' => ['showPreview' => true, 'showCaption' => false, 'elCaptionText' => '#customCaption', 'previewFileType' => 'any'], 'options' => ['multiple' => true]]);
echo '<span id="customCaption" class="text-success">ยังไม่ได้เลือกไฟล์</span>';
echo '</div>';
?>

                    <div class="row">
                        <div class="col-lg-6">

                            <?php 
/*= $form->field($model, 'files')->fileInput(['multiple' => true])*/
Ejemplo n.º 28
0
	<?php 
echo $form->field($model, 'cat')->dropDownList(['man' => 'мужские', 'woman' => 'женские']);
?>
	<?php 
echo $form->field($model, 'mechan')->dropDownList(['кварцевый' => 'Кварцевый', 'механический' => 'Механический', 'электронный' => 'Электронный']);
?>
	<?php 
echo $form->field($model, 'weight')->textInput();
?>
	<?php 
echo $form->field($model, 'casemat')->textInput();
?>

	<?php 
echo $form->field($model, 'text')->widget(CKEditor::className(), ['editorOptions' => ['preset' => 'standart', 'inline' => false]]);
?>
	<?php 
$images = $model->getImages();
?>

	<?php 
if (isset($images)) {
    $i = 0;
    foreach ($images as $image) {
        ?>
			<?php 
        if (!empty($image->id)) {
            ?>
				<img src="<?php 
            echo $image->getUrl('150x');
Ejemplo n.º 29
0
?>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <?php 
echo $form->field($model, 'annotation')->textarea(['rows' => 2]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <?php 
echo $form->field($model, 'content')->widget(CKEditor::className(), ['editorOptions' => ElFinder::ckeditorOptions('elfinder', [])]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'image')->widget(InputFile::className(), ['controller' => 'elfinder', 'filter' => 'image', 'template' => '<div class="input-group">
                                                {input}<span class="input-group-btn">{button}</span>
                                            </div>', 'options' => ['class' => 'form-control'], 'buttonName' => Yii::t('document', 'Выбрать файл'), 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false]);
?>
        </div>
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'position')->textInput(['maxlength' => true]);
<?php

use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
use infoweb\cms\helpers\LanguageHelper;
?>
<div class="tab-content language-tab">

    <?php 
echo $form->field($model, "[{$model->language}]title")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][title]", 'data-duplicateable' => var_export($allowContentDuplication, true)]);
?>

    <?php 
if (Yii::$app->getModule('partials')->enableUrl) {
    ?>
    <?php 
    echo $form->field($model, "[{$model->language}]url")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][url]", 'data-duplicateable' => var_export($allowContentDuplication, true)]);
    ?>
    <?php 
}
?>

    <?php 
echo $form->field($model, "[{$model->language}]content")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][content]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), Yii::$app->getModule('partials')->ckEditorOptions, LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => var_export($allowContentDuplication, true)]]);
?>
</div>