account.html (3506B)
1 {% extends "layout.html" %} 2 {% block content %} 3 <div class="content-section"> 4 <div class="media"> 5 <img class="rounded-circle account-img" src="{{ image_file }}"> 6 <div class="media-body"> 7 <h2 class="account-heading">{{ current_user.name }}</h2> 8 <p class="text-secondary">{{ current_user.email }}</p> 9 </div> 10 </div> 11 <form method="POST" action="" enctype="multipart/form-data"> 12 {{ form.hidden_tag() }} 13 <fieldset class="form-group"> 14 <legend class="border-bottom mb-4">Informatie</legend> 15 <div class="form-group"> 16 {{ form.name.label(class="form-control-label") }} 17 18 {% if form.name.errors %} 19 {{ form.name(class="form-control form-control-lg is-invalid") }} 20 <div class="invalid-feedback"> 21 {% for error in form.name.errors %} 22 <span>{{ error }}</span> 23 {% endfor %} 24 </div> 25 {% else %} 26 {{ form.name(class="form-control form-control-lg") }} 27 {% endif %} 28 </div> 29 <div class="form-group"> 30 {{ form.email.label(class="form-control-label") }} 31 {% if form.email.errors %} 32 {{ form.email(class="form-control form-control-lg is-invalid") }} 33 <div class="invalid-feedback"> 34 {% for error in form.email.errors %} 35 <span>{{ error }}</span> 36 {% endfor %} 37 </div> 38 {% else %} 39 {{ form.email(class="form-control form-control-lg") }} 40 {% endif %} 41 </div> 42 <div class="form-group"> 43 {{ form.password.label(class="form-control-label") }} 44 {% if form.password.errors %} 45 {{ form.password(class="form-control form-control-lg is-invalid") }} 46 <div class="invalid-feedback"> 47 {% for error in form.password.errors %} 48 <span>{{ error }}</span> 49 {% endfor %} 50 </div> 51 {% else %} 52 {{ form.password(class="form-control form-control-lg") }} 53 {% endif %} 54 </div> 55 <div class="form-group"> 56 {{ form.confirm_password.label(class="form-control-label") }} 57 {% if form.confirm_password.errors %} 58 {{ form.confirm_password(class="form-control form-control-lg is-invalid") }} 59 <div class="invalid-feedback"> 60 {% for error in form.confirm_password.errors %} 61 <span>{{ error }}</span> 62 {% endfor %} 63 </div> 64 {% else %} 65 {{ form.confirm_password(class="form-control form-control-lg") }} 66 {% endif %} 67 </div> 68 <div class="form-group"> 69 {{ form.picture.label() }} 70 {{ form.picture(class="form-control-file") }} 71 {% if form.picture.errors %} 72 {% for error in form.picture.errors %} 73 <span class="text-danger">{{ error }}</span></br> 74 {% endfor %} 75 {% endif %} 76 </div> 77 </fieldset> 78 <div class="form-group"> 79 {{ form.submit(class="btn btn-outline-info") }} 80 </div> 81 </form> 82 </div> 83 {% endblock content %}