update
This commit is contained in:
@@ -100,6 +100,6 @@ body {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.modal-body button {
|
||||
.modal-body .btn {
|
||||
margin-top: 10px;
|
||||
}
|
||||
@@ -10,8 +10,9 @@
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/dashboard.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/bootstrap-4.6.1-dist/css/bootstrap.css">
|
||||
|
||||
<!--script start-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||
<!--script start
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>-->
|
||||
<script src="/static/js/jquery-1.11.3.min.js"></script>
|
||||
<script src="/static/bootstrap-4.6.1-dist/js/bootstrap.bundle.js"></script> <!-- bootstrap.bundle.min.js,还包含了 Popper,用于支持工具提示(tooltip)和弹出框(popover)功能,但是不包含 jQuery。-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js"></script> <!-- 图标相关-->
|
||||
<script>
|
||||
@@ -62,6 +63,30 @@
|
||||
function set_modal_title(title) {
|
||||
$('#exampleModal .modal-title').html(title);
|
||||
}
|
||||
|
||||
// 注册
|
||||
$('#register_button').click(function () {
|
||||
const inputEmail = $('#inputEmail').val();
|
||||
const inputPassword = $('#inputPassword').val();
|
||||
const inputPassword_ = $('#inputPassword_').val();
|
||||
// 校验输入是否一致
|
||||
if (inputPassword !== inputPassword_) {
|
||||
const alert_component = `
|
||||
<div class="alert alert-danger .alert-dismissible fade show" role="alert" id="register_alert">
|
||||
两次密码输入不一样!
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
`
|
||||
$(this).after(alert_component)
|
||||
setTimeout(function () {
|
||||
$('#register_alert').fadeOut(1200)
|
||||
}, 1000)
|
||||
}
|
||||
});
|
||||
|
||||
// js end
|
||||
})
|
||||
</script>
|
||||
<!--script end-->
|
||||
@@ -88,16 +113,16 @@
|
||||
<!--register start-->
|
||||
<div class="modal-body register_group" style="display: none;height: 360px;">
|
||||
<h1 class="h3 mb-3 font-weight-normal">请输入用户名和密码</h1>
|
||||
<label for="inputEmail" class="sr-only">Email address</label>
|
||||
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" autocomplete="off" required autofocus>
|
||||
<label for="inputEmail" class="sr-only"></label>
|
||||
<input type="email" id="inputEmail" class="form-control" placeholder="用户名" autocomplete="off" required autofocus>
|
||||
|
||||
<label for="inputPassword" class="sr-only">Password</label>
|
||||
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
|
||||
<label for="inputPassword" class="sr-only"></label>
|
||||
<input type="password" id="inputPassword" class="form-control" placeholder="密码" required>
|
||||
|
||||
<label for="inputPassword" class="sr-only">Password</label>
|
||||
<input type="password" id="inputPassword" class="form-control" placeholder="Password Again" required>
|
||||
<label for="inputPassword_" class="sr-only"></label>
|
||||
<input type="password" id="inputPassword_" class="form-control" placeholder="密码" required>
|
||||
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">注册</button>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit" id="register_button">注册</button>
|
||||
</div>
|
||||
<!--register end-->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user