diff --git a/event/listener.php b/event/listener.php index 322e687..dd432ea 100644 --- a/event/listener.php +++ b/event/listener.php @@ -72,7 +72,7 @@ public function password_strength_setup($event) ); $event['lang_set_ext'] = $lang_set_ext; - $this->template->assign_var('S_PWS_ZXCVBN', (bool) $this->config->offsetGet('password_strength_type')); + $this->template->assign_var('S_USE_ZXCVBN', (bool) $this->config->offsetGet('password_strength_type')); } /** diff --git a/styles/all/template/password_strength.html b/styles/all/template/password_strength.html index 196682b..a2aaa3c 100644 --- a/styles/all/template/password_strength.html +++ b/styles/all/template/password_strength.html @@ -19,7 +19,7 @@ function trigger() { var input = $passField.val(); var score = - {%- if S_PWS_ZXCVBN -%} + {%- if S_USE_ZXCVBN -%} zxcvbn(input).score + (input.length > 0); {%- else -%} Math.max(complexity(input), +(input.length > 0)); @@ -29,7 +29,7 @@ $passField.bind('keyup blur', trigger).after($resultMsg); }); }; - {% if S_PWS_ZXCVBN %} + {% if S_USE_ZXCVBN %} $.ajax({ url: '{{ ROOT_PATH }}ext/vse/passwordstrength/lib/zxcvbn/zxcvbn.js', dataType: 'script',