|
|
@@ -40,68 +40,25 @@
|
|
|
$('.add-transition').attr('class', 'add-transition');
|
|
|
$('.add-transition').addClass(transAttr);
|
|
|
});
|
|
|
-
|
|
|
- $("#login_form").delegate('#login_submit', 'click', function() {
|
|
|
- login();
|
|
|
-
|
|
|
- });
|
|
|
-
|
|
|
- $("body").keydown(function() {
|
|
|
- if (event.keyCode == "13") {//keyCode=13是回车键
|
|
|
- login();
|
|
|
- }
|
|
|
- });
|
|
|
});
|
|
|
|
|
|
- function login() {
|
|
|
- $.ajax({
|
|
|
- url : '/api/user/_sign_in',
|
|
|
- type : 'POST',
|
|
|
- contentType: "application/json; charset=utf-8",
|
|
|
- dataType: "json",
|
|
|
- data : JSON.stringify({login_name: $('#login_name').val(), password: $('#password').val()}),
|
|
|
- error : function(data, textStatus, xhr) {
|
|
|
- if (data.status === 401) {
|
|
|
- insert_warning_window($('#login_submit'), '<strong>登录失败: </strong> 请查证账号、密码重新登录.');
|
|
|
- } else {
|
|
|
- insert_warning_window($('#login_submit'), data.responseText);
|
|
|
- }
|
|
|
- },
|
|
|
- success : function(data, textStatus, xhr) {
|
|
|
- window.location.href="/";
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
</script>
|
|
|
<div class="center-vertical">
|
|
|
<div class="center-content row wow">
|
|
|
- <form id="login_form" class="col-md-4 col-sm-5 col-xs-11 col-lg-3 center-margin">
|
|
|
- <h3 class="text-center pad25B font-primary" style="font-family: 'Baskerville'; opacity: 0.83; font-size: -webkit-xxx-large;">JimV<span style="font-family: 'serif';"> Admin</span></h3>
|
|
|
+ <form id="login_form" class="col-md-4 col-sm-5 col-xs-11 col-lg-3 center-margin" action="/reset_password/{{ token }}" method="post">
|
|
|
+ <h3 class="text-center pad25B font-primary" style="font-family: 'serif'; opacity: 0.83; font-size: -webkit-xxx-large;">设置新密码</h3>
|
|
|
<div id="login-form" class="content-box bg-default">
|
|
|
<div class="content-box-wrapper pad20A">
|
|
|
- <div class="form-group">
|
|
|
- <div class="input-group">
|
|
|
- <span class="input-group-addon addon-inside bg-gray">
|
|
|
- <i class="glyph-icon icon-user"></i>
|
|
|
- </span>
|
|
|
- <input type="text" class="form-control" id="login_name" placeholder="用户名" value="admin" disabled>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
<div class="form-group">
|
|
|
<div class="input-group">
|
|
|
<span class="input-group-addon addon-inside bg-gray">
|
|
|
<i class="glyph-icon icon-lock"></i>
|
|
|
</span>
|
|
|
- <input type="password" class="form-control" id="password" placeholder="默认密码:jimv.pswd.com">
|
|
|
+ <input type="password" class="form-control" id="password" name="password" placeholder="新密码">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group" style="margin-bottom: 10px;">
|
|
|
- <button id="login_submit" type="button" class="btn btn-block btn-primary">登录</button>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="text-right col-md-12">
|
|
|
- <a href="#" class="switch-button" title="找回密码">忘记密码? </a>
|
|
|
- </div>
|
|
|
+ <button id="login_submit" class="btn btn-block btn-primary">下一步</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|