<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use qcbase\models\Menu;
use common\models\User;
use qcbase\models\ContractStatus;
use yii\db\Query as query;
use yii\helpers\Url;

/* @var $this yii\web\View */

$form = ActiveForm::begin([
        'id' => 'main-form',
    	'action' => $action,
        'fieldConfig' => [
            'options' => ['tag' => 'tr'],
            'template' => "<th width='120'>{label}</th><td>{input}{hint}{error}</td>",
        ]
    ]);
?>

<div class="h_a">基本属性</div>
<div class="table_full">
    <table width="100%">
        <?= $form -> field($model, 'name') -> textInput(['class' => 'input length_5', 'placeholder' => '状态名']); ?>
        <?= $form -> field($model, 'sort') -> textInput(['class' => 'input length_5', 'placeholder' => '默认为0']); ?>
        <?= $form->field($model, 'status')->radioList(ContractStatus::getStatusList(), ['class' => 'switch_list']) ?>
        <?= $form->field($model, 'active_state')->radioList(ContractStatus::getActiveList(), ['class' => 'switch_list']) ?>
    </table>
</div>

<?= ($model -> isNewRecord) ? '' : Html::hiddenInput('id', $model -> status_id); ?>

<div class="btn_wrap">
    <div class="btn_wrap_pd">
        <?= Html::submitButton('提交', ['class' => 'btn btn_submit mr10']); ?>
    </div>
</div>
<?php ActiveForm::end(); ?>