|
|
@ -54,7 +54,9 @@ define([
|
|
|
|
var registering = false;
|
|
|
|
var registering = false;
|
|
|
|
var test;
|
|
|
|
var test;
|
|
|
|
|
|
|
|
|
|
|
|
$register.click(function () {
|
|
|
|
var I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var registerClick = function () {
|
|
|
|
var uname = $uname.val();
|
|
|
|
var uname = $uname.val();
|
|
|
|
var passwd = $passwd.val();
|
|
|
|
var passwd = $passwd.val();
|
|
|
|
var confirmPassword = $confirm.val();
|
|
|
|
var confirmPassword = $confirm.val();
|
|
|
@ -62,6 +64,23 @@ define([
|
|
|
|
var shouldImport = $checkImport[0].checked;
|
|
|
|
var shouldImport = $checkImport[0].checked;
|
|
|
|
var doesAccept = $checkAcceptTerms[0].checked;
|
|
|
|
var doesAccept = $checkAcceptTerms[0].checked;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Cred.isEmail(uname) && !I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME) {
|
|
|
|
|
|
|
|
var warning = [
|
|
|
|
|
|
|
|
Messages.register_emailWarning0,
|
|
|
|
|
|
|
|
Messages.register_emailWarning1,
|
|
|
|
|
|
|
|
Messages.register_emailWarning2,
|
|
|
|
|
|
|
|
Messages.register_emailWarning3,
|
|
|
|
|
|
|
|
].join('<br><br>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Feedback.send("EMAIL_USERNAME_WARNING", true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return void UI.confirm(warning, function (yes) {
|
|
|
|
|
|
|
|
if (!yes) { return; }
|
|
|
|
|
|
|
|
I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = true;
|
|
|
|
|
|
|
|
registerClick();
|
|
|
|
|
|
|
|
}, {}, true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* basic validation */
|
|
|
|
/* basic validation */
|
|
|
|
if (!Cred.isLongEnoughPassword(passwd)) {
|
|
|
|
if (!Cred.isLongEnoughPassword(passwd)) {
|
|
|
|
var warning = Messages._getKey('register_passwordTooShort', [
|
|
|
|
var warning = Messages._getKey('register_passwordTooShort', [
|
|
|
@ -104,7 +123,9 @@ define([
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}, true);
|
|
|
|
}, true);
|
|
|
|
}, 150);
|
|
|
|
}, 150);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$register.click(registerClick);
|
|
|
|
|
|
|
|
|
|
|
|
var clickRegister = Util.notAgainForAnother(function () {
|
|
|
|
var clickRegister = Util.notAgainForAnother(function () {
|
|
|
|
$register.click();
|
|
|
|
$register.click();
|
|
|
|