<%@ include file="/includes.jsp" %>
<br/>
<sec:authorize access="hasRole('ADMIN')">
<form action="../emdt/notification.form" >
	<input type="hidden" name="method" value="save" id="dispatchMethod"/>
	<table width="500" >
		<tr>
			<td>
			<div class="table">
			<div class="tableTitleBar">Form Notifications</div>
				<div class="tableContent">
			
					<table class="table" cellpadding="3" cellspacing="0">
						<tr>
							<th>Description</th>
							<th width="1%" align="center">Select</th>
						</tr>
						<c:if test="${empty emdt.notifications}">
							<tr>
								<td colspan="2" align="center">-- No notifications defined --</td>
							</tr>
						</c:if>
						
						<webapp:forEach id="n" items="${emdt.notifications}" statusId="s">
							<tr class="<c:out value="${s.oddOrEven}"/>Row">
								<td><a href="../emdt/editNotification.form?id=<c:out value="${n.id}"/>" title="Click to edit this notification"><c:out value="${n.description}"/></a></td>
								<td width="1%" align="center"><input type="checkbox" name="selected" value="<c:out value="${n.id}"/>"/></td>
							</tr>
						</webapp:forEach>
						<c:if test="${not empty emdt.notifications}">
							<tr>
								<td></td>
								<td align="center"><input type="submit" value="Delete" onclick="return confirmAndDispatch('deleteSelected', 'Are you sure you wish to delete the selected items?')"/></td>
							</tr>
						</c:if>
						
					</table>
				</div>
			</div>
			</td>
		</tr>
		<tr>
			<td><input type="button" value="New Notification..." onclick="document.location='../emdt/editNotification.form?id=new'"/></td>
		</tr>
	</table>
</form></sec:authorize>