{% include 'header.twig' %}
        <div class="container-fluid">
  <div class="row">
    <div class="col-sm-12">
      <div class="alert alert-dismissible alert-success ">
      
        {% if error %}
        <div class="alert alert-dismissible alert-danger">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ errorText }}
        </div>
      {% endif %}
      {% if success %}
        <div class="alert alert-dismissible alert-success">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ successText }}
        </div>
      {% endif %}

    </div>
    <div class="col-sm-6">
      <div class="dark-well">
        <div class="form-group">
          <label for="username" class="control-label">Username</label>
          <input type="text" class="form-control" id="username" value="{{ user['username'] }}" readonly>
        </div>
      </div>

      <div class="dark-well">
        <form  method="post" action="">
                    <div class="form-group">
            <label for="current" class="control-label">Current password</label>
            <input type="password" class="form-control" id="current" name="current_password">
          </div>
          <div class="form-group">
            <label for="new" class="control-label">New password</label>
            <input type="password" class="form-control" id="new" name="password">
          </div>
          <div class="form-group">
            <label for="confirm" class="control-label">Confirm new password</label>
            <input type="password" class="form-control" id="confirm" name="confirm_password">
          </div>

         
          <button type="submit" class="btn btn-primary">Change password</button>
        </form>
      </div>
    </div>
    <div class="col-sm-6">
      
      <div class="dark-well">
        <form  action="" method="post">
          <div class="form-group">
            <label for="timezone" class="control-label">Timezone</label>
             <select class="form-control" name="timezone">
                           {% for timezone in timezones %}
											 <option {% if timezone["timezone"] == user['timezone'] %} selected {% endif %} value="{{ timezone["timezone"] }}">{{ timezone["label"] }}</option>
											 {% endfor %}
                          </select>
          </div>

          
          <button type="submit" class="btn btn-primary">Save</button>
        </form>
      </div>
      <div class="dark-well">
        <form  action="/account/newapikey" method="post">
          <div class="form-group">
            <label for="key" class="control-label">API Key</label>
                        <input type="text" class="form-control" id="api_key" value="{{ user['apikey'] }}" readonly>
                      </div>

          <input type="hidden" name="_csrf" value="Ga9_LE0DzxfZBI04CuOMFY8hQ7XoULb6epZP9dk-54Rv6xoBB229IKhBz01jpdtivBA737ko5Mwz_hvCkU6Bzw==">
          <button type="submit" class="btn btn-primary">Generate new</button>
        </form>
      </div>
    </div>

  </div>
</div>




        </div>
      </div>
{% include 'footer.twig' %}
