Commit d1481b56 authored by Liang Ding's avatar Liang Ding
parent c1b2e062
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
*/ */
package org.b3log.solo.processor; package org.b3log.solo.processor;
import org.b3log.latke.Keys; import org.b3log.latke.Keys;
import org.b3log.latke.Latkes; import org.b3log.latke.Latkes;
import org.b3log.latke.ioc.inject.Inject; import org.b3log.latke.ioc.inject.Inject;
...@@ -59,7 +58,6 @@ import java.io.IOException; ...@@ -59,7 +58,6 @@ import java.io.IOException;
import java.util.Calendar; import java.util.Calendar;
import java.util.Map; import java.util.Map;
/** /**
* Login/logout processor. * Login/logout processor.
* *
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# Description: Solo language configurations(en_US). # Description: Solo language configurations(en_US).
# Version: 2.16.0.0, Jul 3, 2017 # Version: 2.16.0.0, Aug 8, 2017
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# Description: Solo default language configurations(zh_CN). # Description: Solo default language configurations(zh_CN).
# Version: 2.16.0.0, Jul 3, 2017 # Version: 2.17.0.0, Aug 8, 2017
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
...@@ -298,7 +298,7 @@ forgotLabel=\u5FD8\u8BB0\u5BC6\u7801 ...@@ -298,7 +298,7 @@ forgotLabel=\u5FD8\u8BB0\u5BC6\u7801
sendLabel=\u53D1\u9001 sendLabel=\u53D1\u9001
userEmailNotFoundMsg=\u90AE\u7BB1\u5730\u5740\u6709\u8BEF\uFF0C\u8BF7\u91CD\u8BD5 userEmailNotFoundMsg=\u90AE\u7BB1\u5730\u5740\u6709\u8BEF\uFF0C\u8BF7\u91CD\u8BD5
resetPwdSuccessMsg=\u5BC6\u7801\u4FEE\u6539\u6210\u529F resetPwdSuccessMsg=\u5BC6\u7801\u4FEE\u6539\u6210\u529F
resetPwdFailedMsg=\u4e0d\u80fd\u6839\u636e\u6b64token\u627e\u5230\u6709\u6548\u90ae\u7bb1\u4fe1\u606f resetPwdFailedMsg=\u4E0D\u80FD\u6839\u636E\u6B64 token \u627E\u5230\u6709\u6548\u7684\u90AE\u7BB1
resetPwdSuccessSend=\u66F4\u6539\u5BC6\u7801\u7684\u786E\u8BA4\u94FE\u63A5\u5DF2\u53D1\u9001\u81F3\u6307\u5B9A\u90AE\u7BB1 resetPwdSuccessSend=\u66F4\u6539\u5BC6\u7801\u7684\u786E\u8BA4\u94FE\u63A5\u5DF2\u53D1\u9001\u81F3\u6307\u5B9A\u90AE\u7BB1
resetPwdMailSubject=[Solo]\u91CD\u7F6E\u5BC6\u7801 resetPwdMailSubject=[Solo]\u91CD\u7F6E\u5BC6\u7801
resetPwdMailBody=\u60F3\u66F4\u6539\u5BC6\u7801\uFF0C\u8BF7\u6253\u5F00\u4E0B\u9762\u94FE\u63A5\uFF1B\u82E5\u4E0D\u60F3\u4FEE\u6539\uFF0C\u53EA\u8981\u5FFD\u7565\u6B64\u6B21\u90AE\u4EF6\uFF0C\u7CFB\u7EDF\u5E76\u4E0D\u4F1A\u81EA\u52A8\u4FEE\u6539\u60A8\u7684\u5BC6\u7801\u3002<p> resetPwdMailBody=\u60F3\u66F4\u6539\u5BC6\u7801\uFF0C\u8BF7\u6253\u5F00\u4E0B\u9762\u94FE\u63A5\uFF1B\u82E5\u4E0D\u60F3\u4FEE\u6539\uFF0C\u53EA\u8981\u5FFD\u7565\u6B64\u6B21\u90AE\u4EF6\uFF0C\u7CFB\u7EDF\u5E76\u4E0D\u4F1A\u81EA\u52A8\u4FEE\u6539\u60A8\u7684\u5BC6\u7801\u3002<p>
......
...@@ -19,7 +19,7 @@ ${forgotLabel} ...@@ -19,7 +19,7 @@ ${forgotLabel}
${userPasswordLabel} ${userPasswordLabel}
</label> </label>
<input type="password" id="emailOrPassword"/> <input type="password" id="emailOrPassword"/>
<input type="hidden" id="token" value="${tokenHidden}" /> <input type="hidden" id="token" value="${tokenHidden}"/>
<button id="sendBtn" onclick='reset();'>${ok}</button> <button id="sendBtn" onclick='reset();'>${ok}</button>
<span id="tip"></span> <span id="tip"></span>
</div> </div>
...@@ -27,10 +27,10 @@ ${forgotLabel} ...@@ -27,10 +27,10 @@ ${forgotLabel}
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
(function() { (function () {
$("#emailOrPassword").focus(); $("#emailOrPassword").focus();
$("#emailOrPassword").keypress(function(event) { $("#emailOrPassword").keypress(function (event) {
if (13 === event.keyCode) { // Enter pressed if (13 === event.keyCode) { // Enter pressed
$('#sendBtn').click(); $('#sendBtn').click();
} }
...@@ -44,7 +44,7 @@ ${forgotLabel} ...@@ -44,7 +44,7 @@ ${forgotLabel}
} }
})(); })();
var reset = function() { var reset = function () {
if ($("#emailOrPassword").val() === "") { if ($("#emailOrPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}"); $("#tip").text("${passwordEmptyLabel}");
$("#emailOrPassword").focus(); $("#emailOrPassword").focus();
...@@ -61,10 +61,10 @@ ${forgotLabel} ...@@ -61,10 +61,10 @@ ${forgotLabel}
type: "POST", type: "POST",
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
error: function() { error: function () {
// alert("reset password error!"); // alert("reset password error!");
}, },
success: function(data, textStatus) { success: function (data, textStatus) {
if (data.succeed) { if (data.succeed) {
window.location.href = data.to; window.location.href = data.to;
} else { } else {
...@@ -74,7 +74,7 @@ ${forgotLabel} ...@@ -74,7 +74,7 @@ ${forgotLabel}
}); });
}; };
var forgot = function() { var forgot = function () {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) { if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) {
$("#tip").text("${mailInvalidLabel}"); $("#tip").text("${mailInvalidLabel}");
$("#emailOrPassword").focus(); $("#emailOrPassword").focus();
...@@ -91,10 +91,10 @@ ${forgotLabel} ...@@ -91,10 +91,10 @@ ${forgotLabel}
type: "POST", type: "POST",
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
error: function() { error: function () {
// alert("reset password error!"); // alert("reset password error!");
}, },
success: function(data, textStatus) { success: function (data, textStatus) {
if (data.succeed) { if (data.succeed) {
window.location.href = data.to; window.location.href = data.to;
} else { } else {
......
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>${forgotLabel} Solo!</title> <title>${forgotLabel} Solo!</title>
<meta name="keywords" content="Solo,Java 博客,开源" /> <meta name="keywords" content="Solo,Java 博客,开源"/>
<meta name="description" content="An open source blog with Java. Java 开源博客" /> <meta name="description" content="An open source blog with Java. Java 开源博客"/>
<meta name="owner" content="B3log Team"/> <meta name="owner" content="B3log Team"/>
<meta name="author" content="B3log Team"/> <meta name="author" content="B3log Team"/>
<meta name="generator" content="Solo"/> <meta name="generator" content="Solo"/>
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<link type="text/css" rel="stylesheet" <link type="text/css" rel="stylesheet"
href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8"/> href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8"/>
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png"/> <link rel="icon" type="image/png" href="${staticServePath}/favicon.png"/>
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">
<div class="wrap"> <div class="wrap">
<div class="content"> <div class="content">
<div class="logo"> <div class="logo">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
${userPasswordLabel} ${userPasswordLabel}
</label> </label>
<input type="password" id="emailOrPassword"/> <input type="password" id="emailOrPassword"/>
<input type="hidden" id="token" value="${tokenHidden}" /> <input type="hidden" id="token" value="${tokenHidden}"/>
<button id="sendBtn" onclick='reset();'>${ok}</button> <button id="sendBtn" onclick='reset();'>${ok}</button>
<span id="tip"></span> <span id="tip"></span>
</div> </div>
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version} Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
(function() { (function () {
$("#emailOrPassword").focus(); $("#emailOrPassword").focus();
$("#emailOrPassword").keypress(function(event) { $("#emailOrPassword").keypress(function (event) {
if (13 === event.keyCode) { // Enter pressed if (13 === event.keyCode) { // Enter pressed
$('#sendBtn').click(); $('#sendBtn').click();
} }
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
} }
})(); })();
var reset = function() { var reset = function () {
if ($("#emailOrPassword").val() === "") { if ($("#emailOrPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}"); $("#tip").text("${passwordEmptyLabel}");
$("#emailOrPassword").focus(); $("#emailOrPassword").focus();
...@@ -101,10 +101,10 @@ ...@@ -101,10 +101,10 @@
type: "POST", type: "POST",
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
error: function() { error: function () {
// alert("reset password error!"); // alert("reset password error!");
}, },
success: function(data, textStatus) { success: function (data, textStatus) {
if (data.succeed) { if (data.succeed) {
window.location.href = data.to; window.location.href = data.to;
} else { } else {
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
}); });
}; };
var forgot = function() { var forgot = function () {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) { if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) {
$("#tip").text("${mailInvalidLabel}"); $("#tip").text("${mailInvalidLabel}");
$("#emailOrPassword").focus(); $("#emailOrPassword").focus();
...@@ -131,10 +131,10 @@ ...@@ -131,10 +131,10 @@
type: "POST", type: "POST",
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
error: function() { error: function () {
// alert("reset password error!"); // alert("reset password error!");
}, },
success: function(data, textStatus) { success: function (data, textStatus) {
if (data.succeed) { if (data.succeed) {
window.location.href = data.to; window.location.href = data.to;
} else { } else {
...@@ -143,6 +143,6 @@ ...@@ -143,6 +143,6 @@
} }
}); });
}; };
</script> </script>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment