_form.php 2.46 KB
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use common\models\Currency;

/* @var $this yii\web\View */
/* @var $model backend\models\Importers */
/* @var $form yii\widgets\ActiveForm */
?>
<div  ng-controller="SampleAppCtrl" class="Importers-form">

    <?php $form = ActiveForm::begin(); ?>
    <div >
        <div class="btn btn-primary btn-lg active main_user_info">Основные данные</div>
        <div class="btn btn-default btn-lg entity">Юридическое лицо</div>
    </div>
    <div id="main_user_info" >
        <?= $form->field($model, 'code')->textInput(['maxlength' => true]) ?>

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

        <?= $form->field($model, 'active')->checkbox() ?>

        <?= $form->field($model, 'name_price')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'currency_id')->dropDownList(ArrayHelper::map(Currency::find()->all(), 'id', 'name')) ?>

        <?= $form->field($model, 'delivery')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>

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

        <?= $form->field($model, 'price_date_update')->textInput() ?>

    </div>
    <div id="entity">

        <?= $form->field($model, 'PARSER_COLUMN_COUNT')->textInput() ?>

        <?= $form->field($model, 'PARSER_IS_ACTIVE')->checkbox() ?>

        <?= $form->field($model, 'PARSER_FIELD_BRAND')->textInput() ?>

        <?= $form->field($model, 'PARSER_FIELD_ARTICLE')->textInput() ?>

        <?= $form->field($model, 'PARSER_FIELD_ARTICLE_PREFIX')->checkbox() ?>

        <?= $form->field($model, 'PARSER_FIELD_PRICE')->textInput() ?>

        <?= $form->field($model, 'PARSER_FIELD_DESCR')->textInput() ?>

        <?= $form->field($model, 'PARSER_FIELD_BOX')->textInput() ?>

        <?= $form->field($model, 'PARSER_FIELD_ADD_BOX')->textInput() ?>

        <?= $form->field($model, 'PARSER_FIELD_GROUP_RG')->textInput() ?>

        <?= $form->field($model, 'PARSER_FIELD_SIGN')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'PARSER_FIELD_MULTIPLIER')->textInput() ?>
    </div>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Добавить' : 'Редактировать', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

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

</div>