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


{% block extrajs %}
  <script type="text/javascript">
    // Hide form username field
    $("#id_user").hide();
    $("label[for='id_user']").hide ();
    </script>
{% endblock %}


{% block content %}
  <div class="container">
    <div class="row">
      <div class="col-sm-offset-2 col-sm-6">
        <p>{% trans "You can change your personal information using the form below. Make any changes necessary and then click the 'Change' button."%}</p>
      </div>
    </div>
    {% if form.errors %}
      <div class="row">
        <div class="alert alert-danger col-sm-offset-2 col-sm-6">
          <p><strong>{% trans "Sorry there are corrections needed in your form below:" %} {{ form.non_field_errors }}</strong></p>
        </div>
      </div>
    {% endif %}
    <div class=" col-sm-offset-2 col-sm-6 well well-sm">
      {% if form.is_multipart %}
        <form enctype="multipart/form-data" method="post" action=".">
      {% else %}
        <form method="post" action=".">
      {% endif %}
          {% csrf_token %}
          {% bootstrap_field form.user %}
          {% bootstrap_field form.fname %}
          {% bootstrap_field form.lname %}
          {% bootstrap_field form.address %}
          {% bootstrap_field form.organization %}
          {% bootstrap_field form.email_is_public %}
          {% buttons %}
            <button type="submit" class="btn btn-primary">{% trans "Change" %}</button>
          {% endbuttons %}
        </form>
    </div>
  </div><!--container-->
{% endblock %}
