?> </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]); ?> </div> </div> <div id = "lb-document-module-fields"> <?php echo $this->render('_fields', ['model' => $model]); ?>
$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)]; $fields = []; $fields[] = $form->field($model, 'pictures')->widget(InputFile::className(), ['multiple' => true, 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default']]); $categories = \kiwi\Kiwi::getCategory()->find()->all(); $categories = ArrayHelper::map($categories, 'id', 'name'); $fields[] = $form->field($model, 'categoryIds')->widget(Select2::classname(), ['data' => $categories, 'language' => 'en', 'options' => ['placeholder' => 'Select a state ...'], 'options' => ['multiple' => true]]); $tags = \kiwi\Kiwi::getTag()->find()->all(); $tags = ArrayHelper::map($tags, 'id', 'name'); $fields[] = $form->field($model, 'tagIds')->widget(Select2::classname(), ['data' => $tags, 'language' => 'en', 'options' => ['placeholder' => 'Select a state ...'], 'options' => ['multiple' => true]]); $fieldGroups[] = ['label' => 'Picture & Category & Tag', 'content' => implode('', $fields)]; echo Tabs::widget(['items' => $fieldGroups]); ?> <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 echo $form->field($model, 'parent_id')->dropDownList($treeParents, ['prompt' => '---ROOT---']); ?> <?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
<?php use mihaildev\elfinder\InputFile; /** * @var $form \yii\widgets\ActiveForm * @var $block \nullref\cms\blocks\text\Block */ echo $form->field($block, 'image')->widget(InputFile::className(), ['language' => 'ru', 'controller' => 'elfinder-backend', 'filter' => 'image', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false]); echo $form->field($block, 'alt')->textInput(); echo $form->field($block, 'width')->textInput(); echo $form->field($block, 'height')->textInput();
public function run() { return $this->form->field($this->model, $this->attribute)->widget(InputFile::className(), $this->fileManager); }
if (!$model->isNewRecord) { echo Html::a('<span class="glyphicon glyphicon-trash"></span> Удалить', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger']); } ?> </div> </div> <div class="row"> <div class="col-sm-6"> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> </div> <div class="col-sm-6"> <?php echo $form->field($model, 'path')->widget(InputFile::className(), ['language' => 'ru', 'controller' => 'front-elfinder', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'buttonName' => 'Выбрать файл', 'multiple' => false]); ?> </div> </div> </div> </div> <div class="box box-panel"> <div class="box-header with-border"> <h3 class="box-title"> <i class="glyphicon glyphicon-th-list"></i> Расширенные «быстрые» поля для документов: <?php for ($i = 1; $i <= Template::OPTIONS_COUNT; $i++) { $type_option = 'option_' . $i . '_type'; if ($model->{$type_option}) {
?> <?php echo $form->field($model, 'subtitle')->textInput(); ?> <?php echo $form->field($model, 'parent_id')->dropDownList($app->catlist, ['prompt' => Yii::t('backend', 'Корневая категория')]); ?> <?php echo $form->field($model, 'image')->widget(\mihaildev\elfinder\InputFile::className(), ['language' => 'ru', 'controller' => 'elfinder', 'template' => '<div class="uk-form-row">{input}{button}</div>', 'options' => ['class' => 'uk-from-controls'], 'buttonOptions' => ['class' => 'uk-button uk-button-primary'], 'multiple' => false]); ?> <?php echo $form->field($model, 'preview')->widget(\mihaildev\elfinder\InputFile::className(), ['language' => 'ru', 'controller' => 'elfinder', 'template' => '<div class="uk-form-row">{input}{button}</div>', 'options' => ['class' => 'uk-from-controls'], 'buttonOptions' => ['class' => 'uk-button uk-button-primary'], 'multiple' => false]); ?> <?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, 'status')->dropDownList(Message::getStatuses()); ?> </div> </div> <div class="row"> <div class="col-sm-12"> <?php echo $form->field($model, 'content')->textarea(); ?> </div> </div> <div class="row"> <div class="col-sm-6"> <?php echo $form->field($model, 'attachment')->widget(InputFile::className(), ['language' => 'ru', 'controller' => 'elfinder', 'template' => '<div class="input-group"> {input}<span class="input-group-btn">{button}</span> </div>', 'options' => ['class' => 'form-control'], 'buttonName' => 'Выбрать файл', 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false]); ?> </div> <div class="col-sm-6"> <?php echo $form->field($model, 'parent_message_id')->textInput(['maxlength' => true]); ?> </div> </div> <div class="row"> <div class="col-sm-6"> <?php echo $form->field($model, 'for_user_id')->widget(Select2::classname(), ['language' => 'ru', 'data' => User::getAll(), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]); ?>
<?php echo $form->field($linkParamsModel, 'rel')->textInput(); ?> </div> <div id="meta-options" class="tab-pane"> <?php echo $form->field($model, 'metakey')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'metadesc')->textarea(['maxlength' => 2048]); ?> <?php echo $form->field($model, 'metaimg')->widget(\mihaildev\elfinder\InputFile::className(), ['language' => Yii::$app->language, 'controller' => 'media/manager', 'filter' => 'image', 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false]); ?> <?php echo $form->field($model, 'robots')->dropDownList(['index, follow' => 'Index, Follow', 'noindex, follow' => 'No index, follow', 'index, nofollow' => 'Index, No follow', 'noindex, nofollow' => 'No index, no follow'], ['prompt' => 'Не выбрано']); ?> </div> </div> <?php echo Html::activeHiddenInput($model, 'lock'); ?> <div> <?php echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('gromver.platform', 'Create') : '<i class="glyphicon glyphicon-pencil"></i> ' . Yii::t('gromver.platform', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?> </h1> <div class="row"> <div class="co-xs-12 col-md-7 col-lg-5"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'modelClass')->widget(DependDropDown::className(), ["dependAttr" => "key", "source" => ["/import/admin/csv-import/keys"], "data" => $classes, "serverAttr" => "cls", "triggerChange" => true, "options" => ["class" => "form-control"]]); ?> <?php echo $form->field($model, 'filePath')->widget(\mihaildev\elfinder\InputFile::className(), ["template" => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', "options" => ["class" => "form-control"], "buttonOptions" => ["class" => "btn btn-default"]]); ?> <?php echo $form->field($model, 'headLine')->checkbox(); ?> <?php echo $form->field($model, 'key')->widget(DependDropDown::className(), ["options" => ["class" => "form-control"]]); ?> <?php echo $form->field($model, 'delimiter'); ?> <?php
$fields[] = $form->field($model, 'status')->checkbox(); $fieldGroups[] = ['label' => 'User Info', 'content' => implode('', $fields)]; $fields = []; $customerInfo = $model->customerInfo ?: \kiwi\Kiwi::getCustomerInfo(); $fields[] = $form->field($customerInfo, 'nick_name')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'real_name')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'avatars')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'phone')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'qq')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'address')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'sex')->textInput(); $fields[] = $form->field($customerInfo, 'age')->textInput(); // $fields[] = $form->field($customerInfo, 'payment_password')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'id_card_no')->textInput(['maxlength' => 255]); $fields[] = $form->field($customerInfo, 'id_card_front_pic')->widget(InputFile::className(), ['template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default']]); $fields[] = $form->field($customerInfo, 'id_card_back_pic')->widget(InputFile::className(), ['template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default']]); $fieldGroups[] = ['label' => 'Customer Info', 'content' => implode('', $fields)]; $fields = []; $groups = \kiwi\Kiwi::getGroup()->find()->all(); $groups = ArrayHelper::map($groups, 'id', 'name'); $fields[] = $form->field($model, 'groups')->widget(Select2::classname(), ['data' => $groups, 'language' => 'en', 'options' => ['placeholder' => 'Select a state ...'], 'options' => []]); $fieldGroups[] = ['label' => 'Customer Group', 'content' => implode('', $fields)]; echo Tabs::widget(['items' => $fieldGroups]); ?> <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>
$key++; ?> <?php if (!count($model->slides) || $_reload !== null && $_type === null) { ?> <div class="uk-panel uk-margin-top"> <div class="uk-float-right"> <?php echo $this->render('@worstinme/widgets/views/default/_row-buttons', ['key' => $key, 'last' => true]); ?> </div> <?php echo \mihaildev\ckeditor\CKEditor::widget(['model' => $model, 'attribute' => "slides[{$key}]", 'editorOptions' => \mihaildev\elfinder\ElFinder::ckeditorOptions(['elfinder', 'path' => '/'], ['preset' => 'standart', 'allowedContent' => true, 'height' => '400px', 'toolbar' => [['Bold', 'Italic', 'Underline', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', 'Styles', 'Font', 'FontSize', 'Format', 'TextColor', 'BGColor', '-', 'Blockquote', 'CreateDiv', '-', 'Image', 'Table', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'Outdent', 'Indent', '-', 'RemoveFormat', 'Source', 'Maximize']]])]); ?> <?php echo $form->field($model, "images[{$key}]")->widget(InputFile::className(), ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'uk-form-width-large'], 'buttonOptions' => ['class' => 'uk-button uk-button-primary']]); ?> </div> <?php } ?> </div> <?php } elseif ($model->type == 2) { ?> <div class="uk-form-row"> <?php echo Html::activeLabel($model, 'image', ['class' => 'uk-form-label']); ?>