<form id="userForm" class="form-horizontal col-xs-12" action="/user/do_add" method="post">
	<input id="userOrgId" name="org.id" type="hidden"/>
		
	<div class="space-12"></div>
	
	<div class="form-group">
		<label class="col-xs-2 control-label no-padding-right"><font color="red">* </font>登录名：</label>
		<div class="col-xs-9">
			<input name="loginName" type="text" class="form-control">
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-xs-2 control-label no-padding-right"><font color="red">* </font>用户名：</label>
		<div class="col-xs-9">
			<input name="name" type="text" class="form-control">
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-xs-2 control-label no-padding-right"><font color="red">* </font>密码：</label>
		<div class="col-xs-9">
			<input id="password1" name="password" type="password" class="form-control">
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-xs-2 control-label no-padding-right"><font color="red">* </font>确认密码：</label>
		<div class="col-xs-9">
			<input id="password2" name="password2" type="password" class="form-control">
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-xs-2 control-label no-padding-right"><font color="red">* </font>手机：</label>
		<div class="col-xs-9">
			<input name="phone" id="phone" type="text" class="form-control" maxlength="11">
		</div>
	</div>
	
	<div class="form-group" th:if="${globalUser.loginName} == 'admin'" >
		<label class="col-xs-2 control-label no-padding-right">超级管理员：</label>
		<div class="col-xs-9 radio">
			<label> 
			  <input name="admin" type="radio" class="ace" value="true"/>
			  <span class="lbl">是</span>
			</label>
			 <label> 
			   <input name="admin" type="radio" class="ace" value="false" checked="checked" /> 
			   <span class="lbl">否</span>
			</label>
		</div>
	</div>
	
	<!-- <div class="form-group">
		<label class="col-xs-2 control-label no-padding-right">用户类型：</label>
			<div class="col-xs-9">
				<label>
					<select name="userType.id" tag:option="userType"></select>
					<span class="lbl" style="top:7px;"></span>
				</label>
			</div>
	</div> -->
	
	<div class="form-group" th:if="${not #lists.isEmpty(roles)}">
	    <label class="col-xs-2 control-label no-padding-right">角色：</label>
	    <div class="col-xs-9 form-input-group userRole_align">
		    	<span th:each="role,iterStatus:${roles}">
					<label>
						<input th:name="'roles['+${iterStatus.index}+'].id'" type="checkbox" class="ace" th:value="${role.id}" />
							<span class="lbl" th:text="${role.name}"></span>
					</label>
		    		<label>
						<input th:name="'roles['+${iterStatus.index}+'].admin'" type="checkbox" class="ace" value="true" />
							<span class="lbl" th:text="''+${role.name}+'的管理员'"></span>
					</label>
		    	</span>
		</div>
	</div>
	
	<input type="hidden" th:if="${#lists.isEmpty(roles)}" value="0" name="rolesEmpty"/>
	<input type="hidden" th:if="${not #lists.isEmpty(roles)}" value="1" name="rolesEmpty"/>
</form>

<script src="/js/sys/user/userAdd.js"></script>
