{% extends 'admin.html.twig' %}
{% form_theme form 'default/form/theme.html.twig' %}

{% block body %}
    <section class="clearfix">
        <div class="content-copy">
            <h1>Bild für "{{ lodging.name }}" anlegen / bearbeiten</h1>

            <form class="st-booking-form" method="post" enctype="multipart/form-data">

                {{ form_errors(form) }}

                <div class="form-box">
                    {% if is_new %}
                        {{ form_row(form.file, {label: 'Bild'}) }}
                    {% else %}
                        <div>
                            <img src="{{ asset('uploads/images/' ~ image_file_name) }}" alt="{{ image.description }}" style="width:456px;height:151px;" >
                        </div>
                    {% endif %}
                    {{ form_row(form.fileName, {label: 'Name'}) }}
                    {{ form_row(form.pos, {label: 'Position'}) }}
                    {{ form_row(form.description, {label: 'Beschreibung'}) }}

                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <button type="submit" value="SEND" id="submit"
                                class="btn btn-primary btn-lg border-radius"
                        >
                            Speichern
                        </button>
                    </div>
                </div><!-- end form-box -->

                {{ form_widget(form._token) }}
            </form>
            <a href="{{ '/admin/fewo/lodgings/' ~ lodging.id }}"
               class="btn btn-primary"
               rel="nofollow"
            >
                Zurück
            </a>
        </div>
    </section><!-- end section -->
{% endblock body %}