{% extends "base.html" %}
{% set active_page = "account" %}

{% block contents %}
<h1>Account settings</h1>
{% if error %}
<div class="alert alert-danger">{{ error }}</div>
{% endif %}
<form action="{{ reverse_url('account') }}" method="post">
  {{ xsrf_form_html() }}
  <div class="form-group row">
    <label for="login" class="col-sm-2 col-form-label">Login</label>
    <div class="col-sm-10">
      <input type="text" id="login" class="form-control" value="{{ user.login }}" disabled />
    </div>
  </div>
  <div class="form-group row">
    <label for="email" class="col-sm-2 col-form-label">Email</label>
    <div class="col-sm-10">
      <input type="text" name="email" id="email" class="form-control" value="{{ user.email or '' }}" />
      <small>Optional. <em>We will not share your password with anyone. This is only used in case you forget your password.</em></small>
    </div>
  </div>
  <div class="form-group row">
    <label for="password1" class="col-sm-2 col-form-label">New password</label>
    <div class="col-sm-10">
      <input type="password" name="password1" id="password1" class="form-control" />
    </div>
  </div>
  <div class="form-group row">
    <label for="password2" class="col-sm-2 col-form-label">Repeat new password</label>
    <div class="col-sm-10">
      <input type="password" name="password2" id="password2" class="form-control" />
    </div>
  </div>
  <div class="form-group row">
    <div class="col-sm-10 offset-sm-2">
      <button type="submit" class="btn btn-primary">Update</button>
    </div>
  </div>
</form>
{% endblock %}
