diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 46c5d1453..b17134f6e 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -407,6 +407,7 @@ mobile_number_retrieve_password=Phone number retrieve password mobile_login=Mobile login account_password_login=Account password login cloud_brain_user_login=Cloud brain user login +modify_phone_number=Modify phone number [mail] diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 8ad520798..01916cd9a 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -411,6 +411,7 @@ mobile_number_retrieve_password=手机号找回密码 mobile_login=手机登录 account_password_login=账号密码登录 cloud_brain_user_login=云脑1用户登录 +modify_phone_number=修改手机号 [mail] diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl index 773ec94c7..550d36fbf 100644 --- a/templates/user/auth/forgot_passwd.tmpl +++ b/templates/user/auth/forgot_passwd.tmpl @@ -1,13 +1,13 @@ {{template "base/head" .}}
diff --git a/templates/user/auth/phone_verify.tmpl b/templates/user/auth/phone_verify.tmpl index 2bf774e43..9f4d6429b 100644 --- a/templates/user/auth/phone_verify.tmpl +++ b/templates/user/auth/phone_verify.tmpl @@ -52,6 +52,7 @@ justify-content: center; align-items: center; box-sizing: border-box; + position: relative; } .__phone-verify-code .phone-c .phone-num-c input { @@ -62,6 +63,21 @@ outline: none; } + .__phone-verify-code .phone-c .modify-phone-number { + position: absolute; + left: 100%; + width: 200px; + height: 100%; + margin-left: 10px; + display: none; + } + + .__phone-verify-code .phone-c .modify-phone-number a { + font-weight: 400; + font-size: 14px; + color: rgba(0, 102, 255, 1); + } + .__phone-verify-code .slide-bar-wrap { display: flex; height: 38px; @@ -141,7 +157,7 @@ margin: 0; height: 16px; width: 16px; - margin-top: -6px; + margin-top: -5px; } .__phone-verify-code .slide-bar-c .slide-bar-bg .slide-trigger.sucess { @@ -253,7 +269,6 @@ width: 100% !important; padding: 9.5px 14px; box-sizing: border-box; - border: none; outline: none; } @@ -270,9 +285,10 @@
+
-
+
@@ -339,6 +355,14 @@ this.eventInit(); this.refreshImages(); var wrap = this.dom.closest('div.use-type'); + var readonly = wrap.attr('readonly'); + if (readonly) { + this.dom.find('.phone-area-c select').attr('disabled', true); + this.dom.find('.phone-num-c input').attr('disabled', true); + this.dom.find('.slide-bar-wrap').hide(); + this.dom.find('.verify-code-c').hide(); + this.dom.find('.modify-phone-number').show(); + } var oldPhoneNum = wrap.attr('ophonenumber'); if (oldPhoneNum) { this.dom.find('input.phoneNumber').val(oldPhoneNum); @@ -362,7 +386,7 @@ var verifyCodeNoRequired = wrap.attr('verifycodenorequired'); if (verifyCodeNoRequired) { this.dom.find('input.verifyCode').removeAttr('required'); - } + } }; PhoneVerifyCode.prototype.eventInit = function () { @@ -444,10 +468,10 @@ }, error: function(err) { self.dom.find('.slide-bar').addClass('error'); - self.dom.find('.slide-trigger').addClass('error'); - setTimeout(function () { - self.refreshImages(); - }, 300); + self.dom.find('.slide-trigger').addClass('error'); + setTimeout(function () { + self.refreshImages(); + }, 300); } }); } @@ -487,13 +511,17 @@ if (res && res.Code === 0) { self.countDown(); } else { - $('body').toast({ - message: res.Message, - showProgress: 'bottom', - showIcon:'warning circle', - class: 'warning', - position: 'top right', - }); + if ($('.ui.negative.message').length) { + $('.ui.negative.message').eq(0).show().find('p').text(res.Message); + } else { + $('body').toast({ + message: res.Message, + showProgress: 'bottom', + showIcon:'warning circle', + class: 'warning', + position: 'top right', + }); + } self.refreshImages(); } }, @@ -503,6 +531,14 @@ }); } }); + + this.dom.find('.modify-phone-number a').on('click', function() { + self.dom.find('.phone-area-c select').attr('disabled', false); + self.dom.find('.phone-num-c input').attr('disabled', false); + self.dom.find('.slide-bar-wrap').css('display', 'flex'); + self.dom.find('.verify-code-c').css('display', 'flex'); + self.dom.find('.modify-phone-number').hide(); + }); }; PhoneVerifyCode.prototype.refreshImages = function () { diff --git a/templates/user/auth/signin_navbar.tmpl b/templates/user/auth/signin_navbar.tmpl index 45475e46f..f53f6a820 100755 --- a/templates/user/auth/signin_navbar.tmpl +++ b/templates/user/auth/signin_navbar.tmpl @@ -1,8 +1,10 @@ {{if or .EnableOpenIDSignIn .EnableSSPI .EnableCloudBrain}}