{#-
 This file is part of Supysonic.
 Supysonic is a Python implementation of the Subsonic server API.

 Copyright (C) 2013-2018 Alban 'spl0k' Féron
                    2017 Óscar García Amor

 Distributed under terms of the GNU AGPLv3 license.
-#}
{% extends "layout.html" %}
{% block navbar_users %}
{% if request.user.id != user.id %}
<li class="active"><a href="{{ url_for('frontend.user_index') }}">Users <span
                      class="sr-only">(current)</span></a></li>
{% else %}
{{ super() }}
{% endif %}
{% endblock %}
{% block navbar_profile %}
{% if request.user.id == user.id %}
<li class="active"><a href="{{ url_for('frontend.user_profile', uid = 'me') }}">{{ request.user.name }} <span class="sr-only">(current)</span></a></li>
{% else %}
{{ super() }}
{% endif %}
{% endblock %}
{% block body %}
<div class="page-header first-header">
  <h2>{{ user.name }}</h2>
</div>
<form method="post">
  {% if request.user.id == user.id %}
  <div class="form-group">
    <label class="sr-only" for="current">Current password</label>
    <div class="input-group">
      <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
      <input type="password" class="form-control" id="current" name="current" placeholder="Current password" />
    </div>
  </div>
  {% endif %}
  <div class="form-group">
    <label class="sr-only" for="new">New password</label>
    <div class="input-group">
      <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
      <input type="password" class="form-control" id="new" name="new" placeholder="New password" />
    </div>
  </div>
  <div class="form-group">
    <label class="sr-only" for="confirm">Confirm password</label>
    <div class="input-group">
      <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
      <input type="password" class="form-control" id="confirm" name="confirm" placeholder="Confirm password" />
    </div>
  </div>
  <input type="submit" class="btn btn-default" />
</form>
{% endblock %}
