Commit 31836b59799f3b6fc380b17279c137b4434108a6
1 parent
ddfbb5fc
Exists in
master
and in
5 other branches
Adding breadcrumbs to edit profile template and fix error #25 #7
Showing
1 changed file
with
20 additions
and
7 deletions
Show diff stats
users/templates/users/edit_profile.html
1 | -{% extends 'app/base.html' %} | |
1 | +{% extends 'users/profile.html' %} | |
2 | 2 | |
3 | 3 | {% load static i18n %} |
4 | 4 | {% load widget_tweaks %} |
5 | +{% load django_bootstrap_breadcrumbs %} | |
5 | 6 | |
6 | 7 | {% block breadcrumbs %} |
7 | - <ol class="breadcrumb"> | |
8 | - <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | |
9 | - <li class="active">{% trans 'Edit Profile' %}</li> | |
10 | - </ol> | |
8 | + | |
9 | + {{ block.super }} | |
10 | + {% breadcrumb 'Edit' 'users:update_profile' %} | |
11 | + | |
11 | 12 | {% endblock %} |
12 | 13 | |
13 | 14 | {% block sidebar %} |
... | ... | @@ -36,9 +37,21 @@ |
36 | 37 | <form method="post" action="" enctype="multipart/form-data"> |
37 | 38 | {% csrf_token %} |
38 | 39 | {% for field in form %} |
39 | - <div class="form-group{% if form.has_error %} has-error {% endif %}"> | |
40 | + <div class="form-group{% if form.has_error %} has-error {% endif %} is-fileinput"> | |
40 | 41 | <label for="{{ field.auto_id }}">{{ field.label }}</label> |
41 | - {% render_field field class='form-control input-sm' %} | |
42 | + {% if field.auto_id == 'id_image' %} | |
43 | + {% render_field field class='form-control input-sm' %} | |
44 | + <div class="input-group"> | |
45 | + <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> | |
46 | + <span class="input-group-btn input-group-sm"> | |
47 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
48 | + <i class="material-icons">attach_file</i> | |
49 | + </button> | |
50 | + </span> | |
51 | + </div> | |
52 | + {% else %} | |
53 | + {% render_field field class='form-control input-sm' %} | |
54 | + {% endif %} | |
42 | 55 | <span id="helpBlock" class="help-block">{{ field.help_text }}</span> |
43 | 56 | {% if field.errors.length > 0 %} |
44 | 57 | <div class="alert alert-danger alert-dismissible" role="alert"> | ... | ... |