Blob Blame Raw
{% extends "master.html" %}
{% from "_formhelper.html" import render_field_in_cell %}

{% block title %}{{ user.user }}'s settings{% endblock %}
{%block tag %}users{% endblock %}


{% block content %}
<section class="user_settings">
    <header>
        <h2>{{ user.user }}'s settings</h2>
    </header>
  <form action="{{ url_for('user_settings') }}" method="post">
    <table>
      <tr>
        <th>Full name</th>
        <td> {{ user.fullname }} </td>
      </tr>
      <tr>
        <th rowspan="{{ user.emails | length }}">Emails</th>
        {% for email in user.emails %}
        {% if loop.first %}
          <td> {{ email.email }} </td>
        {% elif loop.last %}
      </tr>
      <tr>
          <td>{{ email.email }}</td>
        {% else %}
      </tr>
      <tr>
            <td>{{ email.email }}</td>
        {% endif %}
        {% endfor %}
      </tr>
      <tr>
        {{ render_field_in_cell(form.ssh_key) }}
      </tr>
    </table>
    <p class="buttons indent">
      <input type="submit" class="submit positive button" value="Update">
      <input type="button" value="Cancel" class="button" onclick="history.back();">
      {{ form.csrf_token }}
</p>
  </form>
    <aside>
        <div id="profile_button">
            <a href="{{ url_for('view_user', username=user.user) }}">Public profile page</a>
        </div>
    </aside>

</section>
{% endblock %}