summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/auth/add_user.html
blob: cc5ed097de3b032bef8f577d8de6488fcb0c348a (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_add %}active{% endblock %}
{% block content %}

<h1 class="m-5">{{_('Add a user')}}</h1>

<form action="{{ url_for('user_add_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') }}
        {{ form.pwd(class_='form-control') }}
    </div>

    <div class="form-group">
        {{ form.pwd_confirm.label(class_='form-label') }}
        {{ form.pwd_confirm(class_='form-control') }}
    </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 %}