Change colors for error messages in forms.

This commit is contained in:
Patrick Jentsch 2019-07-12 17:22:15 +02:00
parent 9096cc4028
commit 6d1be8f391
5 changed files with 23 additions and 31 deletions

View File

@ -17,7 +17,7 @@
{{ form.login(class='validate', placeholder='Email address or username') }}
{{ form.login.label }}
{% for error in form.login.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field">
@ -25,7 +25,7 @@
{{ form.password(class='validate') }}
{{ form.password.label }}
{% for error in form.password.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<a href="{{ url_for('auth.password_reset_request') }}" class="left">Forgot your password?</a>

View File

@ -16,7 +16,7 @@
{{ form.username(class='validate') }}
{{ form.username.label }}
{% for error in form.username.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field">
@ -24,7 +24,7 @@
{{ form.password(class='validate') }}
{{ form.password.label }}
{% for error in form.password.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field">
@ -32,7 +32,7 @@
{{ form.password2(class='validate') }}
{{ form.password2.label }}
{% for error in form.password2.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field ">
@ -40,7 +40,7 @@
{{ form.email(class='validate', type='email') }}
{{ form.email.label }}
{% for error in form.email.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
</div>

View File

@ -15,14 +15,14 @@
{{ form.password(class='validate', type='password') }}
{{ form.password.label }}
{% for error in form.password.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field">
{{ form.password2(class='validate', type='password') }}
{{ form.password2.label }}
{% for error in form.password2.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
</div>

View File

@ -15,7 +15,7 @@
{{ form.email(class='validate', type='email') }}
{{ form.email.label }}
{% for error in form.email.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
</div>

View File

@ -2,7 +2,7 @@
{% block page_content %}
<div class="col s12 m4">
<h3>Account</h3>
<h3>Change password</h3>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
</div>
@ -12,35 +12,27 @@
<div class="card-content">
{{ form.hidden_tag() }}
<div class="input-field ">
<i class="material-icons prefix">email</i>
{{ form.email(type='email', value=current_user.email) }}
{{ form.email.label }}
{% for error in form.email.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field ">
<i class="material-icons prefix">person</i>
{{ form.username(value=current_user.username) }}
{{ form.username.label }}
{% for error in form.username.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
<i class="material-icons prefix">vpn_key</i>
{{ form.old_password() }}
{{ form.old_password.label }}
{% for error in form.old_password.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field">
<i class="material-icons prefix">vpn_key</i>
{{ form.password() }}
{{ form.password.label }}
{% for error in form.password.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{{ form.new_password() }}
{{ form.new_password.label }}
{% for error in form.new_password.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
<div class="input-field">
<i class="material-icons prefix">vpn_key</i>
{{ form.password2() }}
{{ form.password2.label }}
{% for error in form.password2.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{{ form.new_password2() }}
{{ form.new_password2.label }}
{% for error in form.new_password2.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
</div>