{template "header.html"}
<div class="note note-danger">
    <p><a href="javascript:dr_update_cache('member');">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title">

            <div class="caption">
                <span class="caption-subject font-green "><i class="fa fa-list-ol"></i> {dr_lang('等级制度')}</span>
            </div>
            <div class="actions">
                <div class="btn-group">
                    <a class="btn" href="{dr_url('member_group/level_index', ['gid'=>$gid])}"> <i class="fa fa-mail-reply"></i> {dr_lang('返回列表')}</a>
                </div>
            </div>
        </div>
        <div class="portlet-body">
            <div class="tab-content">
                <div class="form-body">

                    <div class="form-group" id="dr_row_name">
                        <label class="col-xs-2 control-label">{dr_lang('名称')}</label>
                        <div class="col-xs-8">
                            <label><input type="text" class="form-control" name="data[name]" value="{htmlspecialchars($name)}"></label>
                            <span class="help-block">{dr_lang('给它一个描述名称')}</span>
                        </div>
                    </div>
                    <div class="form-group" id="dr_row_stars">
                        <label class="col-xs-2 control-label">{dr_lang('星星数量')}</label>
                        <div class="col-xs-8">
                            <label><input type="text" class="form-control" name="data[stars]" value="{intval($stars)}"></label>
                            <span class="help-block">{dr_lang('星星数在达到4时，4个星星显示为1个月亮、4个月亮显示为1个太阳')}</span>
                        </div>
                    </div>
                    <div class="form-group" id="dr_row_value">
                        <label class="col-xs-2 control-label">{dr_lang('升级值要求')}</label>
                        <div class="col-xs-8">
                            <label><input type="text" class="form-control" name="data[value]" value="{intval($value)}"></label>
                            <label>{$dwz}</label>
                            <span class="help-block">{dr_lang('该等级需要的升级值，升级值越低越排在前面，0表示初始等级')}</span>
                        </div>
                    </div>
                    <div class="form-group" id="dr_row_note">
                        <label class="col-xs-2 control-label ">{dr_lang('备注说明')}</label>
                        <div class="col-xs-8">
                            <textarea class="form-control" rows="5" name="data[note]">{$note}</textarea>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <div class="portlet-body form myfooter">
        <div class="form-actions text-center">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000', '{dr_url('member_group/level_index', ['gid'=>$gid])}')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>
</form>

<link href="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.css" rel="stylesheet" type="text/css" />
<script src="{THEME_PATH}assets/global/plugins/fuelux/js/spinner.min.js" type="text/javascript"></script>
<script src="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function(){
        $("#displayorder").TouchSpin({
            buttondown_class: "btn red",
            buttonup_class: "btn green",
            min: -255,
            max: 255
        });
    });
</script>
{template "footer.html"}