{#-
 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 %}
<li class="active"><a href="{{ url_for('frontend.user_index') }}">Users <span
                      class="sr-only">(current)</span></a></li>
{% endblock %}
{% block body %}
<div class="page-header first-header">
  <h2>Add User</h2>
</div>
<form id="adduserform" method="post">
  <div class="form-group">
    <label class="sr-only" for="user">Username</label>
    <div class="input-group">
      <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>
      <input type="text" class="form-control" id="user" name="user" value="{{ request.form.name }}" placeholder="Username" />
      <span class="input-group-addon">
        <label for="admin">Admin</label>
        <input type="checkbox" id="admin" name="admin" {{ 'checked="checked"' if 'admin' in request.form }} />
      </span>
    </div>
  </div>
  <div class="form-group">
    <label class="sr-only" for="passwd">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="passwd" name="passwd" placeholder="Password" />
    </div>
  </div>
  <div class="form-group">
    <label class="sr-only" for="passwd_confirm">Confirm</label>
    <div class="input-group">
      <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
      <input type="password" class="form-control" id="passwd_confirm" name="passwd_confirm" placeholder="Confirm" />
    </div>
  </div>
  <div class="form-group">
    <label class="sr-only" for="mail">eMail</label>
    <div class="input-group">
      <div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div>
      <input type="text" class="form-control" id="mail" name="mail" value="{{ request.form.mail }}" placeholder="eMail" />
    </div>
  </div>
  <input type="submit" class="btn btn-default" />
</form>
{% endblock %}
