vpnmanager/templates/manager/edituser.html

45 lines
1.8 KiB
HTML
Raw Normal View History

2019-01-13 12:55:53 +00:00
{% 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>
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>
<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 %}
2019-01-13 12:55:53 +00:00
</form>
{% endblock %}