{% extends "layout.html" %}
{% from "_macros.html" import render_field_with_errors, render_field %}

{% block content %}

<h1>{{ _('Delete event') }} &quot;{{ event.name }}&quot;</h1>

{% if event.has_multiple_dates() %}
  <div class="alert alert-danger my-3" role="alert">
    {{ _('You are about to delete an event with multiple dates. If you want to delete a single date instead, you have to edit the event to do so.') }}
    <div class="mt-3">
      <a class="btn btn-outline-dark" href="{{ url_for('event_update', event_id=event.id) }}">{{ _('Edit event') }}</a>
    </div>
  </div>
{% endif %}

<form action="{{ url_for('event_delete', event_id=event.id) }}" method="POST">
  {{ form.hidden_tag() }}
  {{ render_field(form.submit) }}
</form>

{% endblock %}
