Skip to content

Commit

Permalink
Fixed messages style
Browse files Browse the repository at this point in the history
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
  • Loading branch information
macartur committed May 17, 2016
1 parent 95e492e commit 45d399e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 21 deletions.
4 changes: 2 additions & 2 deletions colab/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ def password_reset_done_custom(request):
"your password. You should be receiving them shortly."))
messages.success(request, msg)

return redirect('home')
return redirect('login')


def password_reset_complete_custom(request):
msg = _('Your password has been set. You may go ahead and log in now.')
messages.success(request, msg)

return redirect('home')
return redirect('login')


def myaccount_redirect(request, route):
Expand Down
5 changes: 5 additions & 0 deletions colab/static/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,8 @@ span.highlighted {
.chart > p > label {
margin: 0 2px;
}

/* MESSAGES FORMAT */
.container.messages {
margin-top: 30px;
}
44 changes: 25 additions & 19 deletions colab/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,31 @@
{% endif %}
{% endblock %}

{% block messages %}
{% if request.GET.bid_login_failed %}
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{% trans 'The login has failed. Please, try again.' %}
</div>
{% endif %}

{% for message in messages %}
<div class="alert alert-dismissable {{ message.tags }}">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ message | safe }}
</div>
{% endfor %}
<div id="alert-js" class="alert alert-dismissable alert-warning" hidden>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<span id="alert-message"></span>
</div>
{% endblock %}
{% block messages %}
{% if request.GET.bid_login_failed %}
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{% trans 'The login has failed. Please, try again.' %}
</div>
{% endif %}

{% for message in messages %}
<div class="container messages">
<div class="row">
<div class="col-md-12">
<div class="alert alert-dismissable {{ message.tags }}">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ message | safe }}
</div>
</div>
</div>
</div>
{% endfor %}
<div id="alert-js" class="alert alert-dismissable alert-warning" hidden>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<span id="alert-message"></span>
</div>
{% endblock %}

<div id="main-content" class="container">
{% block main-content %}{% endblock %}
Expand Down

0 comments on commit 45d399e

Please sign in to comment.