2017-05-03 14:22:05 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2022-07-20 15:04:01 +08:00
|
|
|
<link rel="shortcut icon" href="{{cdnimg "/static/favicon.ico"}}">
|
2017-05-03 14:22:05 +08:00
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
|
|
<meta name="renderer" content="webkit" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2017-05-13 13:47:26 +08:00
|
|
|
<meta name="author" content="MinDoc" />
|
2021-03-30 16:18:02 +08:00
|
|
|
<title>{{i18n .Lang "common.account_recovery"}} - Powered by MinDoc</title>
|
2017-05-03 14:22:05 +08:00
|
|
|
|
|
|
|
<!-- Bootstrap -->
|
2017-05-13 13:47:26 +08:00
|
|
|
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
|
|
|
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet">
|
2018-08-15 15:33:22 +08:00
|
|
|
<link href="{{cdncss "/static/css/main.css" "version"}}" rel="stylesheet">
|
2017-05-03 14:22:05 +08:00
|
|
|
<!-- HTML5 shim and Respond.js for 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/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
|
|
<script src="/static/respond.js/1.4.2/respond.min.js"></script>
|
|
|
|
<![endif]-->
|
|
|
|
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
2017-05-13 13:47:26 +08:00
|
|
|
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
|
2017-05-03 14:22:05 +08:00
|
|
|
</head>
|
|
|
|
<body class="manual-container">
|
|
|
|
<header class="navbar navbar-static-top smart-nav navbar-fixed-top manual-header" role="banner">
|
|
|
|
<div class="container">
|
|
|
|
<div class="navbar-header col-sm-12 col-md-6 col-lg-5">
|
2018-02-05 13:41:24 +08:00
|
|
|
<a href="{{.BaseUrl}}" class="navbar-brand">{{.SITE_NAME}}</a>
|
2017-05-03 14:22:05 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<div class="container manual-body">
|
|
|
|
<div class="row login">
|
|
|
|
<div class="login-body">
|
|
|
|
<form role="form" method="post" id="findPasswordForm">
|
2018-11-14 12:02:52 +08:00
|
|
|
{{ .xsrfdata }}
|
2021-03-30 16:18:02 +08:00
|
|
|
<h3 class="text-center">{{i18n .Lang "common.account_recovery"}}</h3>
|
2017-05-03 14:22:05 +08:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-addon">
|
|
|
|
<i class="fa fa-at"></i>
|
|
|
|
</div>
|
2021-03-30 16:18:02 +08:00
|
|
|
<input type="text" class="form-control" placeholder="{{i18n .Lang "common.email"}}" name="email" id="email" autocomplete="off">
|
2017-05-03 14:22:05 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="input-group" style="float: left;width: 195px;">
|
|
|
|
<div class="input-group-addon">
|
|
|
|
<i class="fa fa-check-square"></i>
|
|
|
|
</div>
|
2021-03-30 16:18:02 +08:00
|
|
|
<input type="text" name="code" id="code" class="form-control" style="width: 150px" maxlength="5" placeholder="{{i18n .Lang "common.captcha"}}" autocomplete="off">
|
2017-05-03 14:22:05 +08:00
|
|
|
</div>
|
2021-03-30 16:18:02 +08:00
|
|
|
<img id="captcha-img" style="width: 140px;height: 40px;display: inline-block;float: right" src="{{urlfor "AccountController.Captcha"}}" onclick="this.src='{{urlfor "AccountController.Captcha"}}?key=login&t='+(new Date()).getTime();" title="{{i18n .Lang "message.click_to_change"}}">
|
2017-05-03 14:22:05 +08:00
|
|
|
<div class="clearfix"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2021-03-30 16:18:02 +08:00
|
|
|
<button type="submit" id="btnSendMail" class="btn btn-success" style="width: 100%" data-loading-text="{{i18n .Lang "message.processing"}}" autocomplete="off">{{i18n .Lang "common.account_recovery"}}</button>
|
2017-05-03 14:22:05 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
</div>
|
|
|
|
{{template "widgets/footer.tpl" .}}
|
|
|
|
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
2017-05-13 13:47:26 +08:00
|
|
|
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}" type="text/javascript"></script>
|
|
|
|
<script src="{{cdnjs "/static/layer/layer.js"}}" type="text/javascript"></script>
|
|
|
|
<script src="{{cdnjs "/static/js/jquery.form.js"}}" type="text/javascript"></script>
|
2017-05-03 14:22:05 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
$("#email,#code").on('focus',function () {
|
|
|
|
$(this).tooltip('destroy').parents('.form-group').removeClass('has-error');;
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).keydown(function (e) {
|
|
|
|
var event = document.all ? window.event : e;
|
|
|
|
if(event.keyCode == 13){
|
|
|
|
$("#btn-login").click();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#findPasswordForm").ajaxForm({
|
|
|
|
beforeSubmit : function () {
|
|
|
|
var $btn = $(this).button('loading');
|
|
|
|
|
|
|
|
var email = $.trim($("#email").val());
|
|
|
|
if(email === ""){
|
2021-03-30 16:18:02 +08:00
|
|
|
$("#email").tooltip({placement:"auto",title : "{{i18n .Lang "message.email_empty"}}",trigger : 'manual'})
|
2017-05-03 14:22:05 +08:00
|
|
|
.tooltip('show')
|
|
|
|
.parents('.form-group').addClass('has-error');
|
|
|
|
$btn.button('reset');
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
var code = $.trim($("#code").val());
|
|
|
|
if(code === ""){
|
2021-03-30 16:18:02 +08:00
|
|
|
$("#code").tooltip({title : '{{i18n .Lang "message.captcha_empty"}}',trigger : 'manual'})
|
2017-05-03 14:22:05 +08:00
|
|
|
.tooltip('show')
|
|
|
|
.parents('.form-group').addClass('has-error');
|
|
|
|
$btn.button('reset');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
$("#btnSendMail").button("loading");
|
|
|
|
},
|
|
|
|
success : function (res) {
|
|
|
|
|
|
|
|
if(res.errcode !== 0){
|
|
|
|
$("#captcha-img").click();
|
|
|
|
$("#code").val('');
|
|
|
|
layer.msg(res.message);
|
|
|
|
$("#btnSendMail").button('reset');
|
|
|
|
}else{
|
2021-03-30 16:18:02 +08:00
|
|
|
alert("{{i18n .Lang "message.email_sent"}}")
|
2017-05-03 14:22:05 +08:00
|
|
|
window.location = res.data;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error :function () {
|
|
|
|
$("#captcha-img").click();
|
|
|
|
$("#code").val('');
|
2021-03-30 16:18:02 +08:00
|
|
|
layer.msg('{{i18n .Lang "message.system_error"}}');
|
2017-05-03 14:22:05 +08:00
|
|
|
$("#btnSendMail").button('reset');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|