Commit 70aae6b8 authored by Michal Čihař's avatar Michal Čihař

Avoid hardcoding message HTML, use template tag for that

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 6395d30b
{% extends "base.html" %} {% extends "base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
{% load translations %}
{% block content %} {% block content %}
<h2>{% trans "Register email" %}</h2> <h2>{% trans "Register email" %}</h2>
{% if form.errors %} {% if form.errors %}
<div class="ui-widget"> {% show_message "error" _("Please fix errors in the registration form.") %}
<div style="padding: 0pt 0.7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
{% trans "Please fix errors in registration form." %}
</p>
</div>
</div>
{% endif %} {% endif %}
<form action="{% url 'social:complete' "email" %}" method="post" accept-charset="utf-8"> <form action="{% url 'social:complete' "email" %}" method="post" accept-charset="utf-8">
......
{% extends "base.html" %} {% extends "base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
{% load translations %}
{% block content %} {% block content %}
{% if form.errors %} {% if form.errors %}
<div class="ui-widget"> {% show_message "error" _("This username/password combination was not found. Please try again.") %}
<div style="padding: 0pt 0.7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
{% trans "This username/password combination was not found. Please try again." %}
</p>
</div>
</div>
{% endif %} {% endif %}
<h2>{% trans "Password login" %}</h2> <h2>{% trans "Password login" %}</h2>
......
...@@ -6,13 +6,7 @@ ...@@ -6,13 +6,7 @@
{% block content %} {% block content %}
{% if form.errors or userform.errors or subscriptionform.errors %} {% if form.errors or userform.errors or subscriptionform.errors %}
<div class="ui-widget"> {% show_message "error" _("Please fix errors in the form.") %}
<div style="padding: 0pt 0.7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
{% trans "Please fix errors in the form." %}
</p>
</div>
</div>
{% endif %} {% endif %}
<form method="post" action="{% url 'profile' %}"> <form method="post" action="{% url 'profile' %}">
......
{% extends "base.html" %} {% extends "base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
{% load translations %}
{% block content %} {% block content %}
...@@ -17,13 +18,7 @@ ...@@ -17,13 +18,7 @@
<h2>{% trans "Register using email" %}</h2> <h2>{% trans "Register using email" %}</h2>
{% if form.errors %} {% if form.errors %}
<div class="ui-widget"> {% show_message "error" _("Please fix errors in the registration form.") %}
<div style="padding: 0pt 0.7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
{% trans "Please fix errors in registration form." %}
</p>
</div>
</div>
{% endif %} {% endif %}
<form action="{% url 'register' %}" method="post" accept-charset="utf-8"> <form action="{% url 'register' %}" method="post" accept-charset="utf-8">
......
{% extends "base.html" %} {% extends "base.html" %}
{% load url from future %} {% load url from future %}
{% load i18n %} {% load i18n %}
{% load translations %}
{% block content %} {% block content %}
...@@ -9,13 +10,7 @@ ...@@ -9,13 +10,7 @@
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p> <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
{% if form.errors %} {% if form.errors %}
<div class="ui-widget"> {% show_message "error" _("Please fix errors in the registration form.") %}
<div style="padding: 0pt 0.7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
{% trans "Please fix errors in registration form." %}
</p>
</div>
</div>
{% endif %} {% endif %}
<form action="{% url 'password_reset' %}" method="post" accept-charset="utf-8"> <form action="{% url 'password_reset' %}" method="post" accept-charset="utf-8">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment