<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\ShareLevel */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="box box-success">
    <div class="box-body">
    <?php $form = ActiveForm::begin(); ?>

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

    <?= $form->field($model, 'sale_rate')->hint('请填写小数，0.1 = 10%')->textInput() ?>

    <?= $form->field($model, 'direct_rate')->hint('请填写小数，0.1 = 10%')->textInput() ?>

    <?= $form->field($model, 'put_on_rate')->hint('请填写小数，0.1 = 10%')->textInput() ?>

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


    <?= $form->field($model, 'upgrade_limit')->hint('有多少个初级合伙人级别的下级，非初级合伙人设置此项')->textInput(['type' => 'number']) ?>

    <?= $form->field($model, 'is_base')->hint('只能设置一个，升级按此级别统计')->checkbox() ?>

    <?= $form->field($model, 'base_limit')->hint('销售订单数量，勾选是否初级合伙人才生效')->textInput(['type' => 'number']) ?>


    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('common', 'Create') : Yii::t('common', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success btn-flat' : 'btn btn-primary btn-flat']) ?>
    </div>

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