<div class="wrapper-admin-backend">
    <div class="w-100">
        <div id="formFieldsLoading" class="d-none w-100 py-3 text-center">
            <span class="userfeedback-loading"><i class="fas fa-spinner"></i></span>
        </div>
        <div class="py-3" id="form-fields-area">
            {{ form_fields_html | raw }}
        </div>
        <div class="pr-4 pb-4 w-100">
            <button id="previewFormButton" class="btn btn-secondary" type="button">Vorschau</button>
            <button id="formSaveSortOrderButton" class="btn btn-primary d-none" type="button">Sortierung speichern</button>
            <input type="hidden" id="createNewFieldFormId" value="{{id}}">
            <button type="button" id="assembleModalButton" class="btn btn-primary btn-lg float-right" style="border-radius: 30px; width: 60px; height: 60px">
                <i class="fas fa-plus"></i>
            </button>
        </div>
    </div>
</div>
<div id="assembleFormModalWrapper" class="wrapper-admin-backend">
    {% include 'forms/backend-form-assemble-modal.html' %}
</div>
<div class="wrapper-admin-backend">
    <div class="modal fade" id="previewFormModal" tabindex="-1" role="dialog" aria-labelledby="previewFormModalTitle" aria-hidden="true">
        <div class="modal-dialog modal-xl modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <div class="w-100">
                        <h5 class="modal-title" id="previewFormModalTitle">Formular-Vorschau</h5>
                        <small>Die Vorschau kann geringfügig von der endgültigen Ausgabe innerhalb eines Trainings abweichen.</small>
                    </div>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div id="previewFormModalContainer" class="modal-body">
                    
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Schließen</button>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="wrapper-admin-backend">
    <div class="modal overflow-auto fade" id="editFormFieldModal" tabindex="-1" role="dialog" aria-labelledby="editFormFieldModalTitle" aria-hidden="true">
        <div class="modal-dialog modal-xl modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="editFormFieldModalTitle">Formularfeld bearbeiten</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div id="editFormFieldModalContainer" class="modal-body">
                    
                </div>
                <div class="modal-footer justify-content-between">
                    <div class="alert alert-danger my-3 w-100 d-none" role="alert" id="editFormfieldErrorText">
                        <h5><i class="fas fa-times-circle"></i>&nbsp;Fehler</h5>
                        <p class="mb-0">
                            Die Eingaben sind ungültig. Bitte überprüfen Sie diese und versuchen Sie es erneut.
                        </p>
                    </div>
                    <button type="button" class="btn btn-secondary float-left" data-dismiss="modal">Abbrechen</button>
                    <button type="button" class="btn btn-primary" id="editFormFieldSubmit">Speichern</button>
                </div>
            </div>
        </div>
    </div>
</div>