summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/auth/edit_user.html
blob: 3b10508c4da4c4144f39b426e46b7f74ad3eba44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% extends 'users.html' %}
{% import "bootstrap/wtf.html" as wtf %}

{% set sidebar_state = 'disabled' %}
{% set btn_back = true %}

{% block nav_user_edit %}active{% endblock %}
{% block content %}

<h1 class="m-5">{{_('Edit user {}').format(form.username.data)}}</h1>

<form action="{{ url_for('user_edit_post') }}" method="post" class="form">
    {{ form.hidden_tag() }}

    <div class="form-group">
        {{ form.username.label(class_='form-label') }}
        {{ form.username(class_='form-control') }}
    </div>

    <div class="form-group">
        {{ form.pwd.label(class_='form-label') }}
        <input type="password" name="pwd" class="form-control" placeholder="{{ _('Leave blank if not changing') }}">
    </div>

    <div class="form-group">
        {{ form.pwd_confirm.label(class_='form-label') }}
        <input type="password" name="pwd_confirm" class="form-control" placeholder="{{ _('Leave blank if not changing') }}">
    </div>

    <div class="form-group form-check">
        {{ form.admin(class_='form-check-input') }}
        {{ form.admin.label(class_='form-check-label') }}
    </div>

    <div class="form-group">
        {{ form.scopes.label(class_='form-label') }}
        <div class="form-text text-muted">{{ form.scopes.description }}</div>
        <div>
            {% for value, label, checked in form.scopes.iter_choices() %}
                <div class="form-check">
                    <input class="form-check-input" type="checkbox" name="{{ form.scopes.name }}" value="{{ value }}" {% if checked %} checked {% endif %}>
                    <label class="form-check-label">{{ label }}</label>
                </div>
            {% endfor %}
        </div>
    </div>

    <div class="form-group">
        {{ form.submit_btn(class_='btn btn-primary') }}
    </div>
</form>

{% endblock %}