Commit 23e9d3d2 by Java-李昕颖

jsp验证修改

parent d1158b53
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
$("#userList").html($(data)); $("#userList").html($(data));
}, },
error:function(){ error:function(){
alert("数据错误!"); alert("请选择需要移交的数据!");
}, },
complete: function () { complete: function () {
$("#btnSearch").removeAttr("disabled"); $("#btnSearch").removeAttr("disabled");
......
...@@ -9,13 +9,18 @@ ...@@ -9,13 +9,18 @@
$(document).ready(function () { $(document).ready(function () {
$("#inputForm").validate({ $("#inputForm").validate({
submitHandler: function (form) { submitHandler: function (form) {
if ($("#reportContent").val() == ""){
top.$.jBox.tip('请填写内容', 'warning');
}else {
submitCount += 1; submitCount += 1;
if(submitCount == 1){ if (submitCount == 1) {
$("#checkFile").hide();
loading('正在提交,请稍等...'); loading('正在提交,请稍等...');
form.submit(); form.submit();
}else{ } else {
return false; return false;
} }
}
}, },
errorContainer: "#messageBox", errorContainer: "#messageBox",
errorPlacement: function (error, element) { errorPlacement: function (error, element) {
...@@ -62,6 +67,7 @@ ...@@ -62,6 +67,7 @@
<label class="control-label">内容:</label> <label class="control-label">内容:</label>
<div class="controls"> <div class="controls">
<form:textarea id="reportContent" htmlEscape="true" path="reportContent" rows="4" maxlength="500" class="input-xxlarge"/> <form:textarea id="reportContent" htmlEscape="true" path="reportContent" rows="4" maxlength="500" class="input-xxlarge"/>
<span class="help-inline"><font color="red">*</font> </span>
</div> </div>
</div> </div>
</div> </div>
...@@ -78,22 +84,19 @@ ...@@ -78,22 +84,19 @@
<div class="control-group"> <div class="control-group">
<label class="control-label">姓名:</label> <label class="control-label">姓名:</label>
<div class="controls"> <div class="controls">
<form:input path="reportPersonName" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportPersonName" htmlEscape="false" maxlength="200" class="input-xlarge"/>
<span class="help-inline"><font color="red">*</font> </span>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">手机号:</label> <label class="control-label">手机号:</label>
<div class="controls"> <div class="controls">
<form:input path="reportPersonTel" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportPersonTel" htmlEscape="false" maxlength="200" class="input-xlarge"/>
<span class="help-inline"><font color="red">*</font> </span>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">Email:</label> <label class="control-label">Email:</label>
<div class="controls"> <div class="controls">
<form:input path="reportPersonEmail" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportPersonEmail" htmlEscape="false" maxlength="200" class="input-xlarge"/>
<span class="help-inline"><font color="red">*</font> </span>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
......
...@@ -53,10 +53,7 @@ ...@@ -53,10 +53,7 @@
<c:forEach items="${noticePage.list}" var="notice" varStatus="vs"> <c:forEach items="${noticePage.list}" var="notice" varStatus="vs">
<tr> <tr>
<td>${vs.count}</td> <td>${vs.count}</td>
<td> <td><a href="${ctx}/notice/view?id=${notice.id}&reportId=${notice.reportId}">${notice.title}。</a></td>
<c:if test="${isAdmin eq 'Y'}"><a href="${ctx}/notice/view?id=${notice.id}&reportId=${notice.reportId}">${notice.title}。</a></c:if>
<c:if test="${isAdmin eq 'N'}"><a href="${ctx}/notice/view?id=${notice.id}&reportId=${notice.reportId}">${notice.title}。</a></c:if>
</td>
<td>${notice.sendTime}</td> <td>${notice.sendTime}</td>
<td>${notice.sendFromId}</td> <td>${notice.sendFromId}</td>
<td> <td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment