mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-26 03:21:49 +08:00
refactor and add i18n, to be continue
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
<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">
|
||||
<meta name="author" content="SmartWiki" />
|
||||
<title>找回密码 - Powered by MinDoc</title>
|
||||
<meta name="author" content="MinDoc" />
|
||||
<title>{{i18n .Lang "common.account_recovery"}} - Powered by MinDoc</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
||||
@@ -37,14 +37,14 @@
|
||||
{{ .xsrfdata }}
|
||||
<input type="hidden" name="token" value="{{.Token}}">
|
||||
<input type="hidden" name="mail" value="{{.Email}}">
|
||||
<h3 class="text-center">找回密码</h3>
|
||||
<h3 class="text-center">{{i18n .Lang "common.account_recovery"}}</h3>
|
||||
<div class="form-group">
|
||||
<label for="newPasswd">新密码</label>
|
||||
<input type="password" class="form-control" name="password1" id="newPassword" maxlength="20" placeholder="新密码" autocomplete="off">
|
||||
<label for="newPasswd">{{i18n .Lang "common.new_password"}}</label>
|
||||
<input type="password" class="form-control" name="password1" id="newPassword" maxlength="20" placeholder="{{i18n .Lang "common.new_password"}}" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="configPasswd">确认密码</label>
|
||||
<input type="password" class="form-control" id="confirmPassword" name="password2" maxlength="20" placeholder="确认密码" autocomplete="off">
|
||||
<label for="configPasswd">{{i18n .Lang "common.confirm_password"}}</label>
|
||||
<input type="password" class="form-control" id="confirmPassword" name="password2" maxlength="20" placeholder="{{i18n .Lang "common.confirm_password"}}" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -52,13 +52,13 @@
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-check-square"></i>
|
||||
</div>
|
||||
<input type="text" name="code" id="code" class="form-control" style="width: 150px" maxlength="5" placeholder="验证码" autocomplete="off">
|
||||
<input type="text" name="code" id="code" class="form-control" style="width: 150px" maxlength="5" placeholder="{{i18n .Lang "common.captcha"}}" autocomplete="off">
|
||||
</div>
|
||||
<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="点击换一张">
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" id="btnSendMail" class="btn btn-success" style="width: 100%" data-loading-text="正在处理..." autocomplete="off">找回密码</button>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@@ -92,26 +92,26 @@
|
||||
var code = $.trim($("#code").val());
|
||||
|
||||
if(newPassword === ""){
|
||||
$("#newPassword").tooltip({placement:"auto",title : "密码不能为空",trigger : 'manual'})
|
||||
$("#newPassword").tooltip({placement:"auto",title : "{{i18n .Lang "message.password_empty"}}",trigger : 'manual'})
|
||||
.tooltip('show')
|
||||
.parents('.form-group').addClass('has-error');
|
||||
|
||||
return false;
|
||||
|
||||
}else if(confirmPassword === ""){
|
||||
$("#confirmPassword").tooltip({placement:"auto",title : "确认密码不能为空",trigger : 'manual'})
|
||||
$("#confirmPassword").tooltip({placement:"auto",title : "{{i18n .Lang "message.confirm_password_empty"}}",trigger : 'manual'})
|
||||
.tooltip('show')
|
||||
.parents('.form-group').addClass('has-error');
|
||||
|
||||
return false;
|
||||
}else if(newPassword !== confirmPassword) {
|
||||
$("#confirmPassword").tooltip({placement:"auto",title : "确认密码输入不正确",trigger : 'manual'})
|
||||
$("#confirmPassword").tooltip({placement:"auto",title : "{{i18n .Lang "message.incorrect_confirm_password"}}",trigger : 'manual'})
|
||||
.tooltip('show')
|
||||
.parents('.form-group').addClass('has-error');
|
||||
|
||||
return false;
|
||||
}else if(code === ""){
|
||||
$("#code").tooltip({title : '验证码不能为空',trigger : 'manual'})
|
||||
$("#code").tooltip({title : '{{i18n .Lang "message.captcha_empty"}}',trigger : 'manual'})
|
||||
.tooltip('show')
|
||||
.parents('.form-group').addClass('has-error');
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
error :function () {
|
||||
$("#captcha-img").click();
|
||||
$("#code").val('');
|
||||
layer.msg('系统错误');
|
||||
layer.msg('{{i18n .Lang "message.system_error"}}');
|
||||
$("#btnSendMail").button('reset');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user