diff --git a/apps/authentication/templates/authentication/login.html b/apps/authentication/templates/authentication/login.html
index bf0afa30b..521f3dbd2 100644
--- a/apps/authentication/templates/authentication/login.html
+++ b/apps/authentication/templates/authentication/login.html
@@ -57,7 +57,7 @@
@@ -90,5 +90,17 @@
$('#password-hidden').val(passwordEncrypted); //返回给密码输入input
$('#form').submit();//post提交
}
+
+ var authDB = '{{ AUTH_DB }}';
+ var forgotPasswordUrl = "{% url 'authentication:forgot-password' %}";
+ $(document).ready(function () {
+ }).on('click', '#forgot_password', function () {
+ if (authDB === 'True'){
+ window.open(forgotPasswordUrl, "_blank")
+ }
+ else{
+ alert("{% trans 'You are using another authentication server, please contact your administrator' %}")
+ }
+ })
{% endblock %}
diff --git a/apps/authentication/templates/authentication/xpack_login.html b/apps/authentication/templates/authentication/xpack_login.html
index a7a3773fc..d566ce1f8 100644
--- a/apps/authentication/templates/authentication/xpack_login.html
+++ b/apps/authentication/templates/authentication/xpack_login.html
@@ -131,7 +131,7 @@