{% extends "trainings/training_details.html" %}
{% load i18n %}

{% block section_content %}
    <form action="" method="post" enctype="multipart/form-data" >{% csrf_token %}
        {{ form.media }}
        <table class="table table-bordered table-hover">
            {% if object.pk and not object.is_editable %}
                <tr>
                    <td>
                        <strong>{% trans 'Nom' %}</strong>
                    </td>
                    <td>
                        {{ training.name }}
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>{% trans 'Description' %}</strong>
                    </td>
                    <td>
                        {{ training.description }}
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>{% trans 'Theme' %}</strong>
                    </td>
                    <td>
                        {{ training.theme.name }}
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>{% trans 'Job profile' %}</strong>
                    </td>
                    <td>
                        {{ training.job_profile.name }}
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>{% trans 'Business unit' %}</strong>
                    </td>
                    <td>
                        {{ training.business_unit.name }}
                    </td>
                </tr>
            {% else %}
                {% include 'extras/form.html' with form=form %}
            {% endif %}
        </table>
        {% if not object.pk or object.is_editable %}
            <div class="well">
                <input type="submit" name="save" value="{% trans 'Save' %}" class="btn btn-primary" />
            </div>
        {% endif %}
    </form>
{% endblock %}
