47 lines
1.9 KiB
HTML
47 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load manager %}
|
|
|
|
{% block content %}
|
|
|
|
<form action="#" method="post">
|
|
{% csrf_token %}
|
|
<div class="form-group">
|
|
<label for="username">Username</label>
|
|
<input type="text" class="form-control" id="username" name="username"></input>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="firstname">First Name</label>
|
|
<input type="text" class="form-control" id="firstname" name="firstname"></input>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="lastname">Last Name</label>
|
|
<input type="text" class="form-control" id="lastname" name="lastname"></input>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="email">Email Address</label>
|
|
<input type="email" required class="form-control" id="email" name="email"></input>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="orga">Assigned Organizations</label>
|
|
<select multiple required class="custom-select mr-sm-2" id="orga" name="orga">
|
|
{% allOrgas as orgas %}
|
|
{% for choice in orgas %}
|
|
<option {% if choice.userlimit and choice.userlimit <= choice.users.all|length %}disabled{% endif %} value="{{ choice.id }}">{{ choice }} {% if choice.userlimit %}({{ choice.users.all|length }} / {{ choice.userlimit }}){% endif %}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group form-check">
|
|
<input class="form-check-input" type="checkbox" value="True" id="staff" name="staff">
|
|
<label class="form-check-label" for="staff">Grant special privileges to user</label>
|
|
</div>
|
|
<div class="form-group form-check">
|
|
<input class="form-check-input" type="checkbox" value="True" id="superuser" name="superuser">
|
|
<label class="form-check-label" for="superuser">Grant superuser privileges to user</label>
|
|
</div>
|
|
<input hidden value="sent" name="form"/>
|
|
|
|
<button type="submit" class="btn btn-success">Create User and Send Password</button>
|
|
<a class="btn btn-danger" href="/users/" role="button">Cancel</a>
|
|
</form>
|
|
|
|
{% endblock %}
|