2019-01-13 12:55:53 +00:00
|
|
|
{% extends "base.html" %}
|
2019-02-02 10:03:33 +00:00
|
|
|
{% load manager %}
|
2019-01-13 12:55:53 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<form action="#" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="username">Username</label>
|
|
|
|
<input type="text" disabled class="form-control" id="username" value="{{ auser.username }}"></input>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="firstname">First Name</label>
|
|
|
|
<input type="text" class="form-control" id="firstname" name="firstname" value="{{ auser.first_name }}"></input>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="lastname">Last Name</label>
|
|
|
|
<input type="text" class="form-control" id="lastname" name="lastname" value="{{ auser.last_name }}"></input>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="email">Email Address</label>
|
|
|
|
<input type="email" required class="form-control" id="email" name="email" value="{{ auser.email }}"></input>
|
|
|
|
</div>
|
2019-02-02 10:03:33 +00:00
|
|
|
{% if user.is_superuser %}
|
|
|
|
<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 in auser.organization_set.all %} selected {% endif %} value="{{ choice.id }}">{{ choice }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2019-01-17 08:40:46 +00:00
|
|
|
{% if user.is_staff %}
|
2019-01-13 12:55:53 +00:00
|
|
|
<div class="form-group form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" value="True" {% if auser.is_staff %} checked {% endif %} id="staff" name="staff">
|
|
|
|
<label class="form-check-label" for="staff">Grant special privileges to user</label>
|
|
|
|
</div>
|
2019-01-17 08:40:46 +00:00
|
|
|
{% endif %}
|
2019-01-17 08:52:38 +00:00
|
|
|
{% if user.is_superuser %}
|
|
|
|
<div class="form-group form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" value="True" {% if auser.is_superuser %} checked {% endif %} id="superuser" name="superuser">
|
|
|
|
<label class="form-check-label" for="superuser">Grant superuser privileges to user</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2019-01-13 12:55:53 +00:00
|
|
|
<input hidden value="sent" name="form"/>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-success">Apply Changes</button>
|
2019-02-02 10:31:30 +00:00
|
|
|
<a class="btn btn-danger" href="/users/" role="button">Cancel</a>
|
2019-01-17 11:48:48 +00:00
|
|
|
{% if user == auser %}
|
|
|
|
<a class="btn btn-info" href="/account/two_factor/" role="button">Two-Factor Settings</a>
|
|
|
|
{% endif %}
|
2019-01-13 12:55:53 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
{% endblock %}
|