<%@ 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="editForm" action="<%=path %>/colunm/update" method="post">
        <input type="hidden" value="${colunm.id}" name="id">
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>字段名
            </label>
            <div class="layui-input-inline">
                <input type="text" id="colunmName" name="colunmName" required="" lay-verify="required"
                       autocomplete="off" value="${colunm.colunmName}" class="layui-input" readonly>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>属性名
            </label>
            <div class="layui-input-inline">
                <input type="text" id="filedName" name="filedName" required="" lay-verify="required"
                       autocomplete="off" value="${colunm.filedName}" class="layui-input" readonly>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>字段类型
            </label>
            <div class="layui-input-inline">
                <input type="text" id="colunmType" name="colunmType" required="" lay-verify="required"
                       autocomplete="off" value="${colunm.colunmType}" class="layui-input" readonly>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>显示名称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="showName" name="showName"
                       autocomplete="off" value="${colunm.showName}" 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="username" class="layui-form-label">
                <span class="x-red">*</span>编辑方式
            </label>
            <div class="layui-input-inline">
                <select id="editStyle" name="editStyle" class="valid">
                    <option value="1" <c:if test="${colunm.editStyle == 1}">selected</c:if>>输入框</option>
                    <option value="2" <c:if test="${colunm.editStyle == 2}">selected</c:if>>密码框</option>
                    <option value="3" <c:if test="${colunm.editStyle == 3}">selected</c:if>>下拉框</option>
                    <option value="4" <c:if test="${colunm.editStyle == 4}">selected</c:if>>复选框</option>
                    <option value="5" <c:if test="${colunm.editStyle == 5}">selected</c:if>>单选框</option>
                    <option value="6" <c:if test="${colunm.editStyle == 6}">selected</c:if>>文本域</option>
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>是否显示
            </label>
            <div class="layui-input-inline">
                <input type="radio" name="isShowed" required="" lay-verify="required"
                       autocomplete="off" value="0" class="layui-input" title="显示" <c:if test="${colunm.isShowed == 0}">checked</c:if>>
                <input type="radio" name="isShowed" required="" lay-verify="required"
                       autocomplete="off" value="1" class="layui-input" title="不显示" <c:if test="${colunm.isShowed == 1}">checked</c:if>>
            </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="edit" lay-submit="">
                修改
            </button>
        </div>
    </form>
</div>
</body>
</html>