{template "header.html"}



<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>

<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>
                <li class="{if $page==4}active{/if}">
                    <a href="#tab_4" data-toggle="tab" onclick="$('#dr_page').val('4')"> <i class="fa fa-user"></i> {dr_lang('登录设置')} </a>
                </li>
                <li class="{if $page==1}active{/if}">
                    <a href="#tab_1" data-toggle="tab" onclick="$('#dr_page').val('1')"> <i class="fa fa-user-plus"></i> {dr_lang('注册设置')} </a>
                </li>
                <li class="{if $page==5}active{/if}">
                    <a href="#tab_5" data-toggle="tab" onclick="$('#dr_page').val('5')"> <i class="fa fa-user-md"></i> {dr_lang('格式规范')} </a>
                </li>
                <li class="{if $page==2}active{/if}">
                    <a href="#tab_2" data-toggle="tab" onclick="$('#dr_page').val('2')"> <i class="fa fa-qq"></i> {dr_lang('快捷登录')} </a>
                </li>
                <li class="{if $page==3}active{/if}">
                    <a href="#tab_3" data-toggle="tab" onclick="$('#dr_page').val('3')"> <i class="fa fa-code"></i> {dr_lang('分页设置')} </a>
                </li>
                <li class="{if $page==6}active{/if}">
                    <a href="#tab_6" data-toggle="tab" onclick="$('#dr_page').val('6')"> <i class="fa fa-table"></i> {dr_lang('后台列表显示')}  </a>
                </li>
            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">

                <div class="tab-pane {if $page==6}active{/if}" id="tab_6">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('列表搜索框')}</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[config][is_show_search_bar]" value="1" {if $data['config']['is_show_search_bar']}checked{/if} /> {dr_lang('开启')} <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[config][is_show_search_bar]" value="0" {if empty($data['config']['is_show_search_bar'])}checked{/if} /> {dr_lang('关闭')} <span></span></label>
                                </div>
                                <span class="help-block">{dr_lang('开启后，当进入列表时直接显示搜索框；关闭后，需要点右上角的搜索按钮才会出现')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('列表显示字段')}</label>
                            <div class="col-md-9">
                                <div class="table-scrollable">
                                    <table class="table table-striped table-bordered table-hover table-checkable dataTable">
                                        <thead>
                                        <tr class="heading">
                                            <th class="myselect">
                                                {dr_lang('显示')}
                                            </th>
                                            <th width="180"> {dr_lang('字段')} </th>
                                            <th width="100"> {dr_lang('类别')} </th>
                                            <th width="150"> {dr_lang('名称')} </th>
                                            <th width="100"> {dr_lang('宽度')} </th>
                                            <th width="140"> {dr_lang('对齐方式')} </th>
                                            <th> {dr_lang('回调方法')} </th>
                                        </tr>
                                        </thead>
                                        <tbody class="field-sort-items">
                                        {loop $field $n $t}
                                        <tr class="odd gradeX">
                                            <td class="myselect">
                                                <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                                                    <input type="checkbox" class="checkboxes" name="data[list_field][{$t.fieldname}][use]" value="1" {if $data['list_field'][$t.fieldname]['use']} checked{/if} />
                                                    <span></span>
                                                </label>
                                            </td>
                                            <td>{dr_lang($t.name)} ({$t.fieldname})</td>
                                            <td>{$t.fieldtype}</td>
                                            <td><input class="form-control" type="text" name="data[list_field][{$t.fieldname}][name]" value="{php echo $data['list_field'][$t.fieldname]['name'] ? htmlspecialchars((string)$data['list_field'][$t.fieldname]['name']) : $t.name}" /></td>
                                            <td> <input class="form-control" type="text" name="data[list_field][{$t.fieldname}][width]" value="{htmlspecialchars((string)$data['list_field'][$t.fieldname]['width'])}" /></td>
                                            <td><input type="checkbox" name="data[list_field][{$t.fieldname}][center]" {if $data['list_field'][$t.fieldname]['center']} checked{/if} value="1"  data-on-text="{dr_lang('居中')}" data-off-text="{dr_lang('默认')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                            </td>
                                            <td> <div class="input-group" style="width:250px">
                                        <span class="input-group-btn">
                                            <a class="btn btn-success" href="javascript:dr_call_alert();">{dr_lang('回调')}</a>
                                        </span>
                                                <input class="form-control" type="text" name="data[list_field][{$t.fieldname}][func]" value="{htmlspecialchars((string)$data['list_field'][$t.fieldname]['func'])}" />
                                            </div></td>
                                        </tr>
                                        {/loop}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

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

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('姓名命名')}</label>
                            <div class="col-md-9">
                                <label><input class="form-control" type="text" name="data[config][cname]" value="{htmlspecialchars((string)$data['config']['cname'])}" ></label>
                                <span class="help-block">{dr_lang('姓名字段进行重新命名，例如命名为：昵称、别名等')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('允许修改姓名')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][edit_name]" value="1" {if $data['config']['edit_name']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">

                                <span class="help-block">{dr_lang('在用户中心修改姓名字段后将不能再次进行修改')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('姓名唯一性')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][unique_name]" value="1" {if $data['config']['unique_name']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">

                                <span class="help-block">{dr_lang('姓名字段会验证唯一性')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('用户姓名长度')}</label>
                            <div class="col-md-9">
                                <div class="input-small"><input class="form-control" id="dr_cutname" type="text" name="data[register][cutname]" value="{intval($data['register']['cutname'])}" >
                                    <script type="text/javascript">
                                        $(function(){
                                            $("#dr_cutname").TouchSpin({
                                                buttondown_class: "btn default",
                                                buttonup_class: "btn default",
                                                verticalbuttons: false,
                                                step: 1,
                                                min: 0,
                                                max: 100
                                            });
                                        });
                                    </script></div>
                                <span class="help-block">{dr_lang('用户姓名的最大长度，设置0表示不限制，最大设置100，超出会被切取')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('账号最小长度')}</label>
                            <div class="col-md-9">
                                <div class="input-small"><input class="form-control" id="dr_username" type="text" name="data[config][userlen]" value="{intval($data['config']['userlen'])}" >
                                    <script type="text/javascript">
                                        $(function(){
                                            $("#dr_username").TouchSpin({
                                                buttondown_class: "btn default",
                                                buttonup_class: "btn default",
                                                verticalbuttons: false,
                                                step: 1,
                                                min: 0,
                                                max: 50
                                            });
                                        });
                                    </script></div>
                                <span class="help-block">{dr_lang('账号名的最小长度控制，0表示不限制')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('账号最大长度')}</label>
                            <div class="col-md-9">
                                <div class="input-small"><input class="form-control" id="dr_usernamemax" type="text" name="data[config][userlenmax]" value="{intval($data['config']['userlenmax'] ? $data['config']['userlenmax'] : 50)}" >
                                    <script type="text/javascript">
                                        $(function(){
                                            $("#dr_usernamemax").TouchSpin({
                                                buttondown_class: "btn default",
                                                buttonup_class: "btn default",
                                                verticalbuttons: false,
                                                step: 1,
                                                min: 0,
                                                max: 50
                                            });
                                        });
                                    </script></div>
                                <span class="help-block">{dr_lang('账号名的最大长度控制，最大50个字符，0表示不限制')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('密码最小长度')}</label>
                            <div class="col-md-9">
                                <div class="input-small"><input class="form-control" id="dr_password" type="text" name="data[config][pwdlen]" value="{intval($data['config']['pwdlen'])}" >
                                    <script type="text/javascript">
                                        $(function(){
                                            $("#dr_password").TouchSpin({
                                                buttondown_class: "btn default",
                                                buttonup_class: "btn default",
                                                verticalbuttons: false,
                                                step: 1,
                                                min: 0,
                                                max: 50
                                            });
                                        });
                                    </script></div>
                                <span class="help-block">{dr_lang('密码的最小长度控制，最大设置50位数')}</span>
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('允许账号与密码相同')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][user2pwd]" value="1" {if $data['config']['user2pwd']}checked{/if} data-on-text="{dr_lang('允许')}" data-off-text="{dr_lang('禁止')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">

                                <span class="help-block">{dr_lang('针对前端注册或修改密码时的验证')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('密码强度（正则）')}</label>
                            <div class="col-md-9">
                                <div class="input-group ">
                                    <input class="form-control" type="text" name="data[config][pwdpreg]" value="{$data.config.pwdpreg}" >
                                    <span class="input-group-btn">
                                            <button class="btn blue" onclick="dr_iframe_show('{dr_lang('正则表达式')}', '{dr_url('api/test_pattern')}')" type="button">{dr_lang('测试')}</button>
                                        </span>
                                </div>
                                <span class="help-block">{dr_lang('针对前端注册或修改密码时的强度验证，可以设置自定义正则表达式，例如数字正则表达式格式：/^[0-9]+$/')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('账号规则（正则）')}</label>
                            <div class="col-md-9">
                                <div class="input-group ">
                                    <input class="form-control" type="text" name="data[register][preg]" value="{$data.register.preg}" >
                                    <span class="input-group-btn">
                                            <button class="btn blue" onclick="dr_iframe_show('{dr_lang('正则表达式')}', '{dr_url('api/test_pattern')}')" type="button">{dr_lang('测试')}</button>
                                        </span>
                                </div>
                                <span class="help-block">{dr_lang('针对前端注册时的账号格式验证，可以设置自定义正则表达式，例如数字正则表达式格式：/^[0-9]+$/')}</span>
                            </div>
                        </div>

                    </div>
                </div>

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


                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('允许修改手机')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][edit_mobile]" value="1" {if $data['config']['edit_mobile']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">

                                <span class="help-block">{dr_lang('在用户中心修改手机号码后将不能再次进行修改')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('允许修改邮箱')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][edit_email]" value="1" {if $data['config']['edit_email']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">

                                <span class="help-block">{dr_lang('在用户中心修改邮箱地址后将不能再次进行修改')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('允许多个用户组')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][groups]" value="1" {if $data['config']['groups']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('开启之后用户将可以同时拥有多个用户组权限')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('修改资料审核')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][edit_verify]" value="1" {if $data['config']['edit_verify']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">

                                <span class="help-block">{dr_lang('在用户中心修改资料信息时将进入后台审核环节')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('修改头像审核')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[config][avatar_verify]" value="1" {if $data['config']['avatar_verify']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">

                                <span class="help-block">{dr_lang('在用户中心修改头像时将进入后台审核环节')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('登录超时时间')}</label>
                            <div class="col-md-9">
                                <label><input class="form-control" type="text" name="data[config][logintime]" value="{intval($data['config']['logintime'])}" ></label>
                                <span class="help-block">{dr_lang('单位秒，默认为86400秒，超时之后自动退出账号')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('用户组拒绝审核理由')}</label>
                            <div class="col-md-9">
                                <textarea class="form-control" style="height:150px; width:100%;" name="data[config][verify_msg]">{$data['config']['verify_msg']}</textarea>
                                <span class="help-block">{dr_lang('申请用户组时常用的拒绝审核理由，一行一个')}</span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="tab-pane {if $page==4}active{/if}" id="tab_4">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('登录主字段')}</label>
                            <div class="col-md-9">
                                <div class="mt-checkbox-inline">
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" checked disabled /> {dr_lang('账号')} <span></span></label>
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[login][field][]" value="phone" {if dr_in_array('phone', (array)$data.login.field)} checked{/if} /> {dr_lang('手机号')} <span></span></label>
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[login][field][]" value="email" {if dr_in_array('email', (array)$data.login.field)} checked{/if} /> {dr_lang('邮箱')} <span></span></label>
                                </div>
                                <span class="help-block">{dr_lang('可同时选择多个字段作为登录主字段')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('登录图片验证码')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[login][code]" value="1" {if $data['login']['code']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('网页中的图片验证码')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('短信验证码登录')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[login][sms]" value="1" {if $data['login']['sms']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block"><a href="javascript:dr_help(501);">{dr_lang('登录字段必须包含手机号码才能使用此功能')}</a></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('短信登录时自动注册')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[login][auto_reg]" value="1" {if $data['login']['auto_reg']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('当登录手机号没有注册时，系统将自动注册该手机号')}</span>
                                {if $data['login']['auto_reg'] && !dr_in_array('phone', (array)$data.register.field)}
                                <span class="help-block" style="color: red">{dr_lang('没有设置手机号为注册字段，本功能将无效')}</span>
                                {/if}
                                {if $data['login']['auto_reg'] && !$data['login']['sms']}
                                <span class="help-block" style="color: red">{dr_lang('没有开启短信验证码登录开关，本功能将无效')}</span>
                                {/if}
                                {if $data['login']['auto_reg'] && !dr_in_array('phone', (array)$data.login.field)}
                                <span class="help-block" style="color: red">{dr_lang('没有设置手机号为登录主字段，本功能将无效')}</span>
                                {/if}
                            </div>
                        </div>

                    </div>
                </div>

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

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('电脑列表分页数量')}</label>
                            <div class="col-md-9">
                                <label><input class="form-control" type="text" name="data[config][pagesize]" value="{intval($data['config']['pagesize'])}" ></label>
                                <span class="help-block">{dr_lang('用户中心数据列表在电脑网页每页显示数量')}</span>
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('手机列表分页数量')}</label>
                            <div class="col-md-9">
                                <label><input class="form-control" type="text" name="data[config][pagesize_mobile]" value="{intval($data['config']['pagesize_mobile'])}" ></label>
                                <span class="help-block">{dr_lang('用户中心数据列表在手机网页每页显示数量')}</span>
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('API接口列表分页数量')}</label>
                            <div class="col-md-9">
                                <label><input class="form-control" type="text" name="data[config][pagesize_api]" value="{intval($data['config']['pagesize_api'])}" ></label>
                                <span class="help-block">{dr_lang('用户中心数据列表在API数据请求时每页返回的数量')}</span>
                            </div>
                        </div>

                    </div>
                </div>

                <div class="tab-pane {if $page==1}active{/if}" id="tab_1">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册功能')}</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[register][close]" value="0" {if !$data['register']['close']}checked{/if} /> {dr_lang('开启注册')} <span></span></label>
                                    <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[register][close]" value="1" {if $data['register']['close']}checked{/if} /> {dr_lang('关闭注册')} <span></span></label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('默认注册组')}</label>
                            <div class="col-md-9">
                                <label>
                                    <select class="form-control" name="data[register][groupid]">
                                        {loop $group $t}
                                        {if $t.register}
                                        <option value="{$t.id}" {if $t.id==$data['register']['groupid']} selected{/if}>{dr_lang($t.name)}</option>
                                        {/if}
                                        {/loop}
                                    </select>
                                </label>
                                <span class="help-block"><a href="{dr_url('member/group/index')}">{dr_lang('必须选择一个默认注册的用户组')}</a></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册字段选择')}</label>
                            <div class="col-md-9">
                                <div class="mt-checkbox-inline">
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[register][field][]" value="username" {if dr_in_array('username', (array)$data.register.field)} checked{/if} /> {dr_lang('账号')} <span></span></label>
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[register][field][]" value="phone" {if dr_in_array('phone', (array)$data.register.field)} checked{/if} /> {dr_lang('手机号')} <span></span></label>
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[register][field][]" value="email" {if dr_in_array('email', (array)$data.register.field)} checked{/if} /> {dr_lang('邮箱')} <span></span></label>
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[register][field][]" value="name" {if dr_in_array('name', (array)$data.register.field)} checked{/if} /> {dr_lang('姓名')} <span></span></label>
                                </div>
                                <span class="help-block">{dr_lang('至少选择一个字段或多个字段组合')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册字段验证')}</label>
                            <?php
                            if (!isset($data.register.field_y)) {
                                $data.register.field_y = ['email', 'phone'];
                            }
                            ?>
                            <div class="col-md-9">
                                <div class="mt-checkbox-inline">
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[register][field_y][]" value="username" checked disabled="disabled" /> {dr_lang('账号')} <span></span></label>
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[register][field_y][]" value="phone" {if dr_in_array('phone', (array)$data.register.field_y)} checked{/if} /> {dr_lang('手机号')} <span></span></label>
                                    <label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[register][field_y][]" value="email" {if dr_in_array('email', (array)$data.register.field_y)} checked{/if} /> {dr_lang('邮箱')} <span></span></label>
                                </div>
                                <span class="help-block">{dr_lang('对以上字段进行格式验证，不勾选表示不验证格式')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('随机用户名前缀')}</label>
                            <div class="col-md-9">
                                <label><input class="form-control" type="text" name="data[register][unprefix]" value="{htmlspecialchars((string)$data['register']['unprefix'])}" ></label>
                                <span class="help-block">{dr_lang('当注册字段没有选择"账号"时，系统会随机注册一个账号，格式为：前缀+随机用户名字符')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册短信验证')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[register][sms]" value="1" {if $data['register']['sms']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('注册字段必须包含手机号码才能使用此功能，用于手机短信验证码')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册邮件验证')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[register][email]" value="1" {if $data['register']['email']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('注册字段必须包含邮件才能使用此功能，用于邮件验证码')}</span>
                            </div>
                        </div>

                        {if ($data['register']['sms'] || $data['register']['email']) && !SYS_SMS_IMG_CODE}
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册图片验证码')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" readonly name="data[register][code]" value="1" checked data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('当开启注册短信验证后将会强制验证图片验证码')}</span>
                            </div>
                        </div>
                        {else}
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册图片验证码')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[register][code]" value="1" {if $data['register']['code']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('网页中的图片验证码')}</span>
                            </div>
                        </div>
                        {/if}
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册审核方式')}</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[register][verify]" value="" {if empty($data['register']['verify'])}checked{/if} /> {dr_lang('关闭')} <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[register][verify]" value="email" {if $data['register']['verify']=='email'}checked{/if} /> {dr_lang('邮件审核')} <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[register][verify]" value="phone" {if $data['register']['verify']=='phone'}checked{/if} /> {dr_lang('短信审核')} <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[register][verify]" value="admin" {if $data['register']['verify']=='admin'}checked{/if} /> {dr_lang('人工审核')} <span></span></label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('不允许账号的字符串')}</label>
                            <div class="col-md-9">
                                <textarea class="form-control" style="height:150px; width:100%;" name="data[register][notallow]">{$data['register']['notallow']}</textarea>
                                <span class="help-block">{dr_lang('设置不允许包含在账号中的字符串，多个字符串以逗号“,”分隔')}</span>
                            </div>
                        </div>

                    </div>
                </div>

                <div class="tab-pane {if $page==2}active{/if}" id="tab_2">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('登录模式')}</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[oauth][login]" value="0" {if empty($data['oauth']['login'])}checked{/if} /> {dr_lang('绑定账号')} <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[oauth][login]" value="1" {if $data['oauth']['login']}checked{/if} /> {dr_lang('自动创建')} <span></span></label>
                                </div>
                                <span class="help-block">{dr_lang('绑定账号是指将登录已有账号或者注册新账号并绑定到第三方登录中；自动创建是指当第三方登录未绑定账号时就自动创建一个账号')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('注册字段填写')}</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[oauth][field]" value="0" {if empty($data['oauth']['field'])}checked{/if} /> {dr_lang('注册后填写')} <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[oauth][field]" value="1" {if $data['oauth']['field']}checked{/if} /> {dr_lang('注册时填写')} <span></span></label>
                                </div>
                                <span class="help-block">{dr_lang('在快捷登录注册账号时，是否让用户填写自定义字段信息')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('接入商账号设置')}</label>
                            <div class="col-md-9">
                                <table class="table table-striped table-bordered table-hover table-checkable dataTable">
                                    <thead>
                                    <tr class="heading">
                                        <th width="150"> {dr_lang('接入商')} </th>
                                        <th> {dr_lang('参数设置')} </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {loop $oauth $dir $t}
                                    <tr class="odd gradeX">
                                        <td>{$t.name}</td>
                                        <td>
                                            {php $diyfile = FCPATH.'ThirdParty/OAuth/'.ucfirst($dir).'/Config.html';}
                                            {if is_file($diyfile)}
                                            {load $diyfile}
                                            {else}
                                            <label><input class="form-control" name="data[oauth][{$dir}][id]" type="text" value="{htmlspecialchars((string)$data['oauth'][$dir]['id'])}"></label>
                                            <label><input class="form-control" name="data[oauth][{$dir}][value]" type="text" value="{htmlspecialchars((string)$data['oauth'][$dir]['value'])}"></label>
                                            {/if}
                                            {if $t.help}<label><a href="javascript:dr_help({$t.help});">{dr_lang('申请接口')}</a></label>{/if}
                                        </td>
                                    </tr>
                                    {/loop}
                                    {if dr_is_app('weixin')}
                                    <tr class="odd gradeX">
                                        <td>{dr_lang('微信公众号')}</td>
                                        <td>
                                            <input type="checkbox" name="data[oauth][wechat][id]" value="1" {if $data['oauth']['wechat']['id']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                            &nbsp;{dr_lang('用于关注微信公众号绑定账号使用')}
                                        </td>
                                    </tr>
                                    {/if}
                                    </tbody>
                                </table>
                                {if !IS_OEM_CMS}
                                <p style="margin-top:10px;">
                                    <a href="https://www.xunruicms.com/api/xunrui.php?at=login" class="btn blue btn-sm" target="_blank">
                                        <i class="fa fa-cloud-download"></i> {dr_lang('更多登陆方式')}
                                    </a>
                                </p>
                                {/if}
                            </div>
                        </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')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    $(function() {
        $(".field-sort-items").sortable();
    });
</script>
{template "footer.html"}