diff --git a/apps/authentication/templates/authentication/_msg_different_city.html b/apps/authentication/templates/authentication/_msg_different_city.html index 16ff90fbc..b12e9aab6 100644 --- a/apps/authentication/templates/authentication/_msg_different_city.html +++ b/apps/authentication/templates/authentication/_msg_different_city.html @@ -12,7 +12,5 @@
- - {% trans 'If you suspect that the login behavior is abnormal, please modify the account password in time.' %} - + {% trans 'If you suspect that the login behavior is abnormal, please modify the account password in time.' %}
\ No newline at end of file diff --git a/apps/authentication/templates/authentication/_msg_reset_password.html b/apps/authentication/templates/authentication/_msg_reset_password.html index 9388f2388..036eea542 100644 --- a/apps/authentication/templates/authentication/_msg_reset_password.html +++ b/apps/authentication/templates/authentication/_msg_reset_password.html @@ -1,15 +1,17 @@ {% load i18n %} -{% trans 'Hello' %} {{ user.name }}, -+ {% trans 'Hello' %} {{ user.name }}, +
+
+ {% trans 'Please click the link below to reset your password, if not your request, concern your account security' %}
+
+
+ {% trans 'Click here reset password' %}
+
+ {% trans 'This link is valid for 1 hour. After it expires' %} + + {% trans 'request new one' %} + +
diff --git a/apps/authentication/templates/authentication/_msg_rest_password_success.html b/apps/authentication/templates/authentication/_msg_rest_password_success.html index 424396473..a12d611f7 100644 --- a/apps/authentication/templates/authentication/_msg_rest_password_success.html +++ b/apps/authentication/templates/authentication/_msg_rest_password_success.html @@ -1,18 +1,14 @@ {% load i18n %} - -{% trans 'Hello' %}: {{ name }},
+{% trans 'Hello' %} {{ name }},
- {% trans 'Your password has just been successfully updated.' %} + {% trans 'Your password has just been successfully updated' %}
- {% trans 'IP' %}: {{ ip_address }}
- {% trans 'Browser' %}: {{ browser }}
+ {% trans 'IP' %}: {{ ip_address }}
+ {% trans 'Browser' %}: {{ browser }}
---
-
- {% trans 'If the password update was not initiated by you, your account may have security issues.' %}
- {% trans 'If you have any questions, you can contact the administrator.' %}
-
+ {% trans 'If the password update was not initiated by you, your account may have security issues' %}
+ {% trans 'If you have any questions, you can contact the administrator' %}
Your account has been created successfully
\n" -"---
\n" -" Login direct\n" -"您的账户已创建成功
\n" -" \n" -"---
\n" -" 直接登录\n" -"Your account has been created successfully
\n" +#~ "---
\n" +#~ " Login direct\n" +#~ "您的账户已创建成功
\n" +#~ "---
\n" +#~ " 直接登录\n" +#~ "+ {} ++
- ---
-
- {% trans 'If you have any question, please contact the administrator' %}
-
+ {% trans 'If you have any question, please contact the administrator' %}
- {% trans 'Command' %}: {{ command }} -
-- {% trans 'Asset' %}: {{ hostname }}({{ host_ip }}) -
-- {% trans 'User' %}: {{ user }} -
-- {% trans 'Level' %}: {{ risk_level }} -
-- {% trans 'Session' %}: {% trans 'view' %} -
++{{ command }} ++
- {% trans 'User' %}: {{ user }} -
-- {% trans 'Level' %}: {{ risk_level }} -
+{% for item, value in items.items %} + + {{ item }}: {{ value }} + +
+{% endfor %} + {% trans 'Command' %}:
+{{ command }} -+
- {% trans 'If your password has expired, please click' %} + {% trans 'If your password has expired, please click the link below to' %} {% trans 'Reset password' %} - {% trans 'to apply for a password reset email.' %}
---- -
- {% trans 'Your MFA has been reset by site administrator.' %}
- {% trans 'Please login and reset your MFA.' %}
+ {% trans 'Your MFA has been reset by site administrator' %}
+ {% trans 'Please click the link below to set' %}
+
+
+ {% trans 'Click here set' %}
- {% trans 'Login direct' %} -
\ No newline at end of file diff --git a/apps/users/templates/users/_msg_reset_ssh_key.html b/apps/users/templates/users/_msg_reset_ssh_key.html index ab705aca7..58f97524a 100644 --- a/apps/users/templates/users/_msg_reset_ssh_key.html +++ b/apps/users/templates/users/_msg_reset_ssh_key.html @@ -4,9 +4,9 @@ {% trans 'Hello' %} {{ name }},
- {% trans 'Your ssh public key has been reset by site administrator.' %}
- {% trans 'Please login and reset your ssh public key.' %}
+ {% trans 'Your ssh public key has been reset by site administrator' %}
+ {% trans 'Please click the link below to set' %}
+
+
+ {% trans 'Click here set' %}
- {% trans 'Login direct' %} -
\ No newline at end of file diff --git a/apps/users/templates/users/_msg_user_created.html b/apps/users/templates/users/_msg_user_created.html new file mode 100644 index 000000000..c0515e9f6 --- /dev/null +++ b/apps/users/templates/users/_msg_user_created.html @@ -0,0 +1,20 @@ +{% load i18n %} + ++ {{ honorific }}: +
+ +{% trans 'Your account has been created successfully' %}
+
+ {% trans 'Username' %}: {{ username }}
+ {% trans 'Password' %}:
+
+ {% trans 'click here to set your password' %}
+
+
+ {% trans 'This link is valid for 1 hour. After it expires' %} + {% trans 'request new one' %} +
+Your account has been created successfully
----
- Login direct -' + settings.EMAIL_CUSTOM_USER_CREATED_BODY + '
' - else: - custom_body = '' - body = custom_body + default_body - return body - - def send_user_created_mail(user): - recipient_list = [user.email] - subject = _('Create account successfully') - if settings.EMAIL_CUSTOM_USER_CREATED_SUBJECT: - subject = settings.EMAIL_CUSTOM_USER_CREATED_SUBJECT + from .notifications import UserCreatedMsg - honorific = '' + _('Hello %(name)s') % {'name': user.name} + ':
' - if settings.EMAIL_CUSTOM_USER_CREATED_HONORIFIC: - honorific = '' + settings.EMAIL_CUSTOM_USER_CREATED_HONORIFIC + ':
' - - body = construct_user_created_email_body(user) - - signature = 'jumpserver
' - if settings.EMAIL_CUSTOM_USER_CREATED_SIGNATURE: - signature = '' + settings.EMAIL_CUSTOM_USER_CREATED_SIGNATURE + '
' + recipient_list = [user.email] + msg = UserCreatedMsg.html_msg + subject = msg['subject'] + message = msg['message'] - message = honorific + body + signature if settings.DEBUG: try: print(message)