<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String basePath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="../../../common/admin/head.jsp"></jsp:include>
</head>
<body>
    <jsp:include page="../../../common/admin/body_pre.jsp"></jsp:include>
    <div class="row hidden-print">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h2>通知服务</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="javascript:void(0);" >短信通知服务</a>
                        </li>
                        <li class="active">
                            <strong>短信通知服务</strong>
                        </li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <div class="row hidden-print">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <span>请添加通知服务：</span>
                </div>
                <div class="ibox-content">
    <input type="hidden" name="formSerialize" />
    <input type="hidden" name="pageNo" value="1" />
    <form id="formSearch" action="<%=basePath%>/admin/smsswitch/add.action" method="get" class="form-inline">
        <div class="form-group">
            <label for="fullName">功能编码</label>
            <input type="text" id="fullName" name="funcCode" class="form-control" />
        </div>
        <div class="form-group">
            <label for="isSend">是否发送</label>
            <select id="isSend" name="isSend">
                <option value="1">是</option>
                <option value="0">否</option>
            </select>
        </div>
        <div class="form-group">
            <button id="btnSearch" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i>添加</button>
        </div>
        <div class="form-group">
        <button id="btnReset" type="button" class="btn btn-sm btn-primary"></i>重置</button>
        </div>
    </form>
    <jsp:include page="../../../common/admin/search_post.jsp"></jsp:include>
    <jsp:include page="../../../common/admin/grid_pre.jsp"></jsp:include>
    <jsp:include page="../../../common/admin/grid_middle.jsp"></jsp:include>
    <div id="divGrid">
    </div>
    <jsp:include page="../../../common/admin/grid_post.jsp"></jsp:include>
    <jsp:include page="../../../common/admin/body_post.jsp"></jsp:include>
    <script type="text/javascript">
        function search() {
            var formSerialize = $("input[type='hidden'][name='formSerialize']").val();
            var pageNo = $("input[type='hidden'][name='pageNo']").val();
            var formData = formSerialize + "&pageNo=" + pageNo;
            $("#divGrid").renderPartial({ url: "<%=basePath%>/admin/smsswitch/smsswitchList.action", data: formData });
        }

        $("#btnSearch").click(function () {
            $("input[type='hidden'][name='pageNo']").val(1);
            $("input[type='hidden'][name='formSerialize']").val($("#formSearch").serialize());
            search();
        });

        $("#btnReset").click(function () {
            $('#formSearch').resetForm();
        });
        search();
    </script>
</body>
</html>