From 3343d0533c8af7092af4bfb6a236055e55bc246d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=A1=BA=E5=BC=BA?= Date: Sat, 4 Jan 2020 10:19:49 +0800 Subject: [PATCH] repair register user bug (#4392) --- seahub/templates/registration/registration_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seahub/templates/registration/registration_form.html b/seahub/templates/registration/registration_form.html index bf33621b6f..73f4bf147b 100644 --- a/seahub/templates/registration/registration_form.html +++ b/seahub/templates/registration/registration_form.html @@ -81,7 +81,6 @@ $('#signup-form').on('submit', function(){ var email = $.trim($('input[name="email"]').val()), pwd1 = $.trim($('input[name="password1"]').val()), pwd2 = $.trim($('input[name="password2"]').val()); - level = getStrengthLevel(pwd1); if (!email) { $('.error').html("{% trans "Email cannot be blank" %}").removeClass('hide'); @@ -100,6 +99,7 @@ $('#signup-form').on('submit', function(){ return false; } {% if strong_pwd_required %} + var level = getStrengthLevel(pwd1); if (level < {{level}}) { $('.error').html(passwd_tip).removeClass('hide'); return false;