|
@@ -5,7 +5,7 @@
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
|
- <title>用户中心 - Powered by MinDoc</title>
|
|
|
|
|
|
+ <title>{{i18n .Lang "uc.user_center"}} - Powered by MinDoc</title>
|
|
|
|
|
|
<!-- Bootstrap -->
|
|
<!-- Bootstrap -->
|
|
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
|
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
|
@@ -28,44 +28,44 @@
|
|
<div class="row">
|
|
<div class="row">
|
|
<div class="page-left">
|
|
<div class="page-left">
|
|
<ul class="menu">
|
|
<ul class="menu">
|
|
- <li class="active"><a href="{{urlfor "SettingController.Index"}}" class="item"><i class="fa fa-sitemap" aria-hidden="true"></i> 基本信息</a> </li>
|
|
|
|
|
|
+ <li class="active"><a href="{{urlfor "SettingController.Index"}}" class="item"><i class="fa fa-sitemap" aria-hidden="true"></i> {{i18n .Lang "uc.base_info"}}</a> </li>
|
|
{{if ne .Member.AuthMethod "ldap"}}
|
|
{{if ne .Member.AuthMethod "ldap"}}
|
|
- <li><a href="{{urlfor "SettingController.Password"}}" class="item"><i class="fa fa-user" aria-hidden="true"></i> 修改密码</a> </li>
|
|
|
|
|
|
+ <li><a href="{{urlfor "SettingController.Password"}}" class="item"><i class="fa fa-user" aria-hidden="true"></i> {{i18n .Lang "uc.change_pwd"}}</a> </li>
|
|
{{end}}
|
|
{{end}}
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="page-right">
|
|
<div class="page-right">
|
|
<div class="m-box">
|
|
<div class="m-box">
|
|
<div class="box-head">
|
|
<div class="box-head">
|
|
- <strong class="box-title">基本信息</strong>
|
|
|
|
|
|
+ <strong class="box-title">{{i18n .Lang "uc.base_info"}}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="box-body" style="padding-right: 200px;">
|
|
<div class="box-body" style="padding-right: 200px;">
|
|
<div class="form-left">
|
|
<div class="form-left">
|
|
<form role="form" method="post" id="memberInfoForm">
|
|
<form role="form" method="post" id="memberInfoForm">
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
- <label>用户名</label>
|
|
|
|
- <input type="text" class="form-control disabled" value="{{.Member.Account}}" disabled placeholder="用户名">
|
|
|
|
|
|
+ <label>{{i18n .Lang "uc.username"}}</label>
|
|
|
|
+ <input type="text" class="form-control disabled" value="{{.Member.Account}}" disabled placeholder="{{i18n .Lang "uc.username"}}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
- <label>真实姓名</label>
|
|
|
|
- <input type="text" name="real_name" class="form-control" value="{{.Member.RealName}}" placeholder="真实姓名">
|
|
|
|
|
|
+ <label>{{i18n .Lang "uc.realname"}}</label>
|
|
|
|
+ <input type="text" name="real_name" class="form-control" value="{{.Member.RealName}}" placeholder="{{i18n .Lang "uc.realname"}}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
- <label for="user-email">邮箱<strong class="text-danger">*</strong></label>
|
|
|
|
- <input type="email" class="form-control" value="{{.Member.Email}}" id="userEmail" name="email" max="100" placeholder="邮箱">
|
|
|
|
|
|
+ <label for="user-email">{{i18n .Lang "uc.email"}}<strong class="text-danger">*</strong></label>
|
|
|
|
+ <input type="email" class="form-control" value="{{.Member.Email}}" id="userEmail" name="email" max="100" placeholder="{{i18n .Lang "uc.email"}}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
- <label>手机号</label>
|
|
|
|
- <input type="text" class="form-control" id="userPhone" name="phone" maxlength="20" title="手机号码" placeholder="手机号码" value="{{.Member.Phone}}">
|
|
|
|
|
|
+ <label>{{i18n .Lang "uc.mobile"}}</label>
|
|
|
|
+ <input type="text" class="form-control" id="userPhone" name="phone" maxlength="20" title="{{i18n .Lang "uc.mobile"}}" placeholder="{{i18n .Lang "uc.mobile"}}" value="{{.Member.Phone}}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
- <label class="description">描述</label>
|
|
|
|
- <textarea class="form-control" rows="3" title="描述" name="description" id="description" maxlength="500">{{.Member.Description}}</textarea>
|
|
|
|
- <p style="color: #999;font-size: 12px;">描述不能超过500字</p>
|
|
|
|
|
|
+ <label class="description">{{i18n .Lang "uc.description"}}</label>
|
|
|
|
+ <textarea class="form-control" rows="3" title="{{i18n .Lang "uc.description"}}" name="description" id="description" maxlength="500">{{.Member.Description}}</textarea>
|
|
|
|
+ <p style="color: #999;font-size: 12px;">{{i18n .Lang "uc.description_tips"}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
- <button type="submit" class="btn btn-success" data-loading-text="保存中...">保存修改</button>
|
|
|
|
|
|
+ <button type="submit" class="btn btn-success" data-loading-text="{{i18n .Lang "message.processing"}}">{{i18n .Lang "common.save"}}</button>
|
|
<span id="form-error-message" class="error-message"></span>
|
|
<span id="form-error-message" class="error-message"></span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
@@ -73,7 +73,7 @@
|
|
<div class="form-right">
|
|
<div class="form-right">
|
|
<label>
|
|
<label>
|
|
<a href="javascript:;" data-toggle="modal" data-target="#upload-logo-panel">
|
|
<a href="javascript:;" data-toggle="modal" data-target="#upload-logo-panel">
|
|
- <img src="{{cdnimg .Member.Avatar}}" onerror="this.src='{{cdnimg "static/images/middle.gif"}}'" class="img-circle" alt="头像" style="max-width: 120px;max-height: 120px;" id="headimgurl">
|
|
|
|
|
|
+ <img src="{{cdnimg .Member.Avatar}}" onerror="this.src='{{cdnimg "static/images/middle.gif"}}'" class="img-circle" alt="{{i18n .Lang "uc.avatar"}}" style="max-width: 120px;max-height: 120px;" id="headimgurl">
|
|
</a>
|
|
</a>
|
|
</label>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
@@ -84,12 +84,12 @@
|
|
{{template "widgets/footer.tpl" .}}
|
|
{{template "widgets/footer.tpl" .}}
|
|
</div>
|
|
</div>
|
|
<!-- Start Modal -->
|
|
<!-- Start Modal -->
|
|
-<div class="modal fade" id="upload-logo-panel" tabindex="-1" role="dialog" aria-labelledby="修改头像" aria-hidden="true">
|
|
|
|
|
|
+<div class="modal fade" id="upload-logo-panel" tabindex="-1" role="dialog" aria-labelledby="{{i18n .Lang "uc.change_avatar"}})" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
- <h4 class="modal-title">修改头像</h4>
|
|
|
|
|
|
+ <h4 class="modal-title">{{i18n .Lang "uc.change_avatar"}}</h4>
|
|
</div>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="modal-body">
|
|
<div class="wraper">
|
|
<div class="wraper">
|
|
@@ -98,7 +98,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="watch-crop-list">
|
|
<div class="watch-crop-list">
|
|
- <div class="preview-title">预览</div>
|
|
|
|
|
|
+ <div class="preview-title">{{i18n .Lang "uc.change_avatar"}}</div>
|
|
<ul>
|
|
<ul>
|
|
<li>
|
|
<li>
|
|
<div class="img-preview preview-lg"></div>
|
|
<div class="img-preview preview-lg"></div>
|
|
@@ -112,8 +112,8 @@
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<div class="modal-footer">
|
|
<span id="error-message"></span>
|
|
<span id="error-message"></span>
|
|
- <div id="filePicker" class="btn">选择</div>
|
|
|
|
- <button type="button" id="saveImage" class="btn btn-success" style="height: 40px;width: 77px;" data-loading-text="上传中...">上传</button>
|
|
|
|
|
|
+ <div id="filePicker" class="btn">{{i18n .Lang "blog.choose"}}</div>
|
|
|
|
+ <button type="button" id="saveImage" class="btn btn-success" style="height: 40px;width: 77px;" data-loading-text="{{i18n .Lang "message.processing"}}">{{i18n .Lang "blog.upload"}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -139,14 +139,14 @@
|
|
|
|
|
|
var email = $.trim($("#userEmail").val());
|
|
var email = $.trim($("#userEmail").val());
|
|
if(!email){
|
|
if(!email){
|
|
- return showError('邮箱不能为空');
|
|
|
|
|
|
+ return showError('{{i18n .Lang "message.email_empty"}}');
|
|
}
|
|
}
|
|
$("button[type='submit']").button('loading');
|
|
$("button[type='submit']").button('loading');
|
|
},
|
|
},
|
|
success : function (res) {
|
|
success : function (res) {
|
|
$("button[type='submit']").button('reset');
|
|
$("button[type='submit']").button('reset');
|
|
if(res.errcode === 0){
|
|
if(res.errcode === 0){
|
|
- showSuccess("保存成功");
|
|
|
|
|
|
+ showSuccess("{{i18n .Lang "message.success"}}");
|
|
}else{
|
|
}else{
|
|
showError(res.message);
|
|
showError(res.message);
|
|
}
|
|
}
|
|
@@ -173,7 +173,7 @@
|
|
uploader.makeThumb( file, function( error, src ) {
|
|
uploader.makeThumb( file, function( error, src ) {
|
|
$img = '<img src="' + src +'" style="max-width: 360px;max-height: 360px;">';
|
|
$img = '<img src="' + src +'" style="max-width: 360px;max-height: 360px;">';
|
|
if ( error ) {
|
|
if ( error ) {
|
|
- $img.replaceWith('<span>不能预览</span>');
|
|
|
|
|
|
+ $img.replaceWith('<span>{{i18n .Lang "message.cannot_preview"}}</span>');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -187,7 +187,7 @@
|
|
}, 1, 1 );
|
|
}, 1, 1 );
|
|
}).on("uploadError",function (file,reason) {
|
|
}).on("uploadError",function (file,reason) {
|
|
console.log(reason);
|
|
console.log(reason);
|
|
- $("#error-message").text("上传失败:" + reason);
|
|
|
|
|
|
+ $("#error-message").text("{{i18n .Lang "message.upload_failed"}}:" + reason);
|
|
|
|
|
|
}).on("uploadSuccess",function (file, res) {
|
|
}).on("uploadSuccess",function (file, res) {
|
|
|
|
|