{% import 'macros/form_inputs.html' as form_inputs %}

{% extends "auth_layout.html" %}

{% block head_title %}{{ _('Reset password') }}{% endblock %}

{% block title %}{{ _('Reset password') }}{% endblock %}

{% block auth_form %}
  <form method="POST" action="{{ tenant.url_for(request, 'reset:reset.post') }}">
    <div class="space-y-4">
      <div>
        {{ form_inputs.form_input_label(_('New password'), 'input-password', True) }}
        <input id="input-password" class="form-input w-full" type="password" name="password" value="{{ form_data.get('password') if form_data is defined else ''}}" required />
        {% if form_errors is defined and form_errors.password %}
          <div id="errors-password" class="text-xs mt-1 text-red-500">{{ form_errors.password }}</div>
        {% endif %}
      </div>
    </div>
    <input type="hidden" name="token" value="{{ form_data.get('token') if form_data is defined else token }}" />
    {% block csrf %}{{ super() }}{% endblock %}
    <div class="flex items-center justify-between mt-6">
      <div></div>
      <button type="submit" class="btn bg-primary hover:bg-primary-hover text-white ml-3">{{ _('Reset my password') }}</button>
    </div>
  </form>
{% endblock %}
