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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
{% block page_content %} {% block page_content %}
<div class="col s12 m4"> <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> <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> </div>
@ -12,35 +12,27 @@
<div class="card-content"> <div class="card-content">
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-field "> <div class="input-field ">
<i class="material-icons prefix">email</i> <i class="material-icons prefix">vpn_key</i>
{{ form.email(type='email', value=current_user.email) }} {{ form.old_password() }}
{{ form.email.label }} {{ form.old_password.label }}
{% for error in form.email.errors %} {% for error in form.old_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 ">
<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>
{% endfor %} {% endfor %}
</div> </div>
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">vpn_key</i> <i class="material-icons prefix">vpn_key</i>
{{ form.password() }} {{ form.new_password() }}
{{ form.password.label }} {{ form.new_password.label }}
{% for error in form.password.errors %} {% for error in form.new_password.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span> <span class="helper-text red-text">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">vpn_key</i> <i class="material-icons prefix">vpn_key</i>
{{ form.password2() }} {{ form.new_password2() }}
{{ form.password2.label }} {{ form.new_password2.label }}
{% for error in form.password2.errors %} {% for error in form.new_password2.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span> <span class="helper-text red-text">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>