<?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save']); ?> </div> <?php $this->endBlock(); ?> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php $form = ActiveForm::begin(); ?> <?php BackendWidget::begin(['icon' => 'user', 'title' => Yii::t('app', 'User'), 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'username')->textInput(['maxlength' => 255, 'autocomplete' => 'off']); ?> <?php echo $form->field($model, 'password')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'status')->dropDownList($model->getStatuses()); ?> <?php echo $form->field($model, 'email')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'first_name')->textInput(['maxlength' => 255]);
<?php /* @var $this yii\web\View */ /* @var $model app\modules\shop\models\CategoryGroup */ use app\backend\widgets\BackendWidget; use kartik\helpers\Html; use kartik\icons\Icon; use kartik\widgets\ActiveForm; $this->title = $model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'); $this->params['breadcrumbs'] = [['label' => Yii::t('app', 'Categories groups'), 'url' => ['index']], $this->params['breadcrumbs'][] = $this->title]; ?> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php $form = ActiveForm::begin(); ?> <?php BackendWidget::begin(['icon' => 'tag', 'title' => Yii::t('app', 'Categories groups'), 'footer' => Html::a(Icon::show('arrow-circle-left') . Yii::t('app', 'Back'), Yii::$app->request->get('returnUrl', ['index', 'id' => $model->id]), ['class' => 'btn btn-danger']) . ' ' . ($model->isNewRecord ? Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go next'), ['class' => 'btn btn-success', 'name' => 'action', 'value' => 'next']) : '') . ' ' . Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go back'), ['class' => 'btn btn-warning', 'name' => 'action', 'value' => 'back']) . ' ' . Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save'])]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 255]); ?> <?php BackendWidget::end(); ?> <?php ActiveForm::end(); ?> </div>
echo $form->field($model, 'content')->widget(Yii::$app->getModule('core')->wysiwyg_class_name(), Yii::$app->getModule('core')->wysiwyg_params()); ?> <?php BackendWidget::end(); ?> </article> </div> </section> <input type="hidden" name="DynamicContent[apply_if_params]" id="apply_if_params"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Match settings'), 'icon' => 'cogs', 'footer' => $this->blocks['submit']]); ?> <div id="properties"> <?php $url = Url::to(['/shop/backend-category/autocomplete']); $category = $model->apply_if_last_category_id > 0 ? \app\modules\shop\models\Category::findById($model->apply_if_last_category_id) : null; ?> <?php echo $form->field($model, 'apply_if_last_category_id')->widget(Select2::classname(), ['options' => ['placeholder' => 'Search for a category ...'], 'pluginOptions' => ['allowClear' => true, 'ajax' => ['url' => $url, 'dataType' => 'json', 'data' => new JsExpression('function(term,page) { return {search:term}; }'), 'results' => new JsExpression('function(data,page) { return {results:data.results}; }')]], 'initValueText' => !is_null($category) ? $category->name : '']); ?> <div class="row"> <div class="col-md-10 col-md-offset-2"> <a href="#" class="btn btn-md btn-primary add-property"> <?php echo Icon::show('plus'); ?>
<?php use app\backend\widgets\BackendWidget; use app\components\Helper; use yii\helpers\Html; /** * @var \yii\web\View $this * @var \app\modules\shop\models\Contragent $model */ $this->title = Yii::t('app', 'Contragent edit'); $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Contragents'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; $form = \yii\bootstrap\ActiveForm::begin(['id' => 'contragent-form', 'action' => \yii\helpers\Url::toRoute(['create', 'customer' => $model->customer_id]), 'layout' => 'horizontal']); BackendWidget::begin(['icon' => 'user', 'title' => Yii::t('app', 'Contragent edit'), 'footer' => \yii\helpers\Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success'])]); $_jsTemplateResultFunc = <<<'JSCODE' function (data) { if (data.loading) return data.text; var tpl = '<div class="s2contragent-result">' + '<strong>' + (data.first_name || '') + ' ' + (data.middle_name || '') + ' ' + (data.last_name || '') + ' ' + '</strong>' + '<div>' + (data.email || '') + ' (' + (data.phone || '') + ')</div>' + '</div>'; return tpl; } JSCODE; echo \app\backend\widgets\Select2Ajax::widget(['initialData' => [$model->customer_id => null !== $model->customer ? $model->customer->first_name : 'Guest'], 'model' => $model, 'modelAttribute' => 'customer_id', 'form' => $form, 'multiple' => false, 'searchUrl' => \yii\helpers\Url::toRoute(['ajax-customer']), 'pluginOptions' => ['allowClear' => false, 'escapeMarkup' => new \yii\web\JsExpression('function (markup) {return markup;}'), 'templateResult' => new \yii\web\JsExpression($_jsTemplateResultFunc), 'templateSelection' => new \yii\web\JsExpression('function (data) {return data.first_name || data.text;}')]]); echo \app\modules\shop\widgets\Contragent::widget(['viewFile' => 'contragent/inherit_form', 'model' => $model, 'form' => $form, 'additional' => ['hideHeader' => true]]); BackendWidget::end(); $form->end();
<?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-success']); ?> </div> <?php $this->endBlock('submit'); ?> <div class="row"> <div class="col-md-4" id="jstree-more"> <?php $form = ActiveForm::begin(['id' => 'newsletter_config', 'type' => ActiveForm::TYPE_VERTICAL, 'method' => 'get']); ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Newsletter config'), 'icon' => 'cogs', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'isActive')->textInput()->widget(\kartik\widgets\SwitchInput::className()); ?> <?php BackendWidget::end(); ?> <?php ActiveForm::end(); ?> </div> </div>
</article> <?php ActiveForm::end(); ?> <?php if (!$model->isNewRecord) { ?> <?php $form = ActiveForm::begin(['id' => 'wareHouseOpeningHours', 'type' => ActiveForm::TYPE_HORIZONTAL]); ?> <article class="col-xs-6 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Warehouse Opening Hours'), 'icon' => 'cubes', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($wareHouseOpeningHours, 'opens'); ?> <?php echo $form->field($wareHouseOpeningHours, 'closes'); ?> <?php echo $form->field($wareHouseOpeningHours, 'break_from'); ?> <?php echo $form->field($wareHouseOpeningHours, 'break_to'); ?>
<?php echo $form->field($model, 'depended_property_values'); ?> <?php echo $form->field($model, 'depends_on_category_group_id'); ?> <?php echo $form->field($model, 'dont_filter')->checkbox(); ?> <?php BackendWidget::end(); ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Images'), 'icon' => 'image', 'footer' => $this->blocks['submit']]); ?> <div id="actions"> <?php echo \yii\helpers\Html::tag('span', Icon::show('plus') . Yii::t('app', 'Add files..'), ['class' => 'btn btn-success fileinput-button']); ?> <?php if (Yii::$app->getModule('elfinder')) { echo \DotPlant\ElFinder\widgets\ElfinderFileInput::widget(['url' => Url::toRoute(['addImage', 'objId' => $object->id, 'objModelId' => $model->id])]); } ?> </div> <?php echo \app\modules\image\widgets\ImageDropzone::widget(['name' => 'file', 'url' => ['/shop/backend-product/upload'], 'removeUrl' => ['/shop/backend-product/remove'], 'uploadDir' => '/theme/resources/product-images', 'sortable' => true, 'sortableOptions' => ['items' => '.dz-image-preview'], 'objectId' => $object->id, 'modelId' => $model->id, 'htmlOptions' => ['class' => 'table table-striped files', 'id' => 'previews'], 'options' => ['clickable' => ".fileinput-button"]]);
<?php use app\backend\widgets\BackendWidget; use yii\helpers\Html; /** * @var \yii\web\View $this * @var \app\modules\shop\models\Order $model */ $this->title = Yii::t('app', 'New order'); $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Orders'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; $form = \kartik\widgets\ActiveForm::begin(['method' => 'post', 'type' => \kartik\form\ActiveForm::TYPE_HORIZONTAL, 'options' => ['class' => 'form-order-backend-create']]); BackendWidget::begin(['icon' => 'info-circle', 'title' => Yii::t('app', 'Order information'), 'footer' => Html::submitButton(Yii::t('app', 'Create'), ['class' => 'btn btn-success'])]); ?> <div class="row"> <div class="col-md-4"> <?php $_jsTemplateResultFunc = <<<'JSCODE' function (data) { if (data.loading) return data.text; var tpl = '<div class="s2customer-result">' + '<strong>' + (data.username || '') + '</strong>' + '<div>' + (data.first_name || '') + ' ' + (data.last_name || '') + ' (' + (data.email || '') + ')</div>' + '</div>'; return tpl; } JSCODE; echo \app\backend\widgets\Select2Ajax::widget(['form' => $form, 'model' => $model, 'modelAttribute' => 'user_id', 'initialData' => [$model->user_id => null !== $model->user ? $model->user->username : '******'], 'multiple' => false, 'searchUrl' => \yii\helpers\Url::toRoute(['ajax-user']), 'pluginOptions' => ['allowClear' => false, 'escapeMarkup' => new \yii\web\JsExpression('function (markup) {return markup;}'), 'templateResult' => new \yii\web\JsExpression($_jsTemplateResultFunc), 'templateSelection' => new \yii\web\JsExpression('function (data) {return data.username || data.text;}')]]); echo Html::tag('div', Html::a(Yii::t('app', 'Clear'), '#clear', ['data-sel' => 'order-user_id', 'class' => 'col-md-offset-2'])); ?>
</div> <?php echo \app\modules\image\widgets\ImageDropzone::widget(['name' => 'file', 'url' => ['upload'], 'removeUrl' => ['remove'], 'uploadDir' => '/theme/resources/product-images', 'sortable' => true, 'sortableOptions' => ['items' => '.dz-image-preview'], 'objectId' => $object->id, 'modelId' => $model->id, 'htmlOptions' => ['class' => 'table table-striped files', 'id' => 'previews'], 'options' => ['clickable' => ".fileinput-button"]]); ?> <?php BackendWidget::end(); ?> </article> <article class="<?php echo Helper::getBackendGridClass('page', PageModule::BACKEND_PAGE_GRID, 2); ?> "> <?php BackendWidget::begin(['title' => Yii::t('app', 'SEO'), 'icon' => 'search', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'slug', ['makeSlug' => ["#page-title", "#page-h1", "#page-breadcrumbs_label"]]); ?> <?php echo $form->field($model, 'slug_absolute')->checkbox(); ?> <?php echo $form->field($model, 'subdomain'); ?> <?php echo $form->field($model, 'h1', ['copyFrom' => ["#page-title", "#page-breadcrumbs_label"]]); ?>
} echo Tabs::widget(['items' => [['label' => Yii::t('app', 'necessary'), 'content' => $necessaryContent], ['label' => Yii::t('app', 'unnecessary'), 'content' => $unnecessaryContent]]]); BackendWidget::end(); } ?> </div> <div class="col-md-6 col-sm-12"> <h2><?php echo Yii::t('app', 'Add new component'); ?> </h2> <?php foreach ($model['defaultComponents'] as $componentName => $componentConf) { BackendWidget::begin(['id' => $componentName, 'title' => Yii::t('app', $componentName), 'options' => ['class' => 'visible-header']]); $necessaryContent = $form->field($model, "defaultComponents[{$componentName}][name]")->label('name'); foreach ($componentConf['necessary'] as $necessaryConfName => $necessaryConfVal) { $content = $form->field($model, "defaultComponents[{$componentName}][necessary][{$necessaryConfName}]")->label($necessaryConfName); if (is_bool($necessaryConfVal) === true || $necessaryConfName === 'active') { $content = $content->widget(\kartik\widgets\SwitchInput::className()); } $necessaryContent .= $content; } $unnecessaryContent = ''; foreach ($componentConf['unnecessary'] as $unnecessaryConfName => $unnecessaryConfVal) { $unnecessaryContent .= $form->field($model, "defaultComponents[{$componentName}][unnecessary][{$unnecessaryConfName}]")->label($unnecessaryConfName); } echo Tabs::widget(['items' => [['label' => Yii::t('app', 'necessary'), 'content' => $necessaryContent], ['label' => Yii::t('app', 'unnecessary'), 'content' => $unnecessaryContent]]]); BackendWidget::end(); }
* @var array $events */ use app\backend\widgets\BackendWidget; use yii\bootstrap\ActiveForm; use yii\helpers\Url; $this->title = Yii::t('app', 'Edit order stage'); $this->params['breadcrumbs'] = [['label' => Yii::t('app', 'Order stage subsystem'), 'url' => Url::to(['index'])], ['label' => Yii::t('app', 'Order stages'), 'url' => Url::to(['stage-index'])], $this->title]; ?> <?php echo app\widgets\Alert::widget(['id' => 'alert']); ?> <?php $form = ActiveForm::begin(['id' => 'shop-stage-create', 'layout' => 'horizontal']); BackendWidget::begin(['title' => Yii::t('app', 'Edit order stage'), 'icon' => 'cogs', 'footer' => \yii\helpers\Html::submitButton(Yii::t('app', 'Submit'), ['class' => 'btn btn-success'])]); ?> <?php echo $form->field($model, 'name'); ?> <?php echo $form->field($model, 'name_frontend'); ?> <?php echo $form->field($model, 'name_short'); ?> <?php echo $form->field($model, 'event_name')->dropDownList($events); ?> <?php
<?php $form = ActiveForm::begin(['id' => 'form-form', 'type' => ActiveForm::TYPE_HORIZONTAL]); ?> <?php $this->beginBlock('submit'); echo \app\backend\components\Helper::saveButtons($submission); $this->endBlock(); ?> <section id="widget-grid"> <div class="row"> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Submission details'), 'icon' => 'cogs', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($submission, 'date_received'); ?> <?php echo $form->field($submission, 'ip'); ?> <?php echo $form->field($submission, 'user_agent'); ?> <?php BackendWidget::end();
echo $form->field($model, 'subject_template'); ?> <?php echo $form->field($model, 'form_open_analytics_action_id'); ?> <?php echo $form->field($model, 'form_submit_analytics_action_id'); ?> <?php BackendWidget::end(); ?> </article> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Property Groups'), 'icon' => 'cubes', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'properties')->widget('app\\widgets\\MultiSelect', ['defaultLabel' => Yii::t('app', 'Choose item'), 'items' => $items, 'selectedItems' => $selected, 'sortable' => false, 'ajax' => false]); ?> <?php BackendWidget::end(); ?> </article> </div> </section> <?php
<?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go back'), ['class' => 'btn btn-warning', 'name' => 'action', 'value' => 'back']); ?> <?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save']); $this->endBlock('submit'); ?> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php $form = ActiveForm::begin(); ?> <?php BackendWidget::begin(['icon' => 'usd', 'title' => Yii::t('app', 'Payment Type'), 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'class')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'params')->widget(\devgroup\jsoneditor\Jsoneditor::className(), ['editorOptions' => ['modes' => ['code', 'tree'], 'mode' => 'tree', 'editable' => new \yii\web\JsExpression('function(node) { return { field : false, value : true }; } ')]]);
<?php /** @var \app\modules\config\models\Configurable $configurable */ /** @var \app\backend\components\ActiveForm $form */ /** @var \app\modules\shop\models\ConfigConfigurableModel $model */ use app\backend\widgets\BackendWidget; ?> <div class="row"> <div class="col-md-6 col-sm-12"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Main settings'), 'options' => ['class' => 'visible-header']]); ?> <?php echo $form->field($model, 'exportDirPath'); ?> <?php echo $form->field($model, 'importDirPath'); ?> <?php echo $form->field($model, 'defaultType')->dropDownList(\app\modules\data\models\ImportModel::knownTypes()); ?> <?php BackendWidget::end(); ?> </div> </div>
if ($model->parent_id == 0) { ?> <?php echo \app\modules\shop\widgets\OptionGenerate::widget(['model' => $model, 'form' => $form, 'footer' => $this->blocks['submit']]); ?> <?php } ?> <?php if (!empty($model->options)) { ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Product Options'), 'icon' => 'shopping-cart', 'footer' => $this->blocks['submit']]); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider = new ActiveDataProvider(['query' => Product::find()->where(['parent_id' => $model->id])]), 'columns' => [['class' => 'yii\\grid\\DataColumn', 'attribute' => 'id'], ['class' => 'app\\backend\\columns\\TextWrapper', 'attribute' => 'name', 'callback_wrapper' => function ($content, $model, $key, $index, $parent) { return $content; }], 'price', 'old_price', ['class' => 'app\\backend\\components\\ActionColumn', 'buttons' => function ($model, $key, $index, $parent) { return null; }]], 'hover' => true]); ?> <?php BackendWidget::end(); ?> <?php } ?>
?> <?php echo $form->field($model, 'emailConfig[encryption]')->dropDownList(['' => '', 'ssl' => 'Use SSL', 'tls' => 'Use TLS'])->label('Mail encryption'); ?> <?php echo $form->field($model, 'emailConfig[mailFrom]')->label('Mail from'); ?> <?php echo $form->field($model, 'emailConfig[sendMail]')->label('Path to sendmail'); ?> <?php BackendWidget::end(); ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Error monitor'), 'options' => ['class' => 'visible-header']]); ?> <?php echo $form->field($model, 'errorMonitorEnabled')->widget(SwitchInput::className()); ?> <?php echo $form->field($model, 'emailNotifyEnabled')->widget(SwitchInput::className()); ?> <?php echo $form->field($model, 'devmail'); ?> <?php echo $form->field($model, 'notifyOnlyHttpCodes'); ?> <?php echo $form->field($model, 'numberElementsToStore');
?> <?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save']); ?> </div> <?php $this->endBlock('submit'); ?> <section id="widget-grid"> <div class="row"> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Watermark'), 'icon' => 'list-ul', 'footer' => $this->blocks['submit']]); $options = []; if ($model->isNewRecord === false) { $this->registerCss('span.file-input > div.file-preview {display:block;}'); $this->registerCss('.file-preview img {max-width:100%;}'); $options = ['initialPreview' => [Html::img($model->file)]]; } echo $form->field($model, 'image')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => $options]); echo $form->field($model, 'position')->dropDownList(Watermark::getPositions()); BackendWidget::end(); ?> </article> </div> </section>
$this->title = Yii::t('app', 'Theme variation active widgets'); $this->params['breadcrumbs'][] = ['url' => [Url::toRoute('index')], 'label' => Yii::t('app', 'Default theme configuration')]; $this->params['breadcrumbs'][] = $this->title; ?> <?php echo app\widgets\Alert::widget(['id' => 'alert']); ?> <section id="widget-grid"> <div class="row"> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Active widgets'), 'icon' => 'pencil']); ?> <?php foreach ($allParts as $partsRow) { ?> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> <?php echo Html::encode($partsRow['name']); ?> <?php if ($partsRow['multiple_widgets'] === '1') { ?> <small><?php
*/ $allowToAddSameProduct = 0; /** * @var bool Count only unique products in the order */ $countUniqueProductsOnly = 1; /** * @var bool Count children products in the order */ $countChildrenProducts = 1; /** * @var int Default measure ID */ $defaultMeasureId = 1; ?> </div> <div> <div class="col-md-6 col-sm-12"> <?php BackendWidget::begin(['icon' => 'cogs', 'title' => Yii::t('app', 'Order stage system'), 'options' => ['class' => 'visible-header']]); ?> <?php echo $form->field($model, 'finalOrderStageLeaf')->dropDownList(\app\components\Helper::getModelMap(\app\modules\shop\models\OrderStageLeaf::className(), 'id', 'button_label')); ?> <?php BackendWidget::end(); ?> </div> </div>
<?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save']); ?> </div> <?php $this->endBlock('submit'); ?> <?php echo Html::beginForm(Yii::$app->request->url, 'post', ['class' => 'form-horizontal']); ?> <section id="widget-grid"> <div class="row"> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Common'), 'icon' => 'pencil', 'footer' => $this->blocks['submit']]); ?> <div class="form-group required"> <?php echo Html::label(Yii::t('app', 'Group name'), 'group-name', ['class' => 'col-md-2 control-label']); ?> <div class="col-md-10"><?php echo Html::input('text', 'group-name', '', ['class' => 'form-control']); ?> </div> </div> <div class="form-group"> <?php echo Html::label(Yii::t('app', 'Require review'), 'group-require-review', ['class' => 'col-md-2 control-label']); ?> <div class="col-md-10"><?php
use kartik\widgets\ActiveForm; use app\modules\data\assets\DataAsset; DataAsset::register($this); $this->title = $object->name . ' ' . ($importMode ? Yii::t('app', 'Import') : Yii::t('app', 'Export')); $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Data'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <?php if (isset($fields['object']) && !empty($fields['object'])) { ?> <?php $form = ActiveForm::begin(['id' => 'form-data', 'type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); ?> <?php BackendWidget::begin(['icon' => 'list', 'title' => $object->name . ' - ' . Yii::t('app', 'Fields'), 'footer' => Html::submitButton(Icon::show('save') . Yii::t('app', 'Submit'), ['class' => 'btn btn-primary'])]); ?> <?php echo \yii\helpers\Html::activeHiddenInput($model, 'object'); ?> <div class="form-group row"> <div class="col-md-6"> <?php echo \yii\helpers\Html::button(Yii::t('app', 'Select All'), ['id' => 'select_all', 'class' => 'btn btn-success btn-sm']); ?> <?php echo \yii\helpers\Html::button(Yii::t('app', 'Unselect All'), ['id' => 'unselect_all', 'class' => 'btn btn-warning btn-sm']); ?> </div> </div>
?> </div> <div id="offers_section" class="col-md-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Settings for currencies section'), 'icon' => 'cogs']); ?> <?php echo $form->field($model, 'shop_main_currency')->dropDownList($currencies); ?> <?php BackendWidget::end(); ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Settings for offers section'), 'icon' => 'cogs']); ?> <?php echo $form->field($model, 'item_condition')->dropDownList(['new' => 'New', 'used' => 'Used']); ?> <?php foreach ($model->getOfferElements() as $el) { echo $form->field($model, $el)->render(function (\yii\widgets\ActiveField $field) use($feed_settings) { $value = $field->model->{$field->attribute}; $label = Html::activeLabel($field->model, $field->attribute, $field->labelOptions); $input = '<div class="col-md-4">' . Html::activeDropDownList($field->model, $field->attribute . '[type]', ['field' => Yii::t('app', 'Field'), 'property' => Yii::t('app', 'Property'), 'relation' => Yii::t('app', 'Relation')], array_merge(['data-ymlselect' => 'type'], $field->inputOptions)) . '</div>'; $_key_list = []; if (!empty($value['key'])) { if ('field' === $value['type']) {
<?php $this->endBlock('submit'); ?> <div class="row"> <div class="col-md-4" id="jstree-more"> <?php if (null != $model) { ?> <?php $form = ActiveForm::begin(['id' => 'subscribe_email_update', 'type' => ActiveForm::TYPE_VERTICAL, 'method' => 'get']); ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Edit subscribe'), 'icon' => 'edit', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'name')->textInput(); ?> <?php echo $form->field($model, 'email')->textInput(); ?> <?php echo $form->field($model, 'is_active')->textInput()->widget(\kartik\widgets\SwitchInput::className()); ?> <?php BackendWidget::end(); ?> <?php
echo Html::dropDownList('parentId', [], ['0' => Yii::t('app', 'Select a parent order item')] + \yii\helpers\ArrayHelper::map($model->items, 'id', function ($element) { return !is_null($element->product) ? $element->product->name : Yii::t('app', 'Product not found'); }), ['class' => 'form-control input-group-addon col-xs-3', 'id' => 'add-product-parent']); ?> <?php echo \app\widgets\AutoCompleteSearch::widget(['template' => '<p><a href="{{url}}">{{name}}</a></p>', 'options' => ['class' => 'form-control col-xs-9'], 'id' => 'add-product', 'name' => 'add-product', 'route' => ['auto-complete-search', 'orderId' => $model->id, 'term' => 'QUERY']]); ?> </div> </div> </div> <?php BackendWidget::end(); ?> <?php BackendWidget::begin(['icon' => 'dollar', 'title' => Yii::t('app', 'Order transactions')]); ?> <?php echo \app\modules\shop\widgets\OrderTransaction::widget(['viewFile' => 'order-transaction/backend', 'model' => $model, 'immutable' => $orderIsImmutable, 'additional' => ['transactionsDataProvider' => $transactionsDataProvider]]); ?> <?php BackendWidget::end(); ?> </div> </div> </div> <?php echo $this->blocks['page-buttons']; $form->end(); ?>
?> <?php BackendWidget::end(); ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Counters cache'), 'options' => ['class' => 'visible-header']]); ?> <?php echo $form->field($model, 'cacheConfig[counterCache][name]')->label(Yii::t('app', 'Name')); ?> <?php echo $form->field($model, 'cacheConfig[counterCache][expire]')->label(Yii::t('app', 'Duration')); ?> <?php BackendWidget::end(); ?> <?php BackendWidget::begin(['title' => Yii::t('app', 'Robots cache'), 'options' => ['class' => 'visible-header']]); ?> <?php echo $form->field($model, 'cacheConfig[robotsCache][name]')->label(Yii::t('app', 'Name')); ?> <?php echo $form->field($model, 'cacheConfig[robotsCache][expire]')->label(Yii::t('app', 'Duration')); ?> <?php BackendWidget::end(); ?> </div> </div>
/** * @var $this \yii\web\View * @var $dataProvider \yii\data\ArrayDataProvider */ use app\backend\components\ActionColumn; use app\backend\widgets\BackendWidget; use app\backend\widgets\GridView; use kartik\helpers\Html; use kartik\icons\Icon; use yii\widgets\Pjax; $this->title = Yii::t('app', 'I18n'); $this->params['breadcrumbs'] = [$this->title]; ?> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <?php BackendWidget::begin(['icon' => 'language', 'title' => $this->title, 'footer' => Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary'])]); ?> <?php Pjax::begin(); echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['label' => Yii::t('app', 'Alias'), 'value' => function ($model, $key, $index, $column) { return $key; }], ['label' => Yii::t('app', 'Local file'), 'value' => function ($model, $key, $index, $column) { return $model; }], ['class' => ActionColumn::className(), 'options' => ['width' => '50px'], 'buttons' => [['url' => 'update', 'icon' => 'pencil', 'class' => 'btn-primary', 'label' => Yii::t('app', 'Edit')]]]]]); Pjax::end(); ?> <?php BackendWidget::end(); ?> </div>
/* @var yii\web\View $this */ /* @var \yii\data\ActiveDataProvider $objects */ use app\modules\data\assets\DataAsset; $bundle = DataAsset::register($this); $this->title = Yii::t('app', 'Data'); $this->params['breadcrumbs'][] = $this->title; ?> <?php echo \app\widgets\Alert::widget(); ?> <div class="row"> <div class="col-md-12"> <div class="row"> <?php \app\backend\widgets\BackendWidget::begin(['icon' => 'cogs', 'title' => Yii::t('app', 'CommerceML')]); ?> <?php echo \yii\helpers\Html::a(Yii::t('app', 'Import from CommerceML'), \yii\helpers\Url::to(['/data/commerceml']), ['class' => 'btn btn-primary']); ?> <?php echo \yii\helpers\Html::a(Yii::t('app', 'Configure CommerceML'), \yii\helpers\Url::to(['/data/commerceml/configure']), ['class' => 'btn btn-primary']); ?> <?php \app\backend\widgets\BackendWidget::end(); ?> </div> </div> </div> <div class="data-index"> <?php
?> <?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save']); ?> </div> <?php $this->endBlock('submit'); ?> <section id="widget-grid"> <div class="row"> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Thumbnail size'), 'icon' => 'list-ul', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'width'); ?> <?php echo $form->field($model, 'height'); ?> <?php echo $form->field($model, 'quality'); ?> <?php if (Yii::$app->getModule('image')->useWatermark == 1) { $watermarks = Watermark::find()->all(); echo $form->field($model, 'default_watermark_id')->radioList(ArrayHelper::map($watermarks, 'id', function ($watermarks) { return Html::img($watermarks->file, ['style' => 'max-width:200px;']);
<?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go back'), ['class' => 'btn btn-warning', 'name' => 'action', 'value' => 'back']); ?> <?php echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save']); $this->endBlock('submit'); ?> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php $form = ActiveForm::begin(); ?> <?php BackendWidget::begin(['icon' => 'calculator', 'title' => Yii::t('app', 'Measure'), 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'symbol')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'nominal')->textInput(['maxlength' => 255]); ?> <?php BackendWidget::end(); ?> <?php ActiveForm::end();