forms: do not call password validation JS too early (#53651)

This commit is contained in:
Valentin Deniaud 2021-05-05 14:40:20 +02:00
parent 318c709f24
commit 7d0303d5df
1 changed files with 1 additions and 1 deletions

View File

@ -296,7 +296,7 @@ class CheckPasswordInput(PasswordInput):
_id = attrs.get('id')
if _id and _id.endswith('2'):
other_id = _id[:-1] + '1'
output += '''\n<script>a2_password_check_equality(%s, %s)</script>''' % (
output += '''\n<script>$(a2_password_check_equality(%s, %s))</script>''' % (
json.dumps(other_id),
json.dumps(_id),
)