{% extends "nopaque.html.j2" %}

{% block page_content %}
<div class="col s12 m4">
  <h3 id="title">{{ user.username }}</h3>
  <p id="description">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
  <a class="waves-effect waves-light btn" href="{{ url_for('admin.user', user_id=user.id) }}"><i class="material-icons left">arrow_back</i>Back to user administration</a>
</div>

<div class="col s12 m8">
  <div class="card">
    <form method="POST">
      <div class="card-content">
        {{ edit_user_form.hidden_tag() }}
        <div class="input-field ">
          <i class="material-icons prefix">account_circle</i>
          {{ edit_user_form.username() }}
          {{ edit_user_form.username.label }}
          {% for error in edit_user_form.username.errors %}
          <span class="helper-text red-text">{{ error }}</span>
          {% endfor %}
        </div>
        <div class="input-field">
          <i class="material-icons prefix">mail</i>
          {{ edit_user_form.email() }}
          {{ edit_user_form.email.label }}
          {% for error in edit_user_form.email.errors %}
          <span class="helper-text red-text">{{ error }}</span>
          {% endfor %}
        </div>
        <div class="input-field">
          <i class="material-icons prefix">swap_vert</i>
          {{ edit_user_form.role() }}
          {{ edit_user_form.role.label }}
          {% for error in edit_user_form.role.errors %}
          <span class="helper-text red-text">{{ error }}</span>
          {% endfor %}
        </div>
        <div class="switch">
          <i class="material-icons prefix">check</i>
          <label>
            Confirmed
            {{ edit_user_form.confirmed() }}
            <span class="lever"></span>
          </label>
          {% for error in edit_user_form.confirmed.errors %}
          <span class="helper-text red-text">{{ error }}</span>
          {% endfor %}
        </div>
      </div>
      <div class="card-action right-align">
        {{ macros.submit_button(edit_user_form.submit) }}
      </div>
    </form>
  </div>
</div>

{% endblock %}
