提交 b9b9c319 编写于 作者: 蔡祥熠

Merge branch 'hotfix/Setting.linktocloud_addMail' into 'master'

Merge of hotfix/Setting.linktocloud_addMail to master

See merge request o2oa/o2oa!3157
......@@ -5,7 +5,7 @@
"background-color": "#f1f1f1",
"box-shadow": "0px 0px 10px #cccccc",
"width": "800px",
"height": "500px",
"height": "520px",
"-webkit-user-select": "none",
"-moz-user-select": "none"
},
......@@ -44,6 +44,10 @@
"height": "440px",
"display": "none"
},
"registerContentNode": {
"height": "460px",
"display": "none"
},
"statusConnectNode": {
"height": "80px",
......@@ -352,6 +356,12 @@
"background": "url("+"../x_component_Collect/$Main/default/icon/icon_phone.png) center center no-repeat",
"float": "left"
},
"registerMailIconNode": {
"width": "60px",
"height": "40px",
"background": "url("+"../x_component_Collect/$Main/default/icon/icon_mail.png) center center no-repeat",
"float": "left"
},
"registerCodeIconNode": {
"width": "60px",
"height": "40px",
......
......@@ -72,7 +72,7 @@ MWF.xApplication.Collect.Main = new Class({
this.modifyContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
this.modifyPwdContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
this.deleteContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
this.registerContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
this.registerContentNode = new Element("div", {"styles": this.css.registerContentNode}).inject(this.node);
this.check = new MWF.xApplication.Collect.Check(this);
this.showContent("checkContentNode");
......@@ -507,6 +507,9 @@ MWF.xApplication.Collect.RegisterForm = new Class({
this.mobileNode = this.createNode("registerMobileIconNode", "mobile");
this.mobileInput = this.mobileNode.getElement("input");
this.mailNode = this.createNode("registerMailIconNode", "mail");
this.mailInput = this.mailNode.getElement("input");
this.codeNode = this.createNode("registerCodeIconNode", "code");
this.codeInput = this.codeNode.getElement("input");
......@@ -614,6 +617,7 @@ MWF.xApplication.Collect.RegisterForm = new Class({
this.setInputNodeEvent(this.usernameNode, this.usernameInput, this.lp.username, this.lp.errorUsername, "username");
this.setInputNodeEvent(this.passwordNode, this.passwordInput, this.lp.password, this.lp.errorPassword, "password");
this.setInputNodeEvent(this.mobileNode, this.mobileInput, this.lp.mobile, this.lp.errorMobile, "mobile");
this.setInputNodeEvent(this.mailNode, this.mailInput, this.lp.mail, this.lp.errorMail, "mail");
this.setInputNodeEvent(this.codeNode, this.codeInput, this.lp.code, this.lp.errorCode, "code");
this.resetCodeNode();
},
......@@ -638,14 +642,16 @@ MWF.xApplication.Collect.RegisterForm = new Class({
register: function(){
var user = this.usernameInput.get("value");
var mobile = this.mobileInput.get("value");
var mail = this.mailInput.get("value");
var code = this.codeInput.get("value");
var password = this.passwordInput.get("value");
if (this.usernameVerification() & this.mobileVerification() & this.codeVerification() & this.passwordVerification()){
if (this.usernameVerification() && this.mobileVerification() && this.mailVerification() && this.codeVerification() && this.passwordVerification()){
this.registering();
var data = {
codeAnswer: code,
mobile: mobile,
mail: mail,
name: user,
password: password
};
......@@ -745,6 +751,20 @@ MWF.xApplication.Collect.RegisterForm = new Class({
return false;
}
return true;
},
mailVerification: function(){
var mail = this.mailInput.get("value");
if (!mail || mail==this.lp.mail){
this.errorInput(this.mailNode, this.lp.errorMail);
return false;
}
var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
if (!reg.test(mail)){
this.errorInput(this.mailNode, this.lp.errorMail);
return false;
}
return true;
}
});
MWF.xApplication.Collect.ModifyForm = new Class({
......
......@@ -34,6 +34,7 @@ MWF.xApplication.Collect.LP = {
"username": "账户名称",
"password": "password",
"mobile": "手机号码",
"mail": "电子邮件",
"code": "验证码",
"secret": "推送消息secret",
"key": "推送消息key",
......@@ -47,6 +48,7 @@ MWF.xApplication.Collect.LP = {
"errorPassword": "请输入密码",
"errorPasswordRule": "密码太简单了,至少8位数值和字母组合",
"errorMobile": "手机号码输入有误",
"errorMail": "电子邮件输入有误",
"errorCode": "验证码输入有误",
"loginError": "登录O2云失败,请检查账户名称和密码",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册