{% extends "base.html" %}
{% load i18n %}

{% block title %}{% trans "Profile" %}{% endblock %}

{% block page-title %}
  {% trans "Profile for" %} {{ user.username }}
{% endblock %}

{% block content %}
    <form action="{% url inhouse.views.edit_profile %}" method="post">
    <table>
      <tr><td><h3>{% trans "Account information" %}</h3></td></tr>
      <tr>
        <th><label for="id_first_name">{{ form.first_name.label }}:</label></th>
        <td>{{ form.first_name }}</td>
      </tr>
      <tr>
        <th><label for="id_last_name">{{ form.last_name.label }}:</label></th>
        <td>{{ form.last_name }}</td>
      </tr>
      <tr>
        <th><label for="id_email">{{ form.email.label }}:</label></th>
        <td>{{ form.email }}</td>
      </tr>
      <tr>
        <th><label for="id_birthday">{{ form.birthday.label }}:</label></th>
        <td>{{ form.birthday }} <span class="eg">{{ form.birthday.help_text }}</span></td>
      </tr>
      <tr><td><h3>{% trans "Address" %}</h3></td></tr>
      <tr>
        <th><label for="id_street">{{ form.street.label }}:</label></th>
        <td>{{ form.street }} <span class="eg">{{ form.street.help_text }}</span></td>
      </tr>
      <tr>
        <th><label for="id_zip_code">{{ form.zip_code.label }}:</label></th>
        <td>{{ form.zip_code }} <span class="eg">{{ form.zip_code.help_text }}</span></td>
      </tr>
      <tr>
        <th><label for="id_city">{{ form.city.label }}:</label></th>
        <td>{{ form.city }} <span class="eg">{{ form.city.help_text }}</span></td>
      </tr>
      <tr>
        <th><label for="id_country">{{ form.country.label }}:</label></th>
        <td>{{ form.country }} <span class="eg">{{ form.country.help_text }}</span></td>
      </tr>
      <tr><td><h3>{% trans "Communication data" %}</h3></td></tr>
      <tr>
        <th><label for="id_phone_landline">{{ form.phone_landline.label }}:</label></th>
        <td>{{ form.phone_landline }} <span class="eg">{{ form.phone_landline.help_text }}</span></td>
      </tr>
      <tr>
        <th><label for="id_phone_mobile">{{ form.phone_mobile.label }}:</label></th>
        <td>{{ form.phone_mobile }} <span class="eg">{{ form.phone_mobile.help_text }}</span></td>
      </tr>
      <tr>
        <th><label for="id_fax">{{ form.fax.label }}:</label></th>
        <td>{{ form.fax }} <span class="eg">{{ form.fax.help_text }}</span></td>
      </tr>
      <tr>
        <th><label for="id_url">{{ form.url.label }}:</label></th>
        <td>{{ form.url }} <span class="eg">{{ form.url.help_text }}</span></td>
      </tr>
      <tr><td><h3>{% trans "Company information" %}</h3></td></tr>
      <tr>
        <th><label for="id_company">{% trans "Company" %}:</label></th>
        <td>
          {% if user.get_profile.company %}
            <a href="/company">{{ user.get_profile.company }}</a>
          {% else %}
            {% trans "None" %}
          {% endif %}
        </td>
      </tr>
      <tr>
        <th><label for="id_job">{{ form.job.label }}:</label></th>
        <td>{{ form.job }} <span class="eg">{{ form.job.help_text }}</span></td>
      </tr>
      <!--
      <tr>
        <th><label for="id_personnel_no">{{ form.personnel_no.label }}:</label></th>
        <td>{{ form.personnel_no }} <span class="eg">{{ form.personnel_no.help_text }}</span></td>
      </tr>
      -->
      <tr><td><input type="submit" value="Update Profile"></td></tr>
    </table>
  </form>
{% endblock %}
