예제 #1
0
?>

        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'annonce')->widget(Imperavi::className(), ['id' => 'imperavi-widget-annonce', 'settings' => ['lang' => 'ru', 'minHeight' => 200, 'maxHeight' => 400, 'limiter' => 4, 'imageManagerJson' => Url::to(['admin/images-get']), 'imageUpload' => Url::to(['admin/image-upload']), 'imageDelete' => ['url' => Url::to(['admin/image-delete'])], 'plugins' => $imperaviPlugins]]);
?>

        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'content')->widget(Imperavi::className(), ['id' => 'imperavi-widget-content', 'settings' => ['lang' => 'ru', 'minHeight' => 200, 'maxHeight' => 400, 'imageManagerJson' => Url::to(['admin/images-get']), 'imageUpload' => Url::to(['admin/image-upload']), 'imageDelete' => Url::to(['admin/image-delete']), 'plugins' => $imperaviPlugins]]);
?>

        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'status')->dropDownList($model->getStatusArray());
?>

        </div>
    </div>
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Module::t('eugenekei-news', 'Create') : Module::t('eugenekei-news', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-primary btn-large' : 'btn btn-success btn-large']);
예제 #2
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Comment */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="comment-form">

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

    <?php 
echo $form->field($model, 'content')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'imageUpload' => \yii\helpers\Url::to(['/site/image-upload']), 'buttons' => ['html', 'bold', 'italic', 'underline', 'deleted']]]);
?>

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

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

</div>
예제 #3
0
<?php

/**
 * @var $attribute_name string
 * @var $form \yii\widgets\ActiveForm
 * @var $label string
 * @var $model \app\properties\AbstractModel
 * @var $multiple boolean
 * @var $property_id integer
 * @var $property_key string
 * @var $this \app\properties\handlers\Handler
 * @var $values array
 */
use vova07\imperavi\Widget as ImperaviWidget;
use yii\helpers\Url;
echo $form->field($model, $property_key . '[0]')->widget(ImperaviWidget::className(), ['settings' => ['replaceDivs' => false, 'minHeight' => 200, 'paragraphize' => true, 'pastePlainText' => true, 'buttonSource' => true, 'imageManagerJson' => Url::to(['/backend/dashboard/imperavi-images-get']), 'plugins' => ['table', 'fontsize', 'fontfamily', 'fontcolor', 'video', 'imagemanager'], 'replaceStyles' => [], 'replaceTags' => [], 'deniedTags' => [], 'removeEmpty' => [], 'imageUpload' => Url::to(['/backend/dashboard/imperavi-image-upload'])]]);
예제 #4
0
<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
 * @var yii\web\View $this
 * @var common\models\SliderImage $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="slider-image-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['publish_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Опубликовано...']], 'slider' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Слайдер...']], 'href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'menu_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('menu_image') ? Html::img($model->getUploadUrl('menu_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'href_enabled_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Показывать кнопку перейти...']], 'created_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'iframe_href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка на iframе(если указан изображения игнорируются)...', 'maxlength' => 255]], 'banner_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_image') ? Html::img($model->getUploadUrl('banner_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_phone_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_phone_image') ? Html::img($model->getUploadUrl('banner_phone_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_tablet_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_tablet_image') ? Html::img($model->getUploadUrl('banner_tablet_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>

</div>
예제 #5
0
 case Content::ATTR_TYPE_TITLE:
     echo $form->field($model, $attr)->textInput(isset($value['config']) ? $value['config'] : []);
     $titleAttribute = $attr;
     break;
 case Content::ATTR_TYPE_STRING:
     echo $form->field($model, $attr)->textInput(isset($value['config']) ? $value['config'] : []);
     break;
 case Content::ATTR_TYPE_INTEGER:
     echo $form->field($model, $attr)->input('number', isset($value['config']) ? $value['config'] : []);
     break;
 case Content::ATTR_TYPE_URL:
     echo $form->field($model, $attr, ['template' => '{label}<div class="input-group"><span class="input-group-addon attached-button-chain"><i class="icon fa fa-chain"></i></span>{input}</div> {hint}{error}'])->textInput(isset($value['config']) ? $value['config'] : []);
     $urlAttribute = $attr;
     break;
 case Content::ATTR_TYPE_ADVANCED_TEXT:
     echo $form->field($model, $attr, ['options' => ['class' => 'form-group col-sm-12']])->widget(Widget::className(), isset($value['config']) ? $value['config'] : []);
     break;
 case Content::ATTR_TYPE_IMAGE:
     echo $form->field($model, $attr)->widget(FileAPI::className(), isset($value['config']) ? $value['config'] : []);
     break;
 case Content::ATTR_TYPE_TEXT:
     echo $form->field($model, $attr)->textarea(isset($value['config']) ? $value['config'] : []);
     break;
 case Content::ATTR_TYPE_DATE:
     echo $form->field($model, $attr)->widget(DateTimePicker::classname(), isset($value['config']) ? $value['config'] : []);
     break;
 case Content::ATTR_TYPE_BOOLEAN:
     echo $form->field($model, $attr)->checkbox();
     break;
 case Content::ATTR_TYPE_DROPDOWN:
     echo $form->field($model, $attr)->dropDownList(isset($value['items']) ? $value['items'] : [], isset($value['config']) ? $value['config'] : []);
예제 #6
0
파일: _form.php 프로젝트: omeke/yii2-papa
<div class="blog-form">

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

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

    <?php 
echo $form->field($model, 'short_text')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300, 'imageGetJson' => Url::to(['/blogs/default/imperavi-get']), 'imageUpload' => Url::to(['/blogs/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/blogs/default/imperavi-file-upload'])]]);
?>

    <?php 
echo $form->field($model, 'text')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300, 'imageGetJson' => Url::to(['/blogs/default/imperavi-get']), 'imageUpload' => Url::to(['/blogs/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/blogs/default/imperavi-file-upload'])]]);
?>

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

    <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();
?>
예제 #7
0
파일: Module.php 프로젝트: janisto/yii2-ycm
 /**
  * Create ActiveForm widget.
  *
  * @param \yii\widgets\ActiveForm $form
  * @param \yii\db\ActiveRecord $model Model
  * @param string $attribute Model attribute
  */
 public function createWidget($form, $model, $attribute)
 {
     $widget = $this->getAttributeWidget($model, $attribute);
     $tableSchema = $model->getTableSchema();
     switch ($widget) {
         case 'widget':
             echo $this->createField($form, $model, $attribute, [], 'widget');
             break;
         case 'wysiwyg':
             $options = ['widgetClass' => RedactorWidget::className(), 'settings' => ['minHeight' => 200, 'plugins' => ['video', 'fullscreen']]];
             if ($this->redactorImageUpload === true) {
                 $imageOptions = ['settings' => ['imageManagerJson' => Url::to(['model/redactor-list', 'name' => $this->getModelName($model), 'attr' => $attribute]), 'imageUpload' => Url::to(['model/redactor-upload', 'name' => $this->getModelName($model), 'attr' => $attribute]), 'imageUploadErrorCallback' => new JsExpression('function(json) { alert(json.error); }'), 'plugins' => ['imagemanager']]];
                 $options = ArrayHelper::merge($options, $imageOptions);
             }
             if ($this->redactorFileUpload === true) {
                 $fileOptions = ['settings' => ['fileManagerJson' => Url::to(['model/redactor-list', 'name' => $this->getModelName($model), 'attr' => $attribute, 'type' => 'file']), 'fileUpload' => Url::to(['model/redactor-upload', 'name' => $this->getModelName($model), 'attr' => $attribute, 'type' => 'file']), 'fileUploadErrorCallback' => new JsExpression('function(json) { alert(json.error); }'), 'plugins' => ['filemanager']]];
                 $options = ArrayHelper::merge($options, $fileOptions);
             }
             echo $this->createField($form, $model, $attribute, $options, 'widget');
             break;
         case 'date':
             $options = ['widgetClass' => TimePicker::className(), 'mode' => 'date', 'clientOptions' => ['dateFormat' => 'yy-mm-dd']];
             echo $this->createField($form, $model, $attribute, $options, 'widget');
             break;
         case 'time':
             $options = ['widgetClass' => TimePicker::className(), 'mode' => 'time', 'clientOptions' => ['timeFormat' => 'HH:mm:ss', 'showSecond' => true]];
             echo $this->createField($form, $model, $attribute, $options, 'widget');
             break;
         case 'datetime':
             $options = ['widgetClass' => TimePicker::className(), 'mode' => 'datetime', 'clientOptions' => ['dateFormat' => 'yy-mm-dd', 'timeFormat' => 'HH:mm:ss', 'showSecond' => true]];
             echo $this->createField($form, $model, $attribute, $options, 'widget');
             break;
         case 'select':
             $options = ['options' => ['placeholder' => Yii::t('ycm', 'Choose {name}', ['name' => $model->getAttributeLabel($attribute)])], 'settings' => ['allowClear' => true, 'width' => '100%'], 'items' => ['' => '']];
             echo $this->createField($form, $model, $attribute, $options, 'select');
             break;
         case 'selectMultiple':
             $options = ['options' => ['multiple' => true, 'placeholder' => Yii::t('ycm', 'Choose {name}', ['name' => $model->getAttributeLabel($attribute)])], 'settings' => ['width' => '100%']];
             echo $this->createField($form, $model, $attribute, $options, 'select');
             break;
         case 'image':
             $options = [];
             if (!$model->isNewRecord && !empty($model->{$attribute})) {
                 $className = StringHelper::basename($model->className());
                 $inputName = $className . '[' . $attribute . '_delete]';
                 $inputId = strtolower($className . '-' . $attribute . '_delete');
                 $url = $this->getAttributeUrl($this->getModelName($model), $attribute, $model->{$attribute});
                 ob_start();
                 echo '<div class="checkbox"><label for="' . $inputId . '">
                     <input type="checkbox" name="' . $inputName . '" id="' . $inputId . '" value="delete"> ' . Yii::t('ycm', 'Delete image') . '
                 </label></div>';
                 Modal::begin(['size' => Modal::SIZE_LARGE, 'header' => '<h4>' . Yii::t('ycm', 'Preview image') . '</h4>', 'toggleButton' => ['label' => Yii::t('ycm', 'Preview image'), 'class' => 'btn btn-info btn-sm']]);
                 echo Html::img($url, ['class' => 'modal-image']);
                 Modal::end();
                 $html = ob_get_clean();
                 $options['hint'] = $html;
             }
             echo $this->createField($form, $model, $attribute, $options, 'fileInput');
             break;
         case 'file':
             $options = [];
             if (!$model->isNewRecord && !empty($model->{$attribute})) {
                 $className = StringHelper::basename($model->className());
                 $inputName = $className . '[' . $attribute . '_delete]';
                 $inputId = strtolower($className . '-' . $attribute . '_delete');
                 $url = $this->getAttributeUrl($this->getModelName($model), $attribute, $model->{$attribute});
                 $html = '<div class="checkbox"><label for="' . $inputId . '">
                     <input type="checkbox" name="' . $inputName . '" id="' . $inputId . '" value="delete"> ' . Yii::t('ycm', 'Delete file') . '
                 </label></div>';
                 $html .= Html::a(Yii::t('ycm', 'Download file'), $url, ['class' => 'btn btn-info btn-sm']);
                 $options['hint'] = $html;
             }
             echo $this->createField($form, $model, $attribute, $options, 'fileInput');
             break;
         case 'text':
             $options = ['maxlength' => $tableSchema->columns[$attribute]->size];
             echo $this->createField($form, $model, $attribute, $options, 'textInput');
             break;
         case 'hidden':
             $options = ['maxlength' => $tableSchema->columns[$attribute]->size];
             $options = $this->getAttributeOptions($attribute, $options);
             echo Html::activeHiddenInput($model, $attribute, $options);
             break;
         case 'password':
             $options = ['maxlength' => $tableSchema->columns[$attribute]->size];
             echo $this->createField($form, $model, $attribute, $options, 'passwordInput');
             break;
         case 'textarea':
             $options = ['rows' => 6];
             echo $this->createField($form, $model, $attribute, $options, 'textarea');
             break;
         case 'radio':
             echo $this->createField($form, $model, $attribute, [], 'radio');
             break;
         case 'boolean':
         case 'checkbox':
             echo $this->createField($form, $model, $attribute, [], 'checkbox');
             break;
         case 'dropdown':
             $options = ['prompt' => Yii::t('ycm', 'Choose {name}', ['name' => $model->getAttributeLabel($attribute)])];
             echo $this->createField($form, $model, $attribute, $options, 'dropDownList');
             break;
         case 'listbox':
             $options = ['prompt' => ''];
             echo $this->createField($form, $model, $attribute, $options, 'listBox');
             break;
         case 'checkboxList':
             echo $this->createField($form, $model, $attribute, [], 'checkboxList');
             break;
         case 'radioList':
             echo $this->createField($form, $model, $attribute, [], 'radioList');
             break;
         case 'disabled':
             $options = ['maxlength' => $tableSchema->columns[$attribute]->size, 'readonly' => true];
             echo $this->createField($form, $model, $attribute, $options, 'textInput');
             break;
         case 'hide':
             break;
         default:
             $options = $this->getAttributeOptions($attribute);
             echo $form->field($model, $attribute)->{$widget}($options);
             break;
     }
 }
예제 #8
0
echo $title;
?>
</div>
    </div>
    <div class="box-content">

    <?php 
$form = ActiveForm::begin(['options' => ['class' => 'default-form', 'autocomplete' => 'off', 'enctype' => 'multipart/form-data']]);
?>

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

    <?php 
echo $form->field($model, 'content')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'imageUpload' => \yii\helpers\Url::to(['/site/image-upload']), 'buttons' => ['formatting', 'bold', 'italic', 'underline', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'image', 'link'], 'plugins' => ['quote', 'skip', 'table', 'video', 'fullscreen']]]);
?>

    <?php 
// echo $form->field($model, 'source_title')->widget(Typeahead::classname(), [
//     'options' => ['placeholder' => 'Поиск источника при вводе ...'],
//     'pluginOptions' => [
//         'highlight' => true,
//         'imageUpload' => '/upload.php',
//     ],
//     'dataset' => [
//         [
//             'remote' => \yii\helpers\Url::to(['source/source-name-list']) . '?q=%QUERY',
//             'limit' => 10,
//         ]
//     ]
예제 #9
0
파일: _form.php 프로젝트: hogvarce/cms
<div class="news-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

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

    <?php 
echo $form->field($model, 'content_new')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['clips', 'fullscreen', 'imagemanager'], 'imageManagerJson' => Url::to(['/news/images-get']), 'imageUpload' => Url::to(['/news/image-upload'])]]);
?>

    <?php 
echo $form->field($model, 'preview_new')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['clips', 'fullscreen', 'imagemanager'], 'imageManagerJson' => Url::to(['/news/images-get']), 'imageUpload' => Url::to(['/news/image-upload'])]]);
?>

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

    <?php 
echo $form->field($model, 'file')->fileInput();
?>

    <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>
예제 #10
0
?>

    <?php 
echo $form->field($model, 'book_category_id')->dropDownList(Books::getCategorys());
?>

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

    <?php 
echo $form->field($model, 'authors')->listBox(Books::getAuthors(), ['class' => 'multi-select2', 'multiple' => true]);
?>

    <?php 
echo $form->field($model, 'annotation')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 120, 'plugins' => ['clips', 'fullscreen']]]);
?>

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

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

    <?php 
ActiveForm::end();
예제 #11
0
파일: _form.php 프로젝트: kotmonstr/gitar
            </div>
        </div>
        <div class="box-content">
            <div class="row">
                <div class="news-form">

                    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

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

                    <?php 
echo $form->field($model, 'content')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 400, 'pastePlainText' => true, 'buttonSource' => true, 'focus' => true, 'imageUpload' => '/news/upload', 'imageManagerJson' => '/news/uploaded', 'plugins' => ['clips', 'fullscreen', 'imagemanager']]]);
?>


                    <?php 
if ($model->image) {
    echo Html::img('/upload/upload_news/' . $model->image, ['style' => 'height: 120px;']);
    ?>
                        <a href="<?php 
    echo Url::to(['/upload/news/deleteimage', 'id' => $model->id]);
    ?>
" class="btn btn-warning"
                           onclick="confirmDelete(event)">Удалить</a>
                    <?php 
} else {
    echo Html::img('/upload/default.jpg', ['style' => 'height: 120px;']);
예제 #12
0
<?php

use im\cms\Module;
use vova07\imperavi\Widget as Imperavi;
/* @var $this yii\web\View */
/* @var $model im\cms\models\Page */
/* @var $form yii\widgets\ActiveForm */
?>

<?php 
echo !isset($attributes) || in_array('title', $attributes) ? $form->field($model, 'title')->textInput(['maxlength' => 100]) : '';
?>

<?php 
echo !isset($attributes) || in_array('slug', $attributes) ? $form->field($model, 'slug')->textInput(['maxlength' => 100]) : '';
?>

<?php 
echo !isset($attributes) || in_array('content', $attributes) ? $form->field($model, 'content')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300]]) : '';
?>

<?php 
echo !isset($attributes) || in_array('status', $attributes) ? $form->field($model, 'status')->dropDownList($model::getStatusesList(), ['prompt' => Module::t('page', 'Select status')]) : '';
예제 #13
0
    </div>
    
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'faculty_id');
?>

        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'image_id')->widget(FileAPI::className(), ['settings' => ['url' => ['/univer/default/fileapi-upload']]]);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'description')->widget(Imperavi::className(), ['settings' => ['minHeight' => 200, 'imageGetJson' => Url::to(['/univer/default/imperavi-get']), 'imageUpload' => Url::to(['/univer/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/univer/default/imperavi-file-upload'])]]);
?>
        </div>
    </div>
    
<?php 
$box->endBody();
$box->beginFooter();
echo Html::submitButton($model->isNewRecord ? Module::t('univer', 'BACKEND_CREATE_SUBMIT') : Module::t('univer', 'BACKEND_UPDATE_SUBMIT'), ['class' => $model->isNewRecord ? 'btn btn-primary btn-large' : 'btn btn-success btn-large']);
$box->endFooter();
ActiveForm::end();
예제 #14
0
?>

    <?php 
echo $form->field($model, 'position')->textInput(['maxlength' => true]);
?>
    
    <?php 
echo $form->field($model, 'notes')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['fullscreen', 'table', 'video', 'fontcolor']]]);
?>

    <?php 
echo $form->field($model, 'player_carrer')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['fullscreen', 'table', 'video', 'fontcolor']]]);
?>

    <?php 
echo $form->field($model, 'coach_carrer')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['fullscreen', 'table', 'video', 'fontcolor']]]);
?>

    <?php 
echo $form->field($model, 'country_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Country::find()->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'), 'language' => 'ru', 'options' => ['placeholder' => 'Выберите страну...'], 'pluginOptions' => ['allowClear' => true]]);
?>

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

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

/** @var \yii\web\View $this */
/** @var integer $language_id */
/** @var \DevGroup\Multilingual\models\Language $language */
/** @var \app\models\PageTranslation $model */
/** @var string $attributePrefix */
/** @var \yii\widgets\ActiveForm $form */
use yii\helpers\Url;
echo $form->field($model, $attributePrefix . 'title');
echo $form->field($model, $attributePrefix . 'is_published')->widget(kartik\widgets\SwitchInput::className());
echo $form->field($model, $attributePrefix . 'content')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['minHeight' => 200, 'plugins' => ['table', 'fontsize', 'fontfamily', 'fontcolor', 'video', 'imagemanager', 'clips', 'fullscreen', 'filemanager'], 'pastePlainText' => true, 'buttonSource' => true, 'replaceStyles' => [], 'replaceTags' => [], 'deniedTags' => [], 'removeEmpty' => [], 'imageUpload' => Url::to(['/admin/image-upload']), 'imageManagerJson' => Url::to(['/admin/images-get']), 'fileUpload' => Url::to(['/admin/file-upload']), 'fileManagerJson' => Url::to(['/admin/files-get'])]]);
?>

<!-- ok -->
예제 #16
0
파일: _form.php 프로젝트: sergey-exu/diru
    ?>
" />
                <?php 
}
?>
                <?php 
echo $form->field($model, 'product_type')->dropDownlist(Product::getTypeArray());
?>
                <?php 
echo $form->field($model, 'product_name')->textInput(['maxlength' => true]);
?>
                <?php 
echo $form->field($model, 'product_summary')->textarea(['rows' => 6]);
?>
                <?php 
echo $form->field($model, 'product_description')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'replaceDivs' => false, 'minHeight' => 400, 'imageUpload' => Url::to(['/product/default/image-upload']), 'fileUpload' => Url::to(['/product/default/file-upload'])]]);
?>
            </div>
            <div class="col-md-4">
                <?php 
echo $form->field($model, 'meta_title')->textInput();
?>
                <?php 
echo $form->field($model, 'meta_description')->textarea(['rows' => 4]);
?>
                <?php 
echo $form->field($model, 'alias')->textInput(['maxlength' => true]);
?>
            </div>
        </div>
    
예제 #17
0
파일: _form.php 프로젝트: s-savchenko/aist
JS;
$this->registerJs($js);
?>

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

        <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'slug')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'announcement')->textarea(['rows' => 6]);
echo $form->field($model, 'content')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'imageUpload' => Url::to(['page/image-upload']), 'plugins' => ['fullscreen', 'fontcolor', 'table', 'clips']]]);
?>

        <?php 
echo $form->field($model, 'is_available')->checkbox();
?>

        <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();
예제 #18
0
 * @var yii\web\View $this
 * @var bariew\templateAbstractModule\models\Config $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="config-form">

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

        <?php 
$tabs = [['label' => Yii::t('app', 'Main'), 'content' => $this->render('_formMain', compact('form', 'model'))]];
foreach ($model->languageList() as $language) {
    $tabs[] = ['label' => $language, 'active' => empty($active) && ($active = $model->hasErrors('content') || ($active = $model->hasErrors('subject'))), 'content' => $form->field($model, "subject[{$language}]", ['options' => ['class' => 'subjectInput']])->textInput() . $form->field($model, "content[{$language}]", ['options' => ['class' => 'messageInput']])->widget(\vova07\imperavi\Widget::className(), ['options' => ['style' => ['min-height' => '200px']], 'settings' => ['deniedTags' => [], 'convertDivs' => false, 'paragraphy' => false, 'formattingTags' => [], 'convertLinks' => false, 'cleanup' => false, 'removeEmptyTags' => false, 'cleanSpaces' => false, 'cleanFontTag' => false, 'tidyHtml' => false, 'paragraphize' => false, 'replaceDivs' => false, 'replaceTags' => false, 'replaceStyles' => false, 'removeEmpty' => false, 'minHeight' => 200]])];
}
?>
        <?php 
echo \yii\bootstrap\Tabs::widget(['items' => $tabs]);
?>

        <label><?php 
echo Yii::t('modules/template', 'Variables');
?>
</label>
        <div class="configVariables">
            <?php 
echo DetailView::widget(['model' => false, 'attributes' => $model->variables()]);
?>
        </div>
예제 #19
0
<div class="box box-primary">
    <div class="box-body">
    
        <?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, 'summary')->textarea(['rows' => 6]);
?>
                    <?php 
echo $form->field($model, 'text')->widget(Imperavi::className(), ['settings' => ['lang' => 'ru', 'replaceDivs' => false, 'minHeight' => 400, 'imageUpload' => Url::to(['/news/default/image-upload']), 'fileUpload' => Url::to(['/news/default/file-upload']), 'plugins' => ['table']]]);
?>
                    
                </div>
                <div class="col-md-4">
                    <?php 
echo $form->field($model, 'meta_title')->textInput();
?>
                    <?php 
echo $form->field($model, 'meta_description')->textarea(['rows' => 4]);
?>
                    <?php 
echo $form->field($model, 'alias')->textInput(['maxlength' => true]);
?>
                    <div class="form-group">
                        <?php 
예제 #20
0
?>

    <?php 
echo $form->field($model, 'project_id')->dropdownList(\common\models\Project::find()->select(['domain', 'id'])->indexBy('id')->column(), ['prompt' => 'Domain:'])->label('Domain');
?>

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

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

    <?php 
echo $form->field($model, 'content')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['replaceDivs' => false, 'lang' => 'ru', 'minHeight' => 200, 'plugins' => ['clips', 'fullscreen'], 'pastePlainText' => false, 'paragraphize' => false]]);
?>
    <?php 
echo $form->field($model, 'as_theme')->dropdownList([1 => 'yes', 0 => 'no']);
?>

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

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

    <?php 
echo $form->field($model, 'META_KEYS')->textInput(['maxlength' => true]);
예제 #21
0
?>

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

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

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

    <?php 
echo $form->field($model, 'body')->widget(Widget::className(), ['settings' => ['minHeight' => 200, 'plugins' => ['filemanager', 'fullscreen', 'fontcolor', 'imagemanager', 'table', 'video'], 'imageManagerJson' => Url::to(['/site/images-get']), 'fileManagerJson' => Url::to(['/site/files-get']), 'imageUpload' => Url::to(['/site/image-upload']), 'fileUpload' => Url::to(['/site/file-upload'])]]);
?>

    <?php 
echo $form->field($model, 'status')->checkbox(['label' => Yii::t('backend', 'Activate')]);
?>

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

    <?php 
ActiveForm::end();
?>
예제 #22
0
파일: _form.php 프로젝트: RStuffGit/mebel
/* @var $model common\models\TextPages */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="text-pages-form">

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

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

<?php 
echo $form->field($model, 'text')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'replaceDivs' => false, 'imageUpload' => Url::to(['/text-pages/image-upload']), 'plugins' => ['clips', 'fullscreen', 'table', 'filemanager', 'fontcolor', 'fontfamily', 'fontsize', 'limiter', 'video', 'textdirection', 'textexpander', 'imagemanager']]]);
?>
    <?php 
echo $form->field($model, 'url')->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();
?>
예제 #23
0
use common\widgets\elfinder\InputFile;
use yii\bootstrap\Modal;
use mihaildev\elfinder\ElFinder;
use yii\web\JsExpression;
/**
 * @var yii\web\View $this
 * @var common\models\Post $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="post-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]], 'intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100, 'plugins' => ['elfinder', 'fontcolor']]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'user_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\User::find()->all(), 'id', 'username'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'category_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\PostCategory::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'state_index' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => (new common\models\Post())->getStateIndexList(), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'main_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Главная...']], 'noforeign_id' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Noforeign ID...', 'maxlength' => 11]], 'created_datetime' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATETIME]], 'start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_TIME]], 'preview_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']], 'doc_file' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']]]]);
/*
        ?>
        <script>
              if (!RedactorPlugins) var RedactorPlugins = {};
              RedactorPlugins.elfinder = function()
              {
                  return {
                      init: function()
                      {
                          var elfinder = this.button.add('elfinder', 'Elfinder');
                          this.button.setAwesome('elfinder', 'fa-elfinder');
                          this.button.addCallback(elfinder, this.elfinder.openElfinder);
                      },
                      openElfinder: function()
                      {
예제 #24
0
//                 'url' => $url,
//                 'dataType' => 'json',
//                 'data' => new JsExpression('function(term,page) { return {search:term}; }'),
//                 'results' => new JsExpression('function(data,page) { return {results:data.results}; }'),
//             ],
//             'initSelection' => new JsExpression($initScript),
//         ],
//     ]);
?>

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

    <?php 
echo $form->field($model, 'content')->widget(\vova07\imperavi\Widget::className(), ['plugins' => ['quote' => 'backend\\assets\\EditorAssetBundle', 'skip' => 'backend\\assets\\EditorAssetBundle'], 'settings' => ['lang' => 'ru', 'minHeight' => 200, 'imageUpload' => \yii\helpers\Url::to(['/site/image-upload']), 'buttons' => ['html', 'formatting', 'bold', 'italic', 'underline', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'image', 'link', 'alignment', 'quote', 'skip'], 'plugins' => ['fullscreen', 'table', 'video', 'fontcolor'], 'deniedTags' => ['style'], 'replaceDivs' => false]]);
?>

    
    <div class="row">
        <div class="col-sm-6">
            <?php 
$source = [];
if (!$model->isNewRecord) {
    if (isset($model->source_title) && trim($model->source_title) != '') {
        $source = [0 => $model->source_title];
    }
}
echo $form->field($model, 'source_id')->widget(SelectizeDropDownList::classname(), ['loadUrl' => Url::to(['source/source-list']), 'items' => $source, 'options' => ['multiple' => false], 'clientOptions' => ['valueField' => 'value', 'labelField' => 'text', 'persist' => false]]);
?>
        </div>
예제 #25
0
파일: _form.php 프로젝트: noikiy/wowewe
<div class="mhelpdoc-form">

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

    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => 128])->hint("为了在手机上显示美观,建议不超过20个字");
?>

    <!--
    <//?= $form->field($model, 'content')->textarea(['rows' => 6]) ?>
    -->

    <?php 
echo $form->field($model, 'content')->widget(Widget::className(), ['settings' => ['lang' => 'zh_cn', 'minHeight' => 200, 'maxHeight' => 400, 'buttonSource' => true, 'convertDivs' => false, 'removeEmptyTags' => false, 'plugins' => ['clips', 'fullscreen', 'fontcolor', 'fontfamily', 'fontsize', 'limiter', 'table', 'textexpander', 'textdirection', 'video', 'definedlinks', 'filemanager', 'imagemanager'], 'imageManagerJson' => Url::to(['/helpdoc/imagesget']), 'imageUpload' => Url::to(['/helpdoc/imageupload'])]])->hint("为了在手机上显示美观,建议使用字体18px");
?>


    <!--
    <//?= $form->field($model, 'sort')->textInput() ?>
    -->

    <!--
    <//?= $form->field($model, 'visual')->textInput() ?>
    -->

    <?php 
echo $form->field($model, 'visual')->dropDownList(MHelpdoc::getVisualOption());
?>
예제 #26
0
파일: _form.php 프로젝트: hdushku/blog
			<?php 
echo $form->field($model, 'title')->textInput(['maxlength' => 65, 'placeholder' => Yii::t('app', 'Title contain a seo keyword if possible')]);
?>
				</div>				
			</div>
			<?php 
echo $form->field($model, 'description')->textArea(['maxlength' => 155, 'placeholder' => Yii::t('app', 'This description also used as meta description')]);
?>

			<?php 
$isettings = ['lang' => substr(Yii::$app->language, 0, 2), 'minHeight' => 400, 'toolbarFixedTopOffset' => 50, 'buttonSource' => true, 'plugins' => ['imagemanager', 'filemanager', 'video', 'table', 'clips', 'fullscreen'], 'buttons' => ['html', 'formatting', 'bold', 'italic', 'underline', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'image', 'file', 'link', 'alignment', 'horizontalrule'], 'replaceDivs' => false, 'deniedTags' => ['script']];
if ($module->enableUpload) {
    $isettings = array_merge($isettings, ['imageUpload' => Url::to(['//blog/default/image-upload']), 'fileUpload' => Url::to(['//blog/default/file-upload']), 'imageManagerJson' => Url::to(['//blog/default/images-get']), 'fileManagerJson' => Url::to(['//blog/default/files-get'])]);
}
use vova07\imperavi\Widget;
echo $form->field($model, 'content')->widget(Widget::className(), ['settings' => $isettings, 'options' => ["style" => "width:100%"]]);
?>
			
			<?php 
if ($module->enableScriptsPage) {
    ?>
				
			<?php 
    echo $form->field($model, 'scripts')->textArea(['rows' => 6, 'placeholder' => Yii::t('app', 'JavaScripts')]);
    ?>
			<?php 
}
?>
		</div>
		<div class="col-md-3">
			<div class="well">
예제 #27
0
                            	<?php 
    echo $form->field($model, 'introtext')->textarea(['rows' => 12]);
    ?>
                            <?php 
}
?>
                        
                        </div> <!-- end col-lg-6 -->
                        
                        <div class="col-lg-6">
                        
                            <?php 
if ($editor == "imperavi") {
    ?>
                            	<?php 
    echo $form->field($model, 'fulltext')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['minHeight' => 250, 'paragraphize' => false, 'cleanOnPaste' => false, 'replaceDivs' => false, 'linebreaks' => false, 'plugins' => ['fullscreen', 'imagemanager'], 'imageUpload' => Url::to(['/articles/items/image-upload']), 'imageManagerJson' => Url::to(['/articles/items/images-get'])]]);
    ?>
                            <?php 
} else {
    ?>
                            	<?php 
    echo $form->field($model, 'fulltext')->textarea(['rows' => 12]);
    ?>
                            <?php 
}
?>
                        
                        </div> <!-- end col-lg-6 -->
                    
                    </div> <!-- end #item -->
                    
예제 #28
0
파일: _form.php 프로젝트: dyar74/yii2-admin
$settings = ['lang' => $lang, 'minHeight' => 200, 'plugins' => ['fullscreen']];
if ($module->addImage || $module->uploadImage) {
    $settings['plugins'][] = 'imagemanager';
}
if ($module->addImage) {
    $settings['imageManagerJson'] = Url::to(['images-get']);
}
if ($module->uploadImage) {
    $settings['imageUpload'] = Url::to(['image-upload']);
}
if ($module->addFile || $module->uploadFile) {
    $settings['plugins'][] = 'filemanager';
}
if ($module->addFile) {
    $settings['fileManagerJson'] = Url::to(['files-get']);
}
if ($module->uploadFile) {
    $settings['fileUpload'] = Url::to(['file-upload']);
}
echo $form->field($model, 'content')->widget(Imperavi::className(), ['settings' => $settings]);
echo $form->field($model, 'title_browser')->textInput(['maxlength' => 255]);
echo $form->field($model, 'meta_keywords')->textInput(['maxlength' => 200]);
echo $form->field($model, 'meta_description')->textInput(['maxlength' => 160]);
?>
<div class="form-group">
    <?php 
echo Html::submitButton($model->isNewRecord ? Module::t('CREATE') : Module::t('UPDATE'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php 
ActiveForm::end();
예제 #29
0
?>
	
	<?php 
echo $form->field($model, 'google')->textInput(['maxlength' => 255]);
?>
   
    <?php 
echo $form->field($model, 'site_motto')->textInput(['maxlength' => 1000]);
?>
	
	<?php 
echo $form->field($model, 'partnership')->widget(Wisiwig::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['clips', 'fullscreen']]]);
?>

    <?php 
echo $form->field($model, 'about')->widget(Wisiwig::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['clips', 'fullscreen']]]);
?>

    <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>
<div id="YMapsID" style="width:0px;height:0px"></div>
<script type="text/javascript">
예제 #30
0
?>

    <?php 
echo $form->field($model, 'amplua_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Amplua::find()->all(), 'id', 'name'), 'language' => 'ru', 'options' => ['placeholder' => 'Выберите амплуа...'], 'pluginOptions' => ['allowClear' => true]]);
?>

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

    <?php 
echo $form->field($model, 'country_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Country::find()->orderBy(['name' => SORT_ASC])->all(), 'id', 'name'), 'language' => 'ru', 'options' => ['placeholder' => 'Выберите страну...'], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'notes')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'buttons' => ['html', 'formatting', 'bold', 'italic', 'underline', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'image', 'link', 'alignment', 'horizontalrule'], 'plugins' => ['fullscreen', 'table', 'video', 'fontcolor']]]);
?>

    <?php 
if (!$model->isNewRecord) {
    echo $this->render('/achievement/index', ['searchModel' => $achievementModel, 'dataProvider' => $achievementDataProvider]);
    echo Html::a('Добавить достижение', ['/achievement/create', 'playerId' => $model->id], ['class' => 'btn btn-success', 'style' => 'margin-bottom: 20px']);
}
if (isset($model->id)) {
    echo $this->render('career_view', ['playerID' => $model->id, 'dataProvider' => $careerDataProvider]);
}
?>

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