Commit fbb767e882c09f7fea5fd82da1037a80cde504c8
1 parent
9d91b2f0
Exists in
master
and in
5 other branches
Adding message tag in index page #14
Showing
1 changed file
with
13 additions
and
13 deletions
Show diff stats
core/templates/index.html
... | ... | @@ -24,22 +24,22 @@ |
24 | 24 | |
25 | 25 | <div class="row "> |
26 | 26 | <div class="col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-8 col-xs-offset-2 col-lg-8 col-lg-offset-2 col-xl-8 col-xl-offset-2"> |
27 | - {% if message %} | |
28 | - <div class="alert alert-danger alert-dismissible" role="alert"> | |
29 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
30 | - <span aria-hidden="true">×</span> | |
31 | - </button> | |
32 | - <ul> | |
33 | - <li>{{ message }}</li> | |
34 | - </ul> | |
35 | - </div> | |
36 | - {% endif %} | |
27 | + {% if messages %} | |
28 | + {% for message in messages %} | |
29 | + <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert"> | |
30 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
31 | + <span aria-hidden="true">×</span> | |
32 | + </button> | |
33 | + <p>{{ message }}</p> | |
34 | + </div> | |
35 | + {% endfor %} | |
36 | + {% endif %} | |
37 | 37 | <div class="card"> |
38 | 38 | <div class="card-block"> |
39 | 39 | <form id="form-login" class="form-group" method="post" action=""> |
40 | - {% csrf_token %} | |
41 | - <div class="form-group is-empty"> | |
42 | - <label for="inputEmail" class="col-md-4 col-xs-4 col-sm-4 col-lg-4 control-label"> {% trans 'Username' %}</label> | |
40 | + {% csrf_token %} | |
41 | + <div class="form-group is-empty"> | |
42 | + <label for="inputEmail" class="col-md-4 col-xs-4 col-sm-4 col-lg-4 control-label"> {% trans 'Username' %}</label> | |
43 | 43 | <div class="col-md-8 col-xs-8 col-lg-8 col-sm-8"> |
44 | 44 | <input form="form-login" type="text" name="username" class="form-control" id="inputEmail" placeholder="Username" value="{% if username %}{{username}}{% endif %}"> |
45 | 45 | </div> | ... | ... |