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" %}
{% load url from future %}
{% load i18n %}
{% load translations %}
{% block content %}
<h2>{% trans "Register email" %}</h2>
{% if form.errors %}
<div class="ui-widget">
<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>
{% show_message "error" _("Please fix errors in the registration form.") %}
{% endif %}
<form action="{% url 'social:complete' "email" %}" method="post" accept-charset="utf-8">
......
{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load translations %}
{% block content %}
{% if form.errors %}
<div class="ui-widget">
<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>
{% show_message "error" _("This username/password combination was not found. Please try again.") %}
{% endif %}
<h2>{% trans "Password login" %}</h2>
......
......@@ -6,13 +6,7 @@
{% block content %}
{% if form.errors or userform.errors or subscriptionform.errors %}
<div class="ui-widget">
<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>
{% show_message "error" _("Please fix errors in the form.") %}
{% endif %}
<form method="post" action="{% url 'profile' %}">
......
{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load translations %}
{% block content %}
......@@ -17,13 +18,7 @@
<h2>{% trans "Register using email" %}</h2>
{% if form.errors %}
<div class="ui-widget">
<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>
{% show_message "error" _("Please fix errors in the registration form.") %}
{% endif %}
<form action="{% url 'register' %}" method="post" accept-charset="utf-8">
......
{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load translations %}
{% block content %}
......@@ -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>
{% if form.errors %}
<div class="ui-widget">
<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>
{% show_message "error" _("Please fix errors in the registration form.") %}
{% endif %}
<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