added admin password setting function
This commit is contained in:
parent
5597676bb5
commit
56c684d355
6 changed files with 109 additions and 5 deletions
9
account/templates/access_denied.html
Normal file
9
account/templates/access_denied.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "member_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block form_title %}{% trans "Password"%}{% endblock %}
|
||||
|
||||
{% block container %}
|
||||
<div class="alert alert-error">{% blocktrans %}ACCESS DENIED{% endblocktrans %}</div>
|
||||
{% endblock %}
|
||||
22
account/templates/admin.html
Normal file
22
account/templates/admin.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "form_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block form_title %}{% trans "Admin Password"%}{% endblock %}
|
||||
|
||||
{% block form_description %}
|
||||
<p>{% blocktrans %}You can change other users passwords here.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_fields %}
|
||||
<form action="{% url account.views.admin %}" method="post" class="form-horizontal well">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Save"%}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock form_fields %}
|
||||
|
|
@ -36,6 +36,14 @@
|
|||
<li class="{% if request.path == sippin_url %}active{% endif %}">
|
||||
<a href="{{ sippin_url }}">{% trans "SIP-PIN" %}</a>
|
||||
</li>
|
||||
{% for group in request.user.groups.all %}
|
||||
{% if group.name == 'ldap_admins' %}
|
||||
{% url account.views.admin as admin_url %}
|
||||
<li class="{% if request.path == admin_url %}active{% endif %}">
|
||||
<a href="{{ admin_url }}">{% trans "Admin" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% block container %}{% endblock container %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue