Commit 7de0a6c61d98096105b49c1e2253ec6a7caa2acb
1 parent
6b15a351
Exists in
master
and in
5 other branches
Breadcrumb to create user admin #25 #52
Showing
1 changed file
with
17 additions
and
11 deletions
Show diff stats
users/templates/users/create.html
1 | -{% extends 'app/base.html' %} | |
1 | +{% extends 'list_users.html' %} | |
2 | 2 | |
3 | 3 | {% load static i18n %} |
4 | 4 | {% load widget_tweaks %} |
5 | 5 | |
6 | +{% load django_bootstrap_breadcrumbs %} | |
7 | + | |
6 | 8 | {% block breadcrumbs %} |
7 | - <ol class="breadcrumb"> | |
8 | - <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | |
9 | - <li class="active">{% trans 'New User' %}</li> | |
10 | - </ol> | |
9 | + | |
10 | + {{ block.super }} | |
11 | + {% breadcrumb 'Create' 'users:create' %} | |
12 | + | |
11 | 13 | {% endblock %} |
12 | 14 | |
13 | 15 | {% block sidebar %} |
... | ... | @@ -25,12 +27,16 @@ |
25 | 27 | {% endblock %} |
26 | 28 | |
27 | 29 | {% block content %} |
28 | - <div class="alert alert-info 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 | - <p>{% trans 'All fields are required' %}</p> | |
33 | - </div> | |
30 | + {% if messages %} | |
31 | + {% for message in messages %} | |
32 | + <div class="alert alert-success alert-dismissible" role="alert"> | |
33 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
34 | + <span aria-hidden="true">×</span> | |
35 | + </button> | |
36 | + <p>{{ message }}</p> | |
37 | + </div> | |
38 | + {% endfor %} | |
39 | + {% endif %} | |
34 | 40 | |
35 | 41 | <form method="post" action="" enctype="multipart/form-data"> |
36 | 42 | {% csrf_token %} | ... | ... |