{template "header.html"}

<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title tabbable-line">
            <ul class="nav nav-tabs" style="float:left;">
                <li class="{if $page==0}active{/if}">
                    <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('账号设置')} </a>
                </li>
            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">



                <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
                    <div class="form-body">


                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">AppId</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="data[appid]" value="{$data['appid']}" >
                                </div>
                            </div>
                        </div>
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">AppSecret</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="data[appsecret]" value="{$data['appsecret']}" >
                                </div>
                            </div>
                        </div>
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">授权登录模式</label>
                                <div class="col-md-9">
                                    <div class="mt-radio-inline">
                                        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[login]" value="0" {if !$data['login']}checked{/if} /> {dr_lang('绑定账号')} <span></span></label>
                                        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[login]" value="1" {if $data['login']}checked{/if} /> {dr_lang('直接登录')} <span></span></label>
                                    </div>
                                    <span class="help-block">{dr_lang('绑定账号：点击授权登录按钮后会提示账号绑定或者注册账号；直接登录：直接创建一个新账号')}</span>
                                </div>
                            </div>
                        </div>


                    </div>
                </div>

                <div class="tab-pane {if $page==1}active{/if}" id="tab_1">
                    <div class="form-body">





                    </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')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>
</form>

<script type="text/javascript">
    function dr_to_token() {
        $.get("{dr_url(APP_DIR.'/api/token')}", function(data){
            $("#sys_token").val(data);
        });
    }
    function dr_to_aeskey() {
        $.get("{dr_url(APP_DIR.'/api/asckey')}", function(data){
            $("#sys_asckey").val(data);
        });
    }
</script>

{template "footer.html"}