added admin password setting function

This commit is contained in:
smile 2013-10-26 22:40:47 +02:00
parent 5597676bb5
commit 56c684d355
6 changed files with 109 additions and 5 deletions

View 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 %}

View 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 %}

View file

@ -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 %}