mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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))
|
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):
|
class I18nStaticNode(StaticNode):
|
||||||
"""
|
"""
|
||||||
custom StaticNode
|
custom StaticNode
|
||||||
|
@ -7,13 +7,14 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% settings_value 'LOGIN_ENABLE_PWD_FORGOT' as enable_pwd_forgot %}
|
{% settings_value 'LOGIN_ENABLE_PWD_FORGOT' as enable_pwd_forgot %}
|
||||||
|
{% mail_configured as mail_conf %}
|
||||||
|
|
||||||
<h1>{% trans "Password Reset" %}</h1>
|
<h1>{% trans "Password Reset" %}</h1>
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{% include "account/snippets/already_logged_in.html" %}
|
{% include "account/snippets/already_logged_in.html" %}
|
||||||
{% endif %}
|
{% 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>
|
<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">
|
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user