Implement user adding in frontend (already pushed some files in c82868a4
)
This commit is contained in:
parent
c82868a40d
commit
ff17fb284f
2 changed files with 48 additions and 1 deletions
47
templates/manager/adduser.html
Normal file
47
templates/manager/adduser.html
Normal file
|
@ -0,0 +1,47 @@
|
|||
{% 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 value="{{ choice.id }}">{{ choice }}</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 %}
|
|
@ -77,7 +77,7 @@
|
|||
<th>Username</th>
|
||||
<th>Real name</th>
|
||||
<th>Last Activity</th>
|
||||
<th>Options</th>
|
||||
<th>Options {% if user.is_superuser %}<a href="/makeuser/" style="font-weight:bold;color:green;"><i class="fas fa-plus" title="Add User"></i></a>{% endif %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
|
Loading…
Reference in a new issue