purgeactionlog.jsp

来自「Java的框架」· JSP 代码 · 共 139 行

JSP
139
字号
<%@ include file="/common/taglibs.jsp"%>


<head>
    <title><fmt:message key="actionLogs.title"/></title>
    
    <content tag="heading"><fmt:message key="actionLogs.purge.heading"/></content>
</head>

<fmt:message key="actionLogs.purge.message"/>

<div class="separator"></div>

<script type="text/javascript" src="<c:url value='/scripts/popupcalendar/popUpCal.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/validation.js'/>"></script>

<script type="text/javascript">
pUCImgDir =  "<c:url value="/scripts/popupcalendar/" />";
drawPopUpCalendar ();
</script>


<form method="post" action="<c:url value="/purgeActionLog.action"/>" name="purgeForm" 
			onsubmit="return onFormSubmit(this)" id="purgeForm">

<table class="detail">

<c:set var="pageButtons">
    <tr>
    	<td></td>
    	<td class="buttonBar">
    		<input type="submit" class="button" name="purge" onclick="return confirmPurge()" value="<fmt:message key="button.purge"/>" />
        <input type="submit" class="button" name="cancel" value="<fmt:message key="button.cancel"/>" />
    	</td>
    </tr>
</c:set>

		<tr>
    	<th>
      	<mcaps:label key="actionLog.username"/>
     	</th>
      <td>
      	<mcaps:userList key="userList" scope="page" />
      	
      	<select name="username" id="username">
					<option value="All" <c:if test="${param.username == 'ALL'}">selected</c:if>>All</option>
					<c:forEach items="${userList}" var="user">
						<option value="<c:out value="${user.value}"/>" 
						<c:if test="${user.value == param.username}">selected</c:if>><c:out value="${user.label}"/></option> 
					</c:forEach>	
				</select>	
      </td>
    </tr>
    <tr>
    	<th>
      	<mcaps:label key="actionLog.startDate"/>
     	</th>
      <td>
      	<input type="text" name="start_date_dd" value="<c:out value="${param.start_date_dd}" />" size="2">
				<input type="text" name="start_date_mm" value="<c:out value="${param.start_date_mm}" />" size="2">
				<input type="text" name="start_date_yyyy" value="<c:out value="${param.start_date_yyyy}" />" size="4">
				<input type=button onClick="popUpCalendar (event, document.purgeForm.start_date_dd,document.purgeForm.start_date_mm,document.purgeForm.start_date_yyyy)" value='...'>
     		(dd mm yyyy)
			</td>
    </tr>
    
    <tr>
    	<th>
      	<mcaps:label key="actionLog.endDate"/>
     	</th>
      <td>
      	<input type="text" name="end_date_dd" value="<c:out value="${param.end_date_dd}" />" size="2">
				<input type="text" name="end_date_mm" value="<c:out value="${param.end_date_mm}"/>" size="2">
				<input type="text" name="end_date_yyyy" value="<c:out value="${param.end_date_yyyy}"/>" size="4">
				<input type=button onClick="popUpCalendar (event, document.purgeForm.end_date_dd,document.purgeForm.end_date_mm,document.purgeForm.end_date_yyyy)" value='...'>
     		(dd mm yyyy)
			</td>
    </tr>
    
<%-- Print out buttons - defined at top of form --%>
    <%-- This is so you can put them at the top and the bottom if you like --%>
	<c:out value="${pageButtons}" escapeXml="false" />

</table>
</form>

<script type="text/javascript">
<!--

highlightFormElements();

<c:set var="focus" value="username"/>

var focusControl = document.forms["purgeForm"].elements["<c:out value="${focus}"/>"];

if (focusControl.type != "hidden" && !focusControl.disabled) {
    focusControl.focus();
}

function confirmPurge () {
    
	var msg = "Are you sure you want to purge action logs based on the condition entered?";
 	ans = confirm(msg);
  if (ans) {
  	return true;
 	} else {
  	return false;
 	}
}

function onFormSubmit (form) {

	var ok = validateDate (form.start_date_dd, form.start_date_mm, form.start_date_yyyy);
	
	if (ok) {
		ok = validateDate (form.end_date_dd, form.end_date_mm, form.end_date_yyyy);
	}
	
	return ok;
	
}
	
function 	validateDate (day, month, year) {
	
	if (isWhitespace (day.value) && isWhitespace (month.value) && isWhitespace (year.value))
		return true;
		
	if (!isDate (year.value, month.value, day.value)) {
		alert ("Please specified a correct date format (dd mm yyyy)");
		day.focus ();
		return false;	
	}
	
	return true;
}

-->
</script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?