<%@ 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" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp"><jsp:param name="modal_title" value="新增"/></jsp:include>
<form id="formAdd" action="<%=basePath%>/ms/addPollutionIndex.action" method="post" role="form">
    <input type="hidden" id="editYear" value="${outputModel.adata}">
    <input type="hidden" id="id" name="id" value="${outputModel.id}">
    <div class="form-group">
        <label for="adata">日期</label>
        <div class="input-group date">
            <input type="text" id="adata" name="adata" class="form-control" value="<fmt:formatDate value='${outputModel.adata}' pattern='yyyy-MM-dd'/>"/>
            <span class="input-group-addon">
                <span class="glyphicon glyphicon-calendar"></span>
            </span>
        </div>
    </div>
    <div class="form-group">
        <label for="quatity">污染值</label>
        <input type="text" id="quatity" name="quatity" class="form-control" value="${outputModel.quatity}"/>
        <span class="field-validation-valid help-block"></span>
    </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>
<script type="text/javascript">
    $("#btnSave").click(function() {
        /*var qua=$('#quantity').val();
        if(qua ==null ||qua ==''){
            alert("等级值不能为空！！");
            return;
        }
        if(qua<0 || qua>100){
            alert("等级值必须在0到100之间！！");
            return;
        }*/
        $('#formAdd').ajaxSubmitCloseRefresh();
    });

    $(".input-group.date").datetimepicker({
        format: "YYYY-MM-DD",
        locale: "zh-cn"
    });
</script>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>