{% include 'header.twig' %}

<style>
    .Kpcss {

        min-height: 20px;
        padding: 19px;
        margin-bottom: 20px;
        background-color: #ffffff;
        border: 1px solid #000000;
        border-radius: 13px;

        box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, .2),
        -1px -1px 5px rgba(0, 0, 0, .1);

    }
    .Kpcss2 {
        min-height: 20px;
        padding: 19px;
        margin-bottom: 20px;
        background-color: #ffffff;
        border: 1px solid #059fff;
        border-radius: 13px;

        box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, .2),
        -1px -1px 5px rgba(0, 0, 0, .1);

    }  

        </style>      
<div class="container">
  <div class="row">
    <div class="col-md-8 col-md-offset-2">

      {% 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 class="Kpcss2"class="well">
        <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.username'] }}</label>
          <input type="text" class="form-control" value="{{ user['username'] }}" readonly>
        </div>
        							<div class="form-group">
												<label>{{ lang['account.name'] }}</label>
												<input type="text" class="form-control" id="name" value="{{ user['name'] }}" readonly>
											</div>

											<div class="form-group">
												<label>{{ lang['account.email'] }}</label>
												<input type="text" class="form-control" id="email" value="{{ user['email'] }}" readonly>
											</div>

											<div class="form-group">
												<label>{{ lang['account.telephone'] }}</label>
												<input type="text" class="form-control" id="telephone" value="{{ user['telephone'] }}" readonly>
											
      </div>
           </div>

      <div class="Kpcss2"class="well">
        <form method="post" action="account">
          <div class="form-group">
            <label for="charge" class="control-label">{{ lang['account.password.current'] }}</label>
            <input type="password" class="form-control" name="current_password">
          </div>

          <div class="form-group">
            <label for="charge" class="control-label">{{ lang['account.password.new'] }}</label>
            <input type="password" class="form-control" name="password">
          </div>

          <div class="form-group">
            <label for="charge" class="control-label">{{ lang['account.password.confirm'] }}</label>
            <input type="password" class="form-control" name="confirm_password">
          </div>
          <button type="submit" class="btn btn-primary">{{ lang['account.password.button'] }}</button>
        </form>
      </div>

      {% if site['languages']|length > 1 %}
        <div class="Kpcss2"class="well">
          <form method="post" action="account/change_lang">

            <div class="form-group">
              <label for="charge" class="control-label">{{ lang['account.changelang.title'] }}</label>
              <select class="form-control" name="lang">
                  {% for language in site['languages'] %}
                  <option {% if language["code"] == user["lang"] %} selected {% endif %} value="{{ language["code"] }}">{{ language["name"] }}</option>
                  {% endfor %}
              </select>
            </div>

            <button type="submit" class="btn btn-primary">{{ lang['account.changelang.button'] }}</button>
          </form>
        </div>
       {% endif %}

       <div class="Kpcss2"class="well">
         <form method="post" action="account/timezone">

           <div class="form-group">
             <label for="charge" class="control-label">{{ lang['account.timezone.title'] }}</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">{{ lang['account.timezone.button'] }}</button>
         </form>
       </div>

      <div class="Kpcss2"class="well">
        <form method="post" action="account/newapikey">
          <div class="form-group">
            <label for="charge" class="control-label">API Link</label>
            <input type="text" class="form-control" value="{{ site['url'] }}/api/v2" readonly>
          </div>

          <div class="form-group">
            <label for="charge" class="control-label">API Key</label>
            <input type="text" class="form-control" value="{{ user['apikey'] }}" readonly>
          </div>
          <button type="submit" class="btn btn-primary">{{ lang['account.generate.key'] }}</button>
        </form>
      </div>

    </div>
  </div>
</div>


{% include 'footer.twig' %}
