注册页面的样式问题
Summary
仅出现在 main-jh
分支且需要打开 Feature Flag,现在生产环境 jihulab.com 并不受影响。
在注册账号时,如果密码在提交后检测出不符合要求,注册页面会出现页面错乱:
Steps to reproduce
- 切换至
main-jh
分支(当前 commit shac3fb1dd1
) - 以 SaaS 模式打开 GDK
GITLAB_SIMULATE_SAAS=1 gdk restart
- 打开 Feature Flag
::Feature.enable(:registrations_with_phone)
- 浏览器访问注册页面
- 将表单里的
密码
填写为gitlab-123
(故意使密码校验失败) - 填写好其他字段后,点击注册按钮
- 会看到页面格式问题
Tip: 本地的验证码可能不正常工作,可以在代码里跳过验证码的检查:
diff --git a/jh/app/controllers/concerns/check_phone_and_code.rb b/jh/app/controllers/concerns/check_phone_and_code.rb
index e056f430b2c9..20dd518a1c12 100644
--- a/jh/app/controllers/concerns/check_phone_and_code.rb
+++ b/jh/app/controllers/concerns/check_phone_and_code.rb
@@ -21,6 +21,7 @@ def check_verification_code
end
def verification_message(verification, vcode)
+ return
if !verification
s_('JH|RealName|Verification code is nonexist.')
elsif verification.created_at < 10.minutes.ago
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
由 路志远 编辑于