コード例 #1
0
$this->params['breadcrumbs'][] = $this->title;
$action = isset($model->id) ? 'edit?id=' . $model->id : 'edit';
$this->registerJs('
     var static_values_properties = ' . Json::encode($static_values_properties) . ';
     var current_selections = ' . (empty($model->apply_if_params) ? "{}" : $model->apply_if_params) . ';
     var current_field_id= "apply_if_params"', \yii\web\View::POS_HEAD, 'propertyData');
\app\backend\assets\PropertyAsset::register($this);
?>


<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
$form = ActiveForm::begin(['id' => 'dynamic-content-form', 'type' => ActiveForm::TYPE_VERTICAL, 'action' => $action]);
?>

<?php 
$this->beginBlock('submit');
echo \app\backend\components\Helper::saveButtons($model);
$this->endBlock();
?>


<section id="widget-grid">
    <div class="row">

        <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6">

            <?php 
コード例 #2
0
ファイル: edit-property.php プロジェクト: tqsq2005/dotplant2
use kartik\helpers\Html;
use kartik\icons\Icon;
use app\backend\components\ActiveForm;
use yii\helpers\Url;
$this->title = Yii::t('app', 'Property edit');
$this->params['breadcrumbs'][] = ['url' => ['/backend/properties/index'], 'label' => Yii::t('app', 'Property groups')];
$this->params['breadcrumbs'][] = ['url' => ['/backend/properties/group', 'id' => $model->property_group_id], 'label' => $model->group->name];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
$form = ActiveForm::begin(['id' => 'property-form', 'type' => ActiveForm::TYPE_HORIZONTAL]);
?>

<?php 
$this->beginBlock('submit');
echo Html::a(Icon::show('arrow-circle-left') . Yii::t('app', 'Back'), Yii::$app->request->get('returnUrl', ['/backend/properties/group', 'property_group_id' => $model->property_group_id]), ['class' => 'btn btn-danger']);
?>

<?php 
if ($model->isNewRecord) {
    ?>
    <?php 
    echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go next'), ['class' => 'btn btn-success', 'name' => 'action', 'value' => 'next']);
}
?>
コード例 #3
0
ファイル: category-form.php プロジェクト: tqsq2005/dotplant2
 * @var $model \app\modules\shop\models\Category
 */
$this->title = Yii::t('app', 'Category edit');
$this->params['breadcrumbs'][] = ['url' => ['index'], 'label' => Yii::t('app', 'Categories')];
if ($model->parent_id > 0 && null !== ($parent = \app\modules\shop\models\Category::findById($model->parent_id, null, null))) {
    $this->params['breadcrumbs'][] = ['url' => ['index', 'id' => $parent->id, 'parent_id' => $parent->parent_id], 'label' => $parent->name];
}
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
$form = ActiveForm::begin(['id' => 'category-form', 'type' => ActiveForm::TYPE_HORIZONTAL]);
?>

<?php 
$this->beginBlock('submit');
?>
<div class="form-group no-margin">
    <?php 
if (!$model->isNewRecord) {
    ?>
        <?php 
    echo Html::a(Icon::show('eye') . Yii::t('app', 'Preview'), ['/shop/product/list', 'category_id' => $model->id, 'category_group_id' => $model->category_group_id], ['class' => 'btn btn-info', 'target' => '_blank']);
    ?>
        <?php 
    echo Html::a(Icon::show('list') . Yii::t('app', 'Products'), ['/shop/backend-product/index', 'parent_id' => $model->id], ['class' => 'btn btn-info', 'target' => '_blank']);
    ?>
コード例 #4
0
ファイル: form.php プロジェクト: tqsq2005/dotplant2
<?php

$form = \app\backend\components\ActiveForm::begin();
echo \app\backend\widgets\DataRelationsWidget::widget(['fields' => $openGraphFields, 'object' => \app\models\Object::getForClass(\app\modules\shop\models\Product::className()), 'data' => json_decode($model->relation_data), 'relations' => $relationLinks]);
echo \yii\helpers\Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success']);
\app\backend\components\ActiveForm::end();
コード例 #5
0
ファイル: form.php プロジェクト: tqsq2005/dotplant2
        <?php 
BackendWidget::end();
?>
    </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');
    ?>
コード例 #6
0
use kartik\helpers\Html;
use kartik\icons\Icon;
use app\backend\components\ActiveForm;
$this->title = Yii::t('app', 'Property static value edit');
$this->params['breadcrumbs'][] = ['url' => ['/backend/properties/index'], 'label' => Yii::t('app', 'Property groups')];
$this->params['breadcrumbs'][] = ['url' => ['/backend/properties/group', 'id' => $model->property->property_group_id], 'label' => $model->property->group->name];
$this->params['breadcrumbs'][] = ['url' => ['/backend/properties/edit-property', 'id' => $model->property_id, 'property_group_id' => $model->property->property_group_id], 'label' => $model->property->name];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
$form = ActiveForm::begin(['id' => 'static-value-form', 'type' => ActiveForm::TYPE_HORIZONTAL]);
?>

<?php 
$this->beginBlock('submit');
?>
<div class="form-group no-margin">
<?php 
echo Html::a(Icon::show('arrow-circle-left') . Yii::t('app', 'Back'), Yii::$app->request->get('returnUrl', ['/backend/properties/edit-property', 'id' => $model->property_id, 'property_group_id' => $model->property->property_group_id]), ['class' => 'btn btn-danger']);
?>

<?php 
if ($model->isNewRecord) {
    ?>
    <?php 
    echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go next'), ['class' => 'btn btn-success', 'name' => 'action', 'value' => 'next']);
コード例 #7
0
 * @var $model \app\modules\shop\models\Product
 */
$this->title = Yii::t('app', 'Product edit');
$this->params['breadcrumbs'][] = ['url' => ['index'], 'label' => Yii::t('app', 'Products')];
if ($parent !== null) {
    $this->params['breadcrumbs'][] = ['url' => ['edit', 'id' => $parent->id], 'label' => $parent->name];
}
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

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

<?php 
$this->beginBlock('submit');
?>
<div class="form-group no-margin">
    <?php 
if (!$model->isNewRecord) {
    ?>
        <?php 
    echo Html::a(Icon::show('eye') . Yii::t('app', 'Preview'), ['@product', 'model' => $model, 'category_group_id' => is_null($model->mainCategory) ? null : $model->mainCategory->category_group_id], ['class' => 'btn btn-info', 'target' => '_blank']);
    ?>
    <?php 
}
?>
コード例 #8
0
ファイル: update.php プロジェクト: tqsq2005/dotplant2
    <?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']);
?>



</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]);
コード例 #9
0
<?php

use app\backend\widgets\BackendWidget;
use app\backend\components\ActiveForm;
use yii\helpers\Html;
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_INLINE]);
/** @var $form ActiveForm */
BackendWidget::begin(['title' => Yii::t('app', 'Warehouse Email'), 'icon' => 'cog', 'footer' => Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success'])]);
?>


    <div class="clearfix"></div>
<?php 
echo $form->errorSummary($warehouseEmail);
?>
    <div class="pull-right">
        <?php 
echo $form->field($warehouseEmail, 'name');
?>
        <?php 
echo $form->field($warehouseEmail, 'email');
?>
        <?php 
echo $form->field($warehouseEmail, 'sort_order');
?>

    </div>
    <div class="clearfix"></div>
<?php 
BackendWidget::end();
ActiveForm::end();
コード例 #10
0
ファイル: form.php プロジェクト: tqsq2005/dotplant2
    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord) {
    ?>
        <div class="row">
            <?php 
    foreach ($model->getTypeObjects() as $key => $object) {
        ?>
                <?php 
        /** @var \app\modules\shop\models\AbstractDiscountType $object */
        ?>
                <?php 
        $form = ActiveForm::begin(['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', $object->type->name), 'icon' => 'cog', 'footer' => $this->blocks['submit']]);
        ?>
                    <?php 
        echo \app\backend\widgets\GridView::widget(['dataProvider' => $object::searchDiscountFilter($model->id), 'columns' => ['fullName', ['class' => 'app\\backend\\components\\ActionColumn', 'buttons' => [['url' => 'delete-filters', 'icon' => 'trash-o', 'class' => 'btn-danger', 'label' => Yii::t('app', 'Delete'), 'options' => ['data-action' => 'delete']]], 'url_append' => '&typeId=' . $object->type->id]]]);
        ?>

                    <?php 
        echo $this->render($object->type->add_view, ['form' => $form, 'object' => $object]);
        ?>
                    <?php 
        BackendWidget::end();
        ?>
コード例 #11
0
ファイル: index.php プロジェクト: tqsq2005/dotplant2
$this->title = Yii::t('app', 'Configuration');
$this->params['breadcrumbs'][] = ['url' => ['/config/backend/index'], 'label' => $this->title];
?>

<div class="row">
    <div class="col-lg-12 col-xs-12">
        <h1>
            <?php 
echo Yii::t('app', 'Configuration');
?>
        </h1>
    </div>
</div>
<div class="row">
    <?php 
$form = ActiveForm::begin(['id' => 'config-form', 'type' => ActiveForm::TYPE_VERTICAL, 'options' => ['enctype' => 'multipart/form-data']]);
?>
    <article class="col-xs-12 col-lg-12">

        <div class="jarviswidget well jarviswidget-color-darken" id="wid-id-configurations" data-widget-sortable="false" data-widget-deletebutton="false" data-widget-editbutton="false" data-widget-colorbutton="false" role="widget" style="">

            <!-- widget div-->
            <div role="content">

                <!-- widget edit box -->
                <div class="jarviswidget-editbox">
                    <!-- This area used as dropdown edit box -->

                </div>
                <!-- end widget edit box -->
コード例 #12
0
<?php

use app\backend\components\ActiveForm;
?>

<div style="padding:15px;">
<?php 
$form = ActiveForm::begin(['action' => Yii::$app->request->url, 'id' => 'static-value-form', 'type' => ActiveForm::TYPE_HORIZONTAL]);
?>

<?php 
echo $this->render('edit-static-value-form', ['form' => $form, 'model' => $model]);
?>

<?php 
echo \yii\bootstrap\Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-info']);
?>

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