<%inherit file="base.html"/>
<%def name="head()">
<script>
    % if not permit.match('/param/update'):
    $(document).ready(function (){
        $("input").each(function() { 
            $(this).attr("readonly", 'readonly');  
        })  
        $("textarea").each(function() { 
            $(this).attr("readonly", 'readonly');  
        })   
        $("#submit").hide();
    });
    % endif
    $(function () {
        $('[data-toggle="popover"]').popover()
    })
</script>
</%def>
<%def name="body()">
<div class="panel panel-default">
    <div class="panel-heading"><span class="glyphicon glyphicon-th"></span> 系统参数管理 </div>
        <div class="panel-body">
            <div role="tabpanel">

                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="${active=='syscfg' and 'active' or '' }">
                        <a href="#syscfg" aria-controls="syscfg" role="tab" data-toggle="tab">系统设置</a>
                    </li>
                    <li role="presentation" class="${active=='servcfg' and 'active' or '' }">
                        <a href="#servcfg" aria-controls="servcfg" role="tab" data-toggle="tab">自助服务</a>
                    </li>
                    <li role="presentation" class="${active=='notifycfg' and 'active' or '' }">
                        <a href="#notifycfg" aria-controls="notifycfg" role="tab" data-toggle="tab">到期提醒</a>
                    </li>
                    <li role="presentation" class="${active=='mailcfg' and 'active' or '' }">
                        <a href="#mailcfg" aria-controls="mailcfg" role="tab" data-toggle="tab">邮件服务器</a>
                    </li>
                    <li role="presentation" class="${active=='radcfg' and 'active' or '' }">
                        <a href="#radcfg" aria-controls="radcfg" role="tab" data-toggle="tab">Radius设置</a>
                    </li>
                </ul>

                <!-- Tab panes -->
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane ${active=='syscfg' and 'active' or '' }" id="syscfg">
                        <form class="form-horizontal form-well" role="form" action="${sys_form.action}" method="post">
                            ${sys_form.render_css()}
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane ${active=='servcfg' and 'active' or '' }"  id="servcfg">
                        <form class="form-horizontal form-well" role="form" action="${serv_form.action}" method="post">
                            ${serv_form.render_css()}
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane ${active=='notifycfg' and 'active' or '' }" id="notifycfg">
                        <form class="form-horizontal form-well" role="form" action="${notify_form.action}" method="post">
                            ${notify_form.render_css()}
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane ${active=='mailcfg' and 'active' or '' }" id="mailcfg">
                        <form class="form-horizontal form-well" role="form" action="${mail_form.action}" method="post">
                            ${mail_form.render_css()}
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane ${active=='radcfg' and 'active' or '' }" id="radcfg">
                        <form class="form-horizontal form-well" role="form" action="${rad_form.action}" method="post">
                            ${rad_form.render_css()}
                        </form>
                    </div>
                </div>

            </div>

        </div>
    </div>
</div>
</%def>