{% extends "layout.html" %} {% from "_macros.html" import render_google_place_autocomplete_header, render_google_place_autocomplete_field, render_co_organizer_select2, render_event_date_defintion_code, render_date_definition_container, render_manage_form_styles, render_manage_form_scripts, render_cropper_header, render_end_container_handling, render_jquery_steps_header, render_cropper_header, render_cropper_code, render_crop_image_form_section, render_radio_buttons, render_field_with_errors, render_field %} {%- block title -%} {{ _('Create event') }} {%- endblock -%} {% block styles %} {{ render_manage_form_styles() }} {% endblock %} {% block header_before_site_js %} {{ render_manage_form_scripts() }} {{ render_jquery_steps_header() }} {{ render_google_place_autocomplete_header("new_event_place-") }} {{ render_cropper_header() }} {% endblock %} {% block content %}

{{ _('Create event') }}

{{ render_date_definition_container(form.date_definition_template, "date-definition-template d-none") }}
{{ form.hidden_tag() }}
{{ _('Event') }}
{{ render_field_with_errors(form.name, role="presentation", autocomplete="off") }} {{ render_field_with_errors(form.description, style="min-height:10rem;") }}
{{ _('Event dates') }}
{% for date_definition in form.date_definitions %} {{ render_date_definition_container(date_definition) }} {% endfor %}
{{ _('Organizer') }} *
{{ _("Select the organizer. If the organizer is not yet on the list, just enter it.") }}
{{ render_radio_buttons(form.organizer_choice) }}
{{ render_field_with_errors(form.organizer_id, class="w-100", label_hidden=True) }}
{{ form.new_organizer.hidden_tag() }} {{ render_field_with_errors(form.new_organizer.form.name, is_required=True) }} {{ form.new_organizer.form.location.hidden_tag() }} {{ render_field_with_errors(form.new_organizer.form.location.street) }} {{ render_field_with_errors(form.new_organizer.form.location.postalCode) }} {{ render_field_with_errors(form.new_organizer.form.location.city) }}
{{ render_field_with_errors(form.co_organizer_ids, class="w-100") }}
{{ _('Place') }} *
{{ _("Choose where the event takes place. If the venue is not yet in the list, just enter it.") }}
{{ render_radio_buttons(form.event_place_choice) }}
{{ render_field_with_errors(form.event_place_id, class="w-100", label_hidden=True) }}
{{ render_google_place_autocomplete_field() }} {{ form.new_event_place.hidden_tag() }} {{ render_field_with_errors(form.new_event_place.form.name, is_required=True) }} {{ form.new_event_place.form.location.hidden_tag() }} {{ render_field_with_errors(form.new_event_place.form.location.street) }} {{ render_field_with_errors(form.new_event_place.form.location.postalCode) }} {{ render_field_with_errors(form.new_event_place.form.location.city) }} {{ render_field_with_errors(form.new_event_place.form.location.state) }} {{ render_field_with_errors(form.new_event_place.form.location.latitude) }} {{ render_field_with_errors(form.new_event_place.form.location.longitude) }}
{{ render_crop_image_form_section(form.photo) }}
{{ _('Access') }}
{{ render_field_with_errors(form.accessible_for_free, ri="switch") }} {{ render_field_with_errors(form.registration_required, ri="switch") }} {{ render_field_with_errors(form.price_info) }} {{ render_field_with_errors(form.ticket_link) }} {{ render_field_with_errors(form.booked_up, ri="switch") }} {{ render_field_with_errors(form.attendance_mode, class="autocomplete w-100") }}
{{ _('Target group') }}
{{ render_field_with_errors(form.target_group_origin, class="autocomplete w-100") }} {{ render_field_with_errors(form.kid_friendly, ri="switch") }} {{ render_field_with_errors(form.age_from) }} {{ render_field_with_errors(form.age_to) }} {{ render_field_with_errors(form.expected_participants) }}
{{ _('Additional information') }}
{{ render_field_with_errors(form.category_ids, class="autocomplete-multi w-100") }} {{ render_field_with_errors(form.tags) }} {{ render_field_with_errors(form.external_link) }}
{% if form.rating.choices|length > 1 %}
{{ _('Rating') }}
{{ render_field_with_errors(form.rating) }}
{% endif %} {% if form.reference_request_admin_unit_id.choices|length > 0 %}
{{ _('Reference requests') }}

{{ _('References are important for the visibility of your events.') }} {{ _('Select organizations to display your event on their calendars.') }}

{{ render_field_with_errors(form.reference_request_admin_unit_id, ri="multicheckbox", label_hidden=True) }}
{% endif %}

{{ _('Planned events appear in the scheduling view, but not on public calendars.') }}

{{ form.submit(class="btn btn-primary m-1")|safe }} {{ form.submit_planned(class="btn btn-secondary m-1")|safe }} {{ form.submit_draft(class="btn btn-secondary m-1")|safe }}
{% endblock %}