<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp">
    <jsp:param name="modal_title" value="新增"/>
</jsp:include>
<form id="addEducation" action="<%=basePath%>/admin/msEducation/add.action" method="post" enctype="multipart/form-data" class="form-horizontal">
        <div class="form-group">
            <input id="parentCode" name="parentCode" type="hidden">
            <input id="orgType" name="orgType" type="hidden">
            <label class="col-lg-4 text-right"><span style="color: red;">*</span>机构类型</label>
            <div class="col-md-7 col-sm-7">
                <c:forEach items="${orgTypeList}" var="item">
                <input type="radio" name="orgType"  value="${item.key}" />${item.key}
                </c:forEach>
                <span class="field-validation-valid help-block"></span>
            </div>
        </div>
        <div class="form-group">
            <label for="orgName" class="col-lg-4 text-right"><span style="color: red;">*</span>机构名称</label>
            <div class="col-sm-7">
                <input type="text" id="orgName" name="orgName" class="form-control"/>
                <span class="field-validation-valid help-block"></span>
            </div>
        </div>
        <div class="form-group">
            <label for="fileImg" class="col-lg-4 text-right"><span style="color: red;">*</span>资源图片</label>
            <div class="col-md-7 col-sm-7">
                <input id="fileImg" type="file" name="fileImg" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
                <span class="help-block"></span>
            </div>
        </div>
</form>
<jsp:include page="../../../common/admin/modal_content_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_pre.jsp"></jsp:include>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"></i>取消</button>
<button type="button" id="btnSave" class="btn btn-primary"><i class="fa fa-check"></i>保存</button>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>
<script type="text/javascript">
    $("#btnSave").click(function () {
        $('#parentCode').val($('#code').val()) ;
        $('#orgType').val($('#type').valid()) ;
        $('#addEducation').ajaxSubmitCloseRefresh();
    });

</script>