<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>Open Park</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="<%=path%>/static/css/font.css">
    <link rel="stylesheet" href="<%=path%>/static/css/xadmin.css">
    <script type="text/javascript" src="<%=path%>/static/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="<%=path%>/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="<%=path%>/static/js/xadmin.js"></script>
    <script>
        var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引
        $(function(){
            var flag = "${flag }";
            if(flag == 1){
                parent.layer.alert("增加成功", {icon: 6}, function () {
                    parent.location.reload();
                    parent.layer.close(index); //执行关闭
                });
            }
        });
    </script>
</head>

<body>
<div class="x-body">
    <form class="layui-form" id="addForm" action="<%=path %>/pageTemplate/add" method="post">
        <div class="layui-form-item">
            <label for="pageName" class="layui-form-label">
                <span class="x-red">*</span>模板名称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="pageName" name="pageName" required="" lay-verify="required"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="pagePath" class="layui-form-label">
                <span class="x-red">*</span>模板路径
            </label>
            <div class="layui-input-inline">
                <input type="text" id="pagePath" name="pagePath" required="" lay-verify="required"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="pageImag" class="layui-form-label">
                <span class="x-red">*</span>模板图片
            </label>
            <div class="layui-input-block">
                <input type="text" id="pageImag" name="pageImag" required="" lay-verify="required"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="pageFrame" class="layui-form-label">
                <span class="x-red">*</span>所属框架
            </label>
            <div class="layui-input-block">
                <input type="checkbox" name="pageFrame" value="ssm" lay-skin="primary" title="ssm">
                <input type="checkbox" name="pageFrame" value="ssh" lay-skin="primary" title="ssh">
                <input type="checkbox" name="pageFrame" value="jsp" lay-skin="primary" title="jsp">
                <input type="checkbox" name="pageFrame" value="ssm-custom" lay-skin="primary" title="ssm-custom">
                <input type="checkbox" name="pageFrame" value="ssm-maven" lay-skin="primary" title="ssm-maven">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="pageDesc" class="layui-form-label">
                <span class="x-red">*</span>模板描述
            </label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" id="pageDesc" name="pageDesc" class="layui-textarea"></textarea>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
            </label>
            <button  class="layui-btn" lay-filter="add" lay-submit="">
                增加
            </button>
        </div>
    </form>
</div>
</body>
</html>