change_password.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n admin_static admin_modify %}
  3. {% load url from future %}
  4. {% load admin_urls %}
  5. {% block extrahead %}{{ block.super }}
  6. {% url 'admin:jsi18n' as jsi18nurl %}
  7. <script type="text/javascript" src="{{ jsi18nurl|default:"../../../../jsi18n/" }}"></script>
  8. {% endblock %}
  9. {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %}
  10. {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
  11. {% if not is_popup %}
  12. {% block breadcrumbs %}
  13. <div class="breadcrumbs">
  14. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  15. &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_label|capfirst|escape }}</a>
  16. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
  17. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}{{ original.pk }}">{{ original|truncatewords:"18" }}</a>
  18. &rsaquo; {% trans 'Change password' %}
  19. </div>
  20. {% endblock %}
  21. {% endif %}
  22. {% block content %}<div id="content-main">
  23. <form action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
  24. <div>
  25. {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
  26. {% if form.errors %}
  27. <p class="errornote">
  28. {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
  29. </p>
  30. {% endif %}
  31. <p>{% blocktrans with username=original.username %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}</p>
  32. <fieldset class="module aligned">
  33. <div class="form-row">
  34. {{ form.password1.errors }}
  35. {# TODO: get required class on label_tag #}
  36. <label for="id_password1" class="required">{% trans 'Password' %}:</label> {{ form.password1 }}
  37. </div>
  38. <div class="form-row">
  39. {{ form.password2.errors }}
  40. {# TODO: get required class on label_tag #}
  41. <label for="id_password2" class="required">{% trans 'Password (again)' %}:</label> {{ form.password2 }}
  42. <p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
  43. </div>
  44. </fieldset>
  45. <div class="submit-row">
  46. <input type="submit" value="{% trans 'Change password' %}" class="default" />
  47. </div>
  48. <script type="text/javascript">document.getElementById("id_password1").focus();</script>
  49. </div>
  50. </form></div>
  51. {% endblock %}