{% extends "_base.html" %} {% load i18n %} {% load static %} {% load widget_tweaks %} {% load content_filters %} {% load rules %} {% load poi_filters %} {% load render_bundle from webpack_loader %} {% block content %}
{% csrf_token %}

{% if poi_form.instance.id %} {% if poi_translation_form.instance.id %} {% with poi_translation_form.instance.title as poi_title %} {% blocktrans %}Edit location "{{ poi_title }}"{% endblocktrans %} {% endwith %} {% else %} {% translate "Create new translation of the location" %} {% endif %} {% get_current_language as LANGUAGE_CODE %} {% if poi_form.instance.backend_translation and LANGUAGE_CODE != language.slug %} ({% translate "Title in" %} {% translated_language_name LANGUAGE_CODE %}: "{{ poi_form.instance.backend_translation.title }}") {% endif %} {% else %} {% translate "Create new location" %} {% endif %}

{% if not poi_form.instance.archived and perms.cms.change_poi %}
{% endif %}
{% include "_form_language_tabs.html" with target="edit_poi" instance=poi_form.instance content_field="poi_id" %}
{% if poi_translation_form.instance.id %}
{% translate "Version" %}:
{{ poi_translation_form.instance.version }}
{% translate "Publication status" %}:
{% if poi.archived %} {% translate "Archived" %} {% else %} {{ poi_translation_form.instance.get_status_display }} {% endif %}
{% endif %}
{% render_field poi_translation_form.title|add_error_class:"border-red-500" class+="mb-2" %} {% if language != request.region.default_language %}
{% blocktrans %}The name is currently displayed to users only in the default language{% endblocktrans %}
{% endif %} {% render_field poi_translation_form.content class+="tinymce_textarea flex-auto" %}
{% if request.region.seo_enabled %}

{% translate "SEO section" %}

{{ poi_translation_form.meta_description.help_text }}
{% render_field poi_translation_form.meta_description|add_error_class:"border-red-500" %}
{% endif %}
{% if poi_form.instance.id and perms.cms.change_poi %}

{% translate "Minor edit" %}

{% render_field poi_translation_form.minor_edit %}
{% minor_edit_help_text request.region language poi_translation_form %}
{% endif %}

{% translate "Position" %}

{% render_field poi_form.address|add_error_class:"border-red-500" %} {% render_field poi_form.postcode|add_error_class:"border-red-500" %} {% render_field poi_form.city|add_error_class:"border-red-500" %} {% render_field poi_form.country|add_error_class:"border-red-500" %}
{% render_field poi_form.location_on_map %}
{{ poi_form.location_on_map.help_text }}
{% render_field poi_form.latitude|add_error_class:"border-red-500" %}
{{ poi_form.latitude.help_text }}
{% render_field poi_form.longitude|add_error_class:"border-red-500" %}
{{ poi_form.longitude.help_text }}

{% translate "Contact details" %}

{% render_field poi_form.website|add_error_class:"border-red-500" %}
{% render_field poi_form.email|add_error_class:"border-red-500" %}
{% render_field poi_form.phone_number|add_error_class:"border-red-500" %}

{{ poi_form.opening_hours.label }}

({% translate "Currently not visible in apps" %})
{{ opening_hour_config_data|json_script:"openingHourConfigData" }} {{ poi_form.opening_hours.value|json_script:"openingHourInitialData" }} {# This hidden input is required for the change detection of the opening hours field #}
{% render_field poi_form.temporarily_closed %}
{{ poi_form.temporarily_closed.help_text }}

{{ poi_form.category.label }}

({% translate "Currently not visible in apps" %})
{% render_field poi_form.category|add_error_class:"border-red-500" %}
{{ poi_form.category.help_text }}

{{ poi_form.icon.label }}

{{ poi_form.icon.help_text }}
{% render_field poi_form.icon label=poi_form.icon.label %}
{% if poi_form.instance.id and perms.cms.change_poi %}

{% translate "Actions" %}

{% if poi_form.instance.archived %} {% else %} {% endif %}
{% if perms.cms.delete_poi %}
{% if poi_form.instance.events.exists %} {% for event in poi_form.instance.events.all %} {{ event.best_translation.title }} {% endfor %} {% else %} {% endif %}
{% endif %}
{% endif %}
{{ media_config_data|json_script:"media_config_data" }} {% if not perms.cms.change_poi or poi_form.instance.id and poi_form.instance.archived %} {% include "../_tinymce_config.html" with readonly=1 %} {% else %} {% include "../_tinymce_config.html" %} {% if poi_form.instance.id %} {% include "../_content_edit_lock.html" with lock_key=poi_form.instance.edit_lock_key %} {% endif %} {% endif %} {% if poi_form.instance.id %} {% include "../generic_confirmation_dialog.html" %} {% endif %} {% endblock content %} {% block javascript %} {% render_bundle 'editor' 'js' %} {% endblock javascript %} {% block javascript_head %} {% render_bundle 'map' 'js' %} {% render_bundle 'map' 'css' %} {% endblock javascript_head %}