完善用户中心功能
This commit is contained in:
@@ -57,7 +57,7 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
//验证通过提交表单
|
||||
var submitResult = Form.api.submit($(ret), function (data, ret) {
|
||||
that.holdSubmit(false);
|
||||
// submitBtn.removeClass("disabled");
|
||||
submitBtn.removeClass("disabled").removeAttr('disabled');
|
||||
if (false === $(this).triggerHandler("success.form", [data, ret])) {
|
||||
return false;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
if (false === $(this).triggerHandler("error.form", [data, ret])) {
|
||||
return false;
|
||||
}
|
||||
submitBtn.removeClass("disabled");
|
||||
submitBtn.removeClass("disabled").removeAttr('disabled');
|
||||
if (typeof error === 'function') {
|
||||
if (false === error.call($(this), data, ret)) {
|
||||
return false;
|
||||
@@ -98,7 +98,7 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
}, form.data("validator-options") || {}));
|
||||
|
||||
//移除提交按钮的disabled类
|
||||
$("button.btn[type=submit]", form).removeClass("disabled");
|
||||
$("button.btn[type=submit]", form).removeClass("disabled").removeAttr('disabled');
|
||||
},
|
||||
editor: function (form) {
|
||||
//绑定编辑器元素事件
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {background-color: #fff; color: #636b6f; font-family: 'Raleway', sans-serif; font-weight: 100; height: 100vh; margin: 0;}
|
||||
.full-height {height: 100vh;}
|
||||
.top{text-align: right; line-height: 35px; padding: 0 20px;}
|
||||
.top a{color: #333333; padding: 0 10px}
|
||||
.full-height {height: 90vh;}
|
||||
.flex-center {align-items: center;display: flex;justify-content: center;}
|
||||
.position-ref {position: relative;}
|
||||
.top-right {position: absolute;right: 10px;top: 18px;}
|
||||
@@ -21,6 +23,10 @@ html, body {background-color: #fff; color: #636b6f; font-family: 'Raleway', sans
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="top">
|
||||
<a href="{:url('/user/index/register')}">注册</a>
|
||||
<a href="{:url('/user/index/login')}">登录</a>
|
||||
</div>
|
||||
<div class="flex-center position-ref full-height">
|
||||
<div class="content">
|
||||
<div class="title m-b-md">
|
||||
|
||||
3
public/template/default/static/css/style.css
Normal file
3
public/template/default/static/css/style.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.reg-box, .log-box,.foret-box{margin-top: 30px; padding: 10px; height: 460px; background: #ffffff; border-radius: 4px;}
|
||||
.reg-box .title, .log-box .title{font-size: 16px; margin: 15px auto; font-weight: bold; border-bottom: 1px solid #dedede; line-height: 35px; padding: 0 10px;}
|
||||
.foret-box .body-content{width: 480px; margin: 40px auto;}
|
||||
@@ -6,6 +6,7 @@
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>用户中心</title>
|
||||
<link rel="stylesheet" type="text/css" href="__static__/common/css/main.css?time={:time()}">
|
||||
<link rel="stylesheet" type="text/css" href="__css__/style.css?time={:time()}">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
|
||||
83
public/template/default/user/index_forget.html
Normal file
83
public/template/default/user/index_forget.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>用户中心</title>
|
||||
<link rel="stylesheet" type="text/css" href="__static__/common/css/main.css?time={:time()}">
|
||||
<link rel="stylesheet" type="text/css" href="__css__/style.css?time={:time()}">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="__static__/common/js/html5shiv.js"></script>
|
||||
<script src="__static__/common/js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="hold-transition skin-blue sidebar-mini layout-top-nav">
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<nav class="navbar navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a href="{:url('/user/index/index')}" class="navbar-brand"><b>忘记密码</b></a>
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.navbar-custom-menu -->
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Full Width Column -->
|
||||
<div class="content-wrapper">
|
||||
<div class="container">
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="foret-box">
|
||||
<div class="body-content">
|
||||
<!-- 修改密码表单 -->
|
||||
<form method="post" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">用户名:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="username" class="form-control " data-rule="required" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">邮箱:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="email" class="form-control " data-rule="required;email" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-success submit-btn">确认提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> 4.x
|
||||
</div>
|
||||
<strong>Copyright © 2013-2020 <a href="https://www.tensent.cn">SentCMS</a>.</strong> All rights
|
||||
reserved.
|
||||
</footer>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var require = {
|
||||
config: {"site": {$config|json_encode|raw}, 'module': 'admin', 'jsname': "{$require['jsname']|default=''}", 'actionname': "{$require['actionname']|default=''}", }
|
||||
}
|
||||
</script>
|
||||
<script src="__plugins__/require/require.js" data-main="__js__/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,6 +6,7 @@
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>用户中心</title>
|
||||
<link rel="stylesheet" type="text/css" href="__static__/common/css/main.css?time={:time()}">
|
||||
<link rel="stylesheet" type="text/css" href="__css__/style.css?time={:time()}">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -34,6 +35,35 @@
|
||||
<div class="container">
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="log-box row">
|
||||
<div class="col-sm-6"></div>
|
||||
<div class="col-sm-6">
|
||||
<h3 class="title">用户登录</h3>
|
||||
<!-- 修改密码表单 -->
|
||||
<form method="post" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">用户名:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="username" class="form-control " data-rule="required" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="password" class="form-control " data-rule="required;password" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-7">
|
||||
<button type="submit" class="btn btn-success submit-btn">确认提交</button>
|
||||
</div>
|
||||
<div class="col-sm-3" style="text-align: right;"><a href="{:url('/user/index/forget')}" class="btn btn-link">忘记密码</a></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>用户中心</title>
|
||||
<link rel="stylesheet" type="text/css" href="__static__/common/css/main.css?time={:time()}">
|
||||
<link rel="stylesheet" type="text/css" href="__css__/style.css?time={:time()}">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -34,6 +35,48 @@
|
||||
<div class="container">
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="reg-box row">
|
||||
<div class="col-sm-6"></div>
|
||||
<div class="col-sm-6">
|
||||
<h3 class="title">用户注册</h3>
|
||||
<!-- 修改密码表单 -->
|
||||
<form method="post" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">用户名:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="username" class="form-control " data-rule="required" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="password" class="form-control " data-rule="required;password" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">确认密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="repassword" class="form-control " data-rule="required;match(password)" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">邮箱:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="email" class="form-control " data-rule="required;email" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-success submit-btn">确认提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
83
public/template/default/user/index_resetpasswd.html
Normal file
83
public/template/default/user/index_resetpasswd.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>用户中心</title>
|
||||
<link rel="stylesheet" type="text/css" href="__static__/common/css/main.css?time={:time()}">
|
||||
<link rel="stylesheet" type="text/css" href="__css__/style.css?time={:time()}">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="__static__/common/js/html5shiv.js"></script>
|
||||
<script src="__static__/common/js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="hold-transition skin-blue sidebar-mini layout-top-nav">
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<nav class="navbar navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a href="{:url('/user/index/index')}" class="navbar-brand"><b>忘记密码</b></a>
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.navbar-custom-menu -->
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Full Width Column -->
|
||||
<div class="content-wrapper">
|
||||
<div class="container">
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="foret-box">
|
||||
<div class="body-content">
|
||||
<!-- 修改密码表单 -->
|
||||
<form method="post" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">新密码:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" name="password" class="form-control " data-rule="required;password" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">确认新密码:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" name="repassword" class="form-control " data-rule="required;match(password)" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<button type="submit" class="btn btn-success submit-btn">确认提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> 4.x
|
||||
</div>
|
||||
<strong>Copyright © 2013-2020 <a href="https://www.tensent.cn">SentCMS</a>.</strong> All rights
|
||||
reserved.
|
||||
</footer>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var require = {
|
||||
config: {"site": {$config|json_encode|raw}, 'module': 'admin', 'jsname': "{$require['jsname']|default=''}", 'actionname': "{$require['actionname']|default=''}", }
|
||||
}
|
||||
</script>
|
||||
<script src="__plugins__/require/require.js" data-main="__js__/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,14 +17,14 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">新密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="password" class="form-control " data-rule="required" autocomplete="off" />
|
||||
<input type="password" name="password" class="form-control " data-rule="required;password" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">确认密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="repassword" class="form-control " data-rule="required" autocomplete="off" />
|
||||
<input type="password" name="repassword" class="form-control " data-rule="required;match(password)" autocomplete="off" />
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user