{% extends "orga/submission/base.html" %}
{% load compress %}
{% load i18n %}
{% load staticfiles %}

{% block submission_content %}

    <table class="table table-condensed table-responsive-md">
        <tbody>
            {% for speaker in speakers %}
                <tr>
                    <td>
                        <a href="{% url "orga:speakers.view" event=request.event.slug pk=speaker.id %}">
                            {{ speaker.get_display_name }}
                        </a>
                    </td>
                    <td class="text-right">
                        <a href="{{ submission.orga_urls.delete_speaker }}?nick={{ speaker.nick }}"
                            class="btn btn-sm btn-secondary">
                            <span class="fa fa-trash"></span>
                        </a>
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>

    <div class="content">
        {% trans "Additional speaker – by nickname if registered, by email to send an invitation" %}:<br>
        <form method="POST" action="{{ submission.orga_urls.new_speaker }}" class="adder-textbox">
            {% csrf_token %}
            <input type="text" name="nick" id="id_speaker" class="form-control" />
            <button type="submit" class="btn btn-sm btn-primary"><span class="fa fa-plus"></span></button>
        </form>
    </div>

    <span id="vars" remoteUrl="{{ request.event.orga_urls.users }}?search=%QUERY"></span>
    {% compress js %}
    <script type="text/javascript" src="{% static "vendored/typeahead.bundle.min.js" %}"></script>
    <script type="text/javascript" src="{% static "orga/js/speakers.js" %}"></script>
    {% endcompress %}
{% endblock %}
