forked from extern/django-helpdesk
Merge 0.2.15 bugfixes
This commit is contained in:
commit
519236c288
@ -98,6 +98,9 @@ HELPDESK_SUBMIT_A_TICKET_PUBLIC = True
|
|||||||
# Should the Knowledgebase be enabled?
|
# Should the Knowledgebase be enabled?
|
||||||
HELPDESK_KB_ENABLED = True
|
HELPDESK_KB_ENABLED = True
|
||||||
|
|
||||||
|
# Allow users to change their passwords
|
||||||
|
HELPDESK_SHOW_CHANGE_PASSWORD = True
|
||||||
|
|
||||||
# Instead of showing the public web portal first,
|
# Instead of showing the public web portal first,
|
||||||
# we can instead redirect users straight to the login page.
|
# we can instead redirect users straight to the login page.
|
||||||
HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False
|
HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False
|
||||||
|
@ -77,3 +77,7 @@ Add your custom styles here
|
|||||||
}
|
}
|
||||||
#helpdesk-body {padding-top: 100px;}
|
#helpdesk-body {padding-top: 100px;}
|
||||||
img.brand {padding-right: 30px;}
|
img.brand {padding-right: 30px;}
|
||||||
|
|
||||||
|
div.card-body img {
|
||||||
|
max-width: 900px;
|
||||||
|
}
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<a class="dropdown-item" href="{% url 'helpdesk:user_settings' %}"><i class="fas fa-fw fa-user-cog"></i> {% trans "User Settings" %}</a>
|
<a class="dropdown-item" href="{% url 'helpdesk:user_settings' %}"><i class="fas fa-fw fa-user-cog"></i> {% trans "User Settings" %}</a>
|
||||||
<a class="dropdown-item" href='{% url 'helpdesk:rss_index' %}'><i class="fas fa-fw fa-rss-square"></i> {% trans "RSS Feeds" %}</a>
|
<a class="dropdown-item" href='{% url 'helpdesk:rss_index' %}'><i class="fas fa-fw fa-rss-square"></i> {% trans "RSS Feeds" %}</a>
|
||||||
{% if helpdesk_settings.HELPDESK_SHOW_CHANGE_PASSWORD and user.has_usable_password %}
|
{% if helpdesk_settings.HELPDESK_SHOW_CHANGE_PASSWORD and user.has_usable_password %}
|
||||||
<a class="dropdown-item" href="{% url 'auth_password_change' %}"><i class="fas fa-fw fa-user-secret"></i> {% trans "Change password" %}</a>
|
<a class="dropdown-item" href="{% url 'helpdesk:password_change' %}"><i class="fas fa-fw fa-user-secret"></i> {% trans "Change password" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
{% if user.is_superuser %}
|
{% if user.is_superuser %}
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
{% extends "helpdesk/base.html" %}{% load i18n %}
|
||||||
|
{% block helpdesk_title %}{% trans "Change password" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block helpdesk_body %}
|
||||||
|
|
||||||
|
<h3>{% trans "Change Password" %}</h3>
|
||||||
|
|
||||||
|
<form method="post">{% csrf_token %}
|
||||||
|
<div>
|
||||||
|
{% if form.errors %}
|
||||||
|
<p class="errornote">
|
||||||
|
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||||
|
|
||||||
|
<fieldset class="module aligned wide">
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
{{ form.old_password.errors }}
|
||||||
|
{{ form.old_password.label_tag }} {{ form.old_password }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
{{ form.new_password1.errors }}
|
||||||
|
{{ form.new_password1.label_tag }} {{ form.new_password1 }}
|
||||||
|
{% if form.new_password1.help_text %}
|
||||||
|
<div class="help">{{ form.new_password1.help_text|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
{{ form.new_password2.errors }}
|
||||||
|
{{ form.new_password2.label_tag }} {{ form.new_password2 }}
|
||||||
|
{% if form.new_password2.help_text %}
|
||||||
|
<div class="help">{{ form.new_password2.help_text|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<div class="submit-row">
|
||||||
|
<input type="submit" value="{% trans 'Change my password' %}" class="default">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% endblock helpdesk_body %}
|
@ -0,0 +1,10 @@
|
|||||||
|
{% extends "helpdesk/base.html" %}{% load i18n %}
|
||||||
|
{% block helpdesk_title %}{% trans "Change password" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block helpdesk_body %}
|
||||||
|
|
||||||
|
<h3>{% trans "Success!" %}</h3>
|
||||||
|
|
||||||
|
<p>{% trans 'Your password was changed.' %}</p>
|
||||||
|
|
||||||
|
{% endblock helpdesk_body %}
|
@ -203,6 +203,17 @@ urlpatterns += [
|
|||||||
template_name='helpdesk/registration/login.html',
|
template_name='helpdesk/registration/login.html',
|
||||||
next_page='../'),
|
next_page='../'),
|
||||||
name='logout'),
|
name='logout'),
|
||||||
|
|
||||||
|
url(r'^password_change/$',
|
||||||
|
auth_views.PasswordChangeView.as_view(
|
||||||
|
template_name='helpdesk/registration/change_password.html',
|
||||||
|
success_url='./done'),
|
||||||
|
name='password_change'),
|
||||||
|
|
||||||
|
url(r'^password_change/done$',
|
||||||
|
auth_views.PasswordChangeDoneView.as_view(
|
||||||
|
template_name='helpdesk/registration/change_password_done.html',),
|
||||||
|
name='password_change_done'),
|
||||||
]
|
]
|
||||||
|
|
||||||
if helpdesk_settings.HELPDESK_KB_ENABLED:
|
if helpdesk_settings.HELPDESK_KB_ENABLED:
|
||||||
|
Loading…
Reference in New Issue
Block a user