Skip to content

Commit

Permalink
fix password change
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrindt committed Aug 7, 2023
1 parent cfe503e commit 37b479f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ephios/core/services/password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def password_changed(self, password, user):
text_content = _(
"Your password for {site} has been changed. If you didn't request this change, contact an administrator immediately."
).format(site=settings.GET_SITE_URL())
html_content = render_to_string("email_base.html", {"message_text": text_content})
html_content = render_to_string(
"core/mails/base.html",
{"subject": _("Your ephios password has been changed"), "body": text_content},
)
message = EmailMultiAlternatives(
to=[user.email],
subject=_("Your password has been changed"),
Expand Down
4 changes: 3 additions & 1 deletion ephios/core/templates/core/mails/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ <h1>{{ subject }}</h1>
{% blocktranslate trimmed with brand='<a href="https://ephios.de/" rel="noreferrer" target="_blank">ephios</a>' %}
powered by {{ brand }}
{% endblocktranslate %}
<samp>v{{ EPHIOS_VERSION }}</samp>
{% if EPHIOS_VERSION %}
<samp>v{{ EPHIOS_VERSION }}</samp>
{% endif %}
</small>
<br/>
<a href="https://ephios.de">
Expand Down

0 comments on commit 37b479f

Please sign in to comment.