{% extends "base.html" %}
{% from "security/_macros.html" import render_field_with_errors, render_field %}

<div class="container" role="main">
  {% block content %}
  {% with messages = get_flashed_messages() %}
    {% if messages %}
      {% for message in messages %}
      <div class="alert alert-warning" role="alert">
        {{ message }}
      </div>
      {% endfor %}
    {% endif %}
  {% endwith %}
  <div class="container" style="margin-top:15px;padding:20px;">
    <h1>{{ _('Change password') }}</h1>
    <form action="{{ url_for_security('change_password') }}" method="POST" name="change_password_form">
      {{ change_password_form.hidden_tag() }}
      {{ render_field_with_errors(change_password_form.password) }}
      {{ render_field_with_errors(change_password_form.new_password) }}
      {{ render_field_with_errors(change_password_form.new_password_confirm) }}
      {{ render_field(change_password_form.submit) }}
    </form>

  </div>
</div>

{% endblock %}
{% block styles %}
{{super()}}
<style>
label {min-width: 7em;}
body {
  margin-top: 50px;
}

</style>
{% endblock %}
