{% extends "sidebar.html" %}
{% load i18n %}

{% block meta %}
  <!-- NOTE(joshblum): This prevents leaking the password reset token via the
  Referer header to any 3rd party apps on the page. -->
  <meta name="referrer" content="origin">
{% endblock %}

{% block content %}
  <main class="main" data-render-sidebar=true>
    <div class="main__container">
      {% if validlink %}
        {% url 'accounts:login' as cancel_url %}
        {% trans "Enter your new password below to reset your password:" as title %}
        {% trans "Change password" as confirm_text %}
        {% include "components/form/form.html" with form=form title=title confirm_text=confirm_text cancel_url=cancel_url %}
      {% else %}
        {% trans "Password reset unsuccessful" as header_text %}
        {% url 'accounts:password-reset' as reset_url %}
        {% blocktrans asvar content %}
          Password reset unsuccessful. Please
          <a class="link" href="{{ reset_url }}">try again.</a>
        {% endblocktrans %}

        {% include "components/card/card.html" with header_text=header_text content=content %}
      {% endif %}
    </div>
  </main>
{% endblock %}

{# This is used by django.contrib.auth #}
