mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
use tag for testing
This commit is contained in:
parent
c83d244663
commit
c37e40d144
@ -351,6 +351,12 @@ def object_link(url_name, pk, ref):
|
||||
return mark_safe('<b><a href="{}">{}</a></b>'.format(ref_url, ref))
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def mail_configured():
|
||||
""" Return if mail is configured """
|
||||
return bool(settings.EMAIL_HOST)
|
||||
|
||||
|
||||
class I18nStaticNode(StaticNode):
|
||||
"""
|
||||
custom StaticNode
|
||||
|
@ -7,13 +7,14 @@
|
||||
{% block content %}
|
||||
|
||||
{% settings_value 'LOGIN_ENABLE_PWD_FORGOT' as enable_pwd_forgot %}
|
||||
{% mail_configured as mail_conf %}
|
||||
|
||||
<h1>{% trans "Password Reset" %}</h1>
|
||||
{% if user.is_authenticated %}
|
||||
{% include "account/snippets/already_logged_in.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% if enable_pwd_forgot %}
|
||||
{% if mail_conf and enable_pwd_forgot %}
|
||||
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
|
||||
|
||||
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
|
||||
|
Loading…
Reference in New Issue
Block a user