{extend name="./content"}

{block name="content"}
<form onsubmit="return false;" action="__SELF__" data-auto="true" method="post" class='form-horizontal' style='padding-top:20px'>

    <div class="form-group">
        <label class="col-sm-2 control-label">邀请注册奖励</label>
        <div class='col-sm-8'>
            <select name="spread_reward" class="layui-input" required>
                <option value="1" {if sysconf('spread_reward')==1}selected{/if}>开启</option>
                <option value="0" {if sysconf('spread_reward')==0}selected{/if}>关闭</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">邀请注册奖励金额</label>
        <div class='col-sm-8'>
            <input type="text" name="spread_reward_money" required="required" title="请输入奖励金额" placeholder="请输入奖励金额" value="{:sysconf('spread_reward_money')}" class="layui-input">
            <p class="help-block">单位：元</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">邀请码模式</label>
        <div class='col-sm-8'>
            <select name="spread_invite_code" class="layui-input" required>
                <option value="1" {if sysconf('spread_invite_code')==1}selected{/if}>开启</option>
                <option value="0" {if sysconf('spread_invite_code')==0}selected{/if}>关闭</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">邀请码必填</label>
        <div class='col-sm-8'>
            <select name="is_need_invite_code" class="layui-input" required>
                <option value="1" {if sysconf('is_need_invite_code')==1}selected{/if}>是</option>
                <option value="0" {if sysconf('is_need_invite_code')==0}selected{/if}>否</option>
            </select>
        </div>
    </div>
    <div class="hr-line-dashed"></div>

    <div class="col-sm-4 col-sm-offset-2">
        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存配置</button>
        </div>
    </div>

</form>
<script>
    layui.use('form', function(){
        var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
        form.render();
    });
</script>
{/block}
