{% extends "base.html" %}

{% block title %}Profile | left4me{% endblock %}

{% block content %}
<section class="panel">
  <h1>Change password</h1>

  {% if success %}
    <p class="muted">Password changed.</p>
  {% endif %}
  {% if error_message %}
    <p class="error">{{ error_message }}</p>
  {% endif %}

  <form method="post" action="/profile/password" class="form">
    <input type="hidden" name="csrf_token" value="{{ session.get('csrf_token', '') }}">
    <label>
      Current password
      <input type="password" name="current_password" autocomplete="current-password" required>
    </label>
    <label>
      New password
      <input type="password" name="new_password" autocomplete="new-password" required>
    </label>
    <label>
      Confirm new password
      <input type="password" name="confirm_new_password" autocomplete="new-password" required>
    </label>
    <button type="submit">Change password</button>
  </form>
</section>
{% endblock %}
