<div class="modal fade" tabindex="-1" role="dialog" id="favModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">Playlists
                    <!-- LOADER -->
                    {% image 'images/ripple.svg' %}
                    <img id="loaderPlaylist" src="{{ asset_url }}" alt="loader"/>
                    {% endimage %}
                </h4>
            </div>

            <div class="modal-body">
                <ul id="playlistContainer">
                    {{  form_start(favorisForm, { method : "POST", action : path("single", {"slug" : tuto.slug, "id" : tuto.id}) }) }}

                    {% for playlist in favorisForm.playlist %}
                        <div class="checkbox">
                            {% if alreadyInFav|default and alreadyInFav.playlist.id == playlist.vars.value %}
                                {{ form_widget(playlist, {'attr' : { 'checked ' : true }}) }}
                            {% else %}
                                {{ form_widget(playlist, {'attr' : { 'checked ' : false }}) }}
                            {% endif %}
                            {{ form_label(playlist) }}
                        </div>
                    {% endfor %}

                    {{ form_end(favorisForm) }}
                </ul>
            </div>
            <div class="modal-footer">
                {{  form_start(playlistForm, { method : "POST", action : path("single", {"slug" : tuto.slug, "id" : tuto.id}) }) }}
                {{ form_widget(playlistForm.name, { 'attr' : { 'class' : 'form-control', 'placeholder' : 'Nouvelle Playlist'} }) }}
                <button id="addPlaylist" class="btn btn-primary" name="addPlaylist">Créer une nouvelle playlist</button>
                {{ form_end(playlistForm) }}

            </div>


        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->