vpnmanager/templates/manager/edituser.html

44 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% 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>
{% if user.is_staff %}
<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>
{% endif %}
{% 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 %}
<input hidden value="sent" name="form"/>
<button type="submit" class="btn btn-success">Apply Changes</button>
<a class="btn btn-danger" href="/" role="button">Cancel</a>
{% if user == auser %}
<a class="btn btn-info" href="/account/two_factor/" role="button">Two-Factor Settings</a>
{% endif %}
</form>
{% endblock %}