fix: replace 'hijack' with 'become' on button

This commit is contained in:
James Graham
2021-02-08 15:59:02 +00:00
parent 0c92554561
commit 8a94a46cd5

View File

@@ -37,7 +37,8 @@
<a class="btn btn-success"
href="{% url 'people:person.update' pk=person.pk %}">Update</a>
{% if person.user == request.user %}
{% load hijack_tags %}
{% if person.user == request.user and not request|is_hijacked %}
<a class="btn btn-info"
href="{% url 'password_change' %}?next={{ person.get_absolute_url }}">Change Password</a>
{% endif %}
@@ -45,7 +46,7 @@
{% if request.user.is_superuser and person.user %}
<form style="display: inline;" action="/hijack/{{ person.user.pk }}/" method="post">
{% csrf_token %}
<button class="btn btn-warning" type="submit">Hijack {{ person.name }}</button>
<button class="btn btn-warning" type="submit">Become {{ person.name }}</button>
</form>
{% endif %}