{% extends "ldt/user/user_base.html" %}
{# form of name's change #}
{% load i18n %}

{% block content_title %}{% trans "Name change" %} {% endblock %}

{% block css_import %}
{{ block.super }}
    <style type="text/css">
        label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; }
    </style>
{% endblock %}

{% block content %}
{{ block.super }}
{% if form %}
<p>{% trans "Please change your name" %}</p>
<form action="" method="POST" id="change_name">
{% csrf_token %}
    <table>
       <tr>
            <td>
                <label for="id_first_name">{% trans "first name" %}</label>
            </td>
            <td>
                <input id="id_first_name" type="text" maxlength="30" name="first_name" value="{{ user.first_name }}"/>
            </td>
        <tr>
        </tr>
            <td>
                <label for="id_last_name">{% trans "name" %}</label>
            </td> 
            <td>
                 <input id="id_last_name" type="text" maxlength="30" name="last_name" value="{{ user.last_name }}"/>
            </td>
        </tr>
        <tr><th></th><td><input type="submit" class="button" name="submit" value="{% trans "Name change" %}" /></td></tr>
    </table>
</form>
{% else %}
<p>{% trans "Your name has been modified" %}</p>
{% endif %}
{% endblock%}
