<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
<br/>
<sec:authorize access="hasRole('ADMIN')">
<smvc:form action="../admin/group.form" modelAttribute="groupForm">
	<input type="hidden" name="redirectParams" value="<c:out value="${requestScope['javax.servlet.forward.query_string']}" />" />
	<input type="hidden" name="method" value="save" id="dispatchMethod"/>
	<table  class="dialogbox">
		<tr>
			<td colspan='2'  class="dialogTitle">Group Details</td>
		</tr>
		<tr>
			<td class="label">Name</td>
			<td class="input"><smvc:input path="group.name"/></td>
		</tr>
		<tr>
			<td class="label">Members:</td>
			<td class="input">
				<c:forEach var="user" items="${groupForm.users }">
					<smvc:checkbox path="selected" value="${user.username }"/><c:out value="${user.username }"/><br/>
				</c:forEach>
			</td>
		</tr>
		<tr>
			<td class="input" colspan="2" align="right">
				<input type="reset"/>
				&nbsp;
				<input type="submit" value="Save"/>
			</td>
		</tr>
	</table>
</smvc:form></sec:authorize>