{% extends "orga/settings/base.html" %}
{% load bootstrap4 %}
{% load i18n %}
{% block settings_content %}

    <form method="post" action="">
        {% csrf_token %}
        <legend>{% trans "Room" %}</legend>
        {% bootstrap_field form.name layout='event' %}
        {% bootstrap_field form.description layout='event' %}
        {% bootstrap_field form.capacity addon_after='people' addon_after_class='input-group-addon' layout='event' %}
        {% bootstrap_field form.position layout='event' %}
        <div class="form-group row">
            <div class="ml-auto col-md-9">
                {% if action == "create" %}
                    <button type="submit" class="btn btn-primary">{% trans "Create room" %}</button>
                {% elif action == "edit" %}
                    <button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
                {% elif action == "view" %}
                    <a class="btn btn-primary" href={{ form.instance.urls.edit_settings }}>{% trans "Edit" %}</a>
                {% endif %}
            </div>
        </div>
    </form>

{% endblock %}
