add.html 2.71 KB
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增前台用户')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-frontUser-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">登录账号:</label>
				<div class="col-sm-8">
					<input id="loginName" name="loginName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">密码:</label>
				<div class="col-sm-8">
					<input id="password" name="password" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">用户昵称:</label>
				<div class="col-sm-8">
					<input id="userName" name="userName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">用户类型:</label>
				<div class="col-sm-8">
					<div class="input-group" style="width: 100%">
						<select name="userType" class="form-control m-b" th:with="type=${@dict.getType('fount_user_type')}">
							<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
						</select>
					</div>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">用户邮箱:</label>
				<div class="col-sm-8">
					<input id="email" name="email" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">手机号码:</label>
				<div class="col-sm-8">
					<input id="phoneNumber" name="phoneNumber" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">用户状态:</label>
				<div class="col-sm-8">
					<label class="toggle-switch switch-solid">
						<input type="checkbox" id="status" checked>
						<span></span>
					</label>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注:</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" class="form-control"></textarea>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "front/frontUser"
		$("#form-frontUser-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-frontUser-add').serialize());
	        }
	    }
	</script>
</body>
</html>