Allow users to modify themselves
This commit is contained in:
parent
bef927d2ae
commit
243fe5c6a5
2 changed files with 3 additions and 1 deletions
|
@ -20,10 +20,12 @@
|
||||||
<label for="email">Email Address</label>
|
<label for="email">Email Address</label>
|
||||||
<input type="email" required class="form-control" id="email" name="email" value="{{ auser.email }}"></input>
|
<input type="email" required class="form-control" id="email" name="email" value="{{ auser.email }}"></input>
|
||||||
</div>
|
</div>
|
||||||
|
{% if user.is_staff %}
|
||||||
<div class="form-group form-check">
|
<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">
|
<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>
|
<label class="form-check-label" for="staff">Grant special privileges to user</label>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
<input hidden value="sent" name="form"/>
|
<input hidden value="sent" name="form"/>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-success">Apply Changes</button>
|
<button type="submit" class="btn btn-success">Apply Changes</button>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<p><b>Organization:</b> {{ organization }}</p>
|
<p><b>Organization:</b> {{ organization }}</p>
|
||||||
<p><b>User:</b> {{ user.first_name }} {{ user.last_name }} ({{ user.username }})</p>
|
<p><b>User:</b> {{ user.first_name }} {{ user.last_name }} ({{ user.username }}) <a href="/user/{{ user.id }}/edit"><i class="fas fa-edit" title="Edit User"></i></a></p>
|
||||||
|
|
||||||
<div align="center"><b>Manage:</b> <a id="linkdevices" href="#" onclick="showdevices();">Devices</a> ‐ <a id="linkwifi" href="#" onclick="showwifi();">WiFi</a>{% if user.is_staff %} ‐ <a id="linkusers" href="#" onclick="showusers();">Users</a>{% endif %}</div>
|
<div align="center"><b>Manage:</b> <a id="linkdevices" href="#" onclick="showdevices();">Devices</a> ‐ <a id="linkwifi" href="#" onclick="showwifi();">WiFi</a>{% if user.is_staff %} ‐ <a id="linkusers" href="#" onclick="showusers();">Users</a>{% endif %}</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue