{# -*- coding: utf-8 -*-

  This file is part of Invenio.
  Copyright (C) 2015-2018 CERN.

  Invenio is free software; you can redistribute it and/or modify it
  under the terms of the MIT License; see LICENSE file for more details.
#}
{%- extends config.ACCOUNTS_SETTINGS_TEMPLATE %}

{% from "invenio_accounts/_macros.html" import render_field, form_errors %}

{% set panel_title = _("Change password") %}
{% set panel_icon = "fa fa-key" %}

{% block settings_form %}
{%- with form = change_password_form %}
<form action="{{ url_for_security('change_password') }}" method="POST" name="change_password_form">
{{form_errors(form)}}
{{form.hidden_tag()}}
<div class="form-group">
    <label class="control-label" for="password">{{_('Current password')}}</label>
    {{ render_field(form.password, autofocus=True, errormsg=False, size="") }}
</div>
<div class="form-group">
    <label class="control-label" for="new_password">{{_('New password')}}</label>
    {{ render_field(form.new_password, errormsg=False, size="") }}
</div>
<div class="form-group">
    <label class="control-label" for="new_password_confirm">{{_('Confirm new password')}}</label>
    {{ render_field(form.new_password_confirm, errormsg=False, size="") }}
</div>
<div class="form-actions">
    <button type="submit" class="btn btn-primary">{{_('Change Password')}}</button>
</div>
</form>
{%- endwith %}
{% endblock settings_form %}
