hanze/programmeerles-ouderen

pgmles/templates/account.html in dev_2
Repositories | Summary | Log | Files

account.html (2569B) download


 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.username }}</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">Account Info</legend>
15                <div class="form-group">
16                    {{ form.username.label(class="form-control-label") }}
17
18                    {% if form.username.errors %}
19                        {{ form.username(class="form-control form-control-lg is-invalid") }}
20                        <div class="invalid-feedback">
21                            {% for error in form.username.errors %}
22                                <span>{{ error }}</span>
23                            {% endfor %}
24                        </div>
25                    {% else %}
26                        {{ form.username(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.picture.label() }}
44                    {{ form.picture(class="form-control-file") }}
45                    {% if form.picture.errors %}
46                        {% for error in form.picture.errors %}
47                            <span class="text-danger">{{ error }}</span></br>
48                        {% endfor %}
49                    {% endif %}
50                </div>
51            </fieldset>
52            <div class="form-group">
53                {{ form.submit(class="btn btn-outline-info") }}
54            </div>
55        </form>
56    </div>
57{% endblock content %}