Merge pull request #543 from eventcally/issues/542

Optimize place and organizer input #542
This commit is contained in:
Daniel Grams 2023-09-06 21:29:05 +02:00 committed by GitHub
commit 1cc2346bde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 239 additions and 246 deletions

View File

@ -11,14 +11,14 @@ describe("Event", () => {
cy.get("#add-date-defintion-btn").click(); cy.get("#add-date-defintion-btn").click();
cy.checkEventStartEnd(false, test.recurrence, "date_definitions-1-"); cy.checkEventStartEnd(false, test.recurrence, "date_definitions-1-");
cy.select2("event_place_id", "Neu"); cy.get('#event_place_choice-1').click();
cy.get("#new_event_place-location-city").type("Goslar"); cy.get("#new_event_place-location-city").type("Goslar");
cy.get("#new_place_container_search_link").click(); cy.get('#event_place_choice-0').click();
cy.select2("event_place_id", "Gos", "Goslar, 38640 Goslar"); cy.select2("event_place_id", "Gos", "Goslar");
cy.select2("organizer_id", "Neu"); cy.get('#organizer_choice-1').click();
cy.get("#new_organizer-location-city").type("Goslar"); cy.get("#new_organizer-location-city").type("Goslar");
cy.get("#new_organizer_container_search_link").click(); cy.get('#organizer_choice-0').click();
cy.select2("organizer_id", "Mei", "Meine Crew"); cy.select2("organizer_id", "Mei", "Meine Crew");
cy.get("#submit").click(); cy.get("#submit").click();
@ -54,7 +54,7 @@ describe("Event", () => {
cy.visit("/admin_unit/" + adminUnitId + "/events/create"); cy.visit("/admin_unit/" + adminUnitId + "/events/create");
cy.get("#name").type("Stadtfest"); cy.get("#name").type("Stadtfest");
cy.select2("event_place_id", "Gos", "Goslar, 38640 Goslar"); cy.select2("event_place_id", "Gos", "Goslar");
cy.select2("organizer_id", "Mei", "Meine Crew"); cy.select2("organizer_id", "Mei", "Meine Crew");
cy.get("#submit_draft").click(); cy.get("#submit_draft").click();

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-08-29 23:52+0200\n" "POT-Creation-Date: 2023-09-06 17:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -411,7 +411,7 @@ msgstr ""
msgid "The short name is used to create a unique identifier for your events" msgid "The short name is used to create a unique identifier for your events"
msgstr "" msgstr ""
#: project/forms/admin_unit.py:46 project/templates/_macros.html:1690 #: project/forms/admin_unit.py:46 project/templates/_macros.html:1692
msgid "Short name must contain only letters numbers or underscore" msgid "Short name must contain only letters numbers or underscore"
msgstr "" msgstr ""
@ -563,79 +563,79 @@ msgstr ""
msgid "Image" msgid "Image"
msgstr "" msgstr ""
#: project/forms/common.py:74 #: project/forms/common.py:78
#, python-format #, python-format
msgid "" msgid ""
"I read and accept %(tos_open)sTerms of Service%(tos_close)s and " "I read and accept %(tos_open)sTerms of Service%(tos_close)s and "
"%(privacy_open)sPrivacy%(privacy_close)s." "%(privacy_open)sPrivacy%(privacy_close)s."
msgstr "" msgstr ""
#: project/forms/common.py:84 #: project/forms/common.py:88
#, python-format #, python-format
msgid "I read and accept %(privacy_open)sPrivacy%(privacy_close)s." msgid "I read and accept %(privacy_open)sPrivacy%(privacy_close)s."
msgstr "" msgstr ""
#: project/forms/common.py:95 #: project/forms/common.py:99
msgid "0 (Little relevant)" msgid "0 (Little relevant)"
msgstr "" msgstr ""
#: project/forms/common.py:100 #: project/forms/common.py:104
msgid "5 (Default)" msgid "5 (Default)"
msgstr "" msgstr ""
#: project/forms/common.py:105 #: project/forms/common.py:109
msgid "10 (Highlight)" msgid "10 (Highlight)"
msgstr "" msgstr ""
#: project/forms/common.py:109 #: project/forms/common.py:113
msgid "Monday" msgid "Monday"
msgstr "" msgstr ""
#: project/forms/common.py:110 #: project/forms/common.py:114
msgid "Tueday" msgid "Tueday"
msgstr "" msgstr ""
#: project/forms/common.py:111 #: project/forms/common.py:115
msgid "Wednesday" msgid "Wednesday"
msgstr "" msgstr ""
#: project/forms/common.py:112 #: project/forms/common.py:116
msgid "Thursday" msgid "Thursday"
msgstr "" msgstr ""
#: project/forms/common.py:113 #: project/forms/common.py:117
msgid "Friday" msgid "Friday"
msgstr "" msgstr ""
#: project/forms/common.py:114 #: project/forms/common.py:118
msgid "Saturday" msgid "Saturday"
msgstr "" msgstr ""
#: project/forms/common.py:115 #: project/forms/common.py:119
msgid "Sunday" msgid "Sunday"
msgstr "" msgstr ""
#: project/forms/common.py:119 #: project/forms/common.py:123
msgid "500 m" msgid "500 m"
msgstr "" msgstr ""
#: project/forms/common.py:120 #: project/forms/common.py:124
msgid "5 km" msgid "5 km"
msgstr "" msgstr ""
#: project/forms/common.py:121 #: project/forms/common.py:125
msgid "10 km" msgid "10 km"
msgstr "" msgstr ""
#: project/forms/common.py:122 #: project/forms/common.py:126
msgid "20 km" msgid "20 km"
msgstr "" msgstr ""
#: project/forms/common.py:123 #: project/forms/common.py:127
msgid "50 km" msgid "50 km"
msgstr "" msgstr ""
#: project/forms/common.py:124 #: project/forms/common.py:128
msgid "100 km" msgid "100 km"
msgstr "" msgstr ""
@ -662,7 +662,7 @@ msgid "All-day"
msgstr "" msgstr ""
#: project/forms/event.py:59 project/templates/_macros.html:951 #: project/forms/event.py:59 project/templates/_macros.html:951
#: project/templates/_macros.html:1860 #: project/templates/_macros.html:1862
#: project/templates/widget/event_suggestion/create.html:240 #: project/templates/widget/event_suggestion/create.html:240
msgid "Recurring event" msgid "Recurring event"
msgstr "" msgstr ""
@ -854,8 +854,8 @@ msgstr ""
#: project/forms/event.py:260 project/forms/reference.py:14 #: project/forms/event.py:260 project/forms/reference.py:14
#: project/forms/reference.py:27 project/forms/reference_request.py:76 #: project/forms/reference.py:27 project/forms/reference_request.py:76
#: project/templates/event/create.html:387 #: project/templates/event/create.html:371
#: project/templates/event/update.html:220 #: project/templates/event/update.html:228
msgid "Rating" msgid "Rating"
msgstr "" msgstr ""
@ -883,8 +883,8 @@ msgstr ""
#: project/forms/event.py:291 project/forms/event.py:300 #: project/forms/event.py:291 project/forms/event.py:300
#: project/forms/event.py:382 project/forms/event.py:459 #: project/forms/event.py:382 project/forms/event.py:459
#: project/forms/event_suggestion.py:50 project/templates/_macros.html:464 #: project/forms/event_suggestion.py:50 project/templates/_macros.html:464
#: project/templates/_macros.html:630 project/templates/event/create.html:312 #: project/templates/_macros.html:630 project/templates/event/create.html:298
#: project/templates/event/update.html:170 #: project/templates/event/update.html:178
#: project/templates/event_place/create.html:32 #: project/templates/event_place/create.html:32
#: project/templates/event_place/delete.html:13 #: project/templates/event_place/delete.html:13
#: project/templates/event_place/update.html:32 #: project/templates/event_place/update.html:32
@ -904,8 +904,8 @@ msgstr ""
#: project/forms/event.py:390 project/forms/event.py:456 #: project/forms/event.py:390 project/forms/event.py:456
#: project/forms/event_date.py:40 project/forms/event_suggestion.py:60 #: project/forms/event_date.py:40 project/forms/event_suggestion.py:60
#: project/templates/_macros.html:501 project/templates/_macros.html:673 #: project/templates/_macros.html:501 project/templates/_macros.html:673
#: project/templates/_macros.html:954 project/templates/event/create.html:281 #: project/templates/_macros.html:954 project/templates/event/create.html:271
#: project/templates/event/update.html:160 #: project/templates/event/update.html:168
#: project/templates/manage/events.html:108 #: project/templates/manage/events.html:108
#: project/templates/organizer/create.html:28 #: project/templates/organizer/create.html:28
#: project/templates/organizer/delete.html:13 #: project/templates/organizer/delete.html:13
@ -922,7 +922,7 @@ msgid "Enter new organizer"
msgstr "" msgstr ""
#: project/forms/event.py:323 project/templates/_macros.html:738 #: project/forms/event.py:323 project/templates/_macros.html:738
#: project/templates/event/create.html:398 #: project/templates/event/create.html:382
#: project/templates/manage/reference_requests_incoming.html:5 #: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5 #: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests" msgid "Reference requests"
@ -960,7 +960,7 @@ msgid ""
" Organizers." " Organizers."
msgstr "" msgstr ""
#: project/forms/event.py:399 project/templates/event/update.html:149 #: project/forms/event.py:399 project/templates/event/update.html:157
#: project/templates/oauth2_token/list.html:21 #: project/templates/oauth2_token/list.html:21
msgid "Status" msgid "Status"
msgstr "" msgstr ""
@ -1009,12 +1009,12 @@ msgstr ""
msgid "PublicStatus.draft" msgid "PublicStatus.draft"
msgstr "" msgstr ""
#: project/forms/event.py:419 project/templates/event/create.html:410 #: project/forms/event.py:419 project/templates/event/create.html:394
msgid "Planned events appear in the scheduling view, but not on public calendars." msgid "Planned events appear in the scheduling view, but not on public calendars."
msgstr "" msgstr ""
#: project/forms/event.py:424 project/templates/event/update.html:5 #: project/forms/event.py:424 project/templates/event/update.html:5
#: project/templates/event/update.html:117 #: project/templates/event/update.html:125
msgid "Update event" msgid "Update event"
msgstr "" msgstr ""
@ -1148,13 +1148,13 @@ msgstr ""
msgid "I would like to be notified by email after the review" msgid "I would like to be notified by email after the review"
msgstr "" msgstr ""
#: project/forms/event_suggestion.py:52 project/templates/event/create.html:317 #: project/forms/event_suggestion.py:52 project/templates/event/create.html:303
msgid "" msgid ""
"Choose where the event takes place. If the venue is not yet in the list, " "Choose where the event takes place. If the venue is not yet in the list, "
"just enter it." "just enter it."
msgstr "" msgstr ""
#: project/forms/event_suggestion.py:62 project/templates/event/create.html:285 #: project/forms/event_suggestion.py:62 project/templates/event/create.html:275
msgid "" msgid ""
"Select the organizer. If the organizer is not yet on the list, just enter" "Select the organizer. If the organizer is not yet on the list, just enter"
" it." " it."
@ -1438,8 +1438,8 @@ msgstr ""
#: project/templates/_macros.html:413 project/templates/_macros.html:583 #: project/templates/_macros.html:413 project/templates/_macros.html:583
#: project/templates/event/actions.html:25 #: project/templates/event/actions.html:25
#: project/templates/event/create.html:258 #: project/templates/event/create.html:248
#: project/templates/event/update.html:126 #: project/templates/event/update.html:134
#: project/templates/manage/events.html:107 #: project/templates/manage/events.html:107
#: project/templates/widget/event_suggestion/create.html:229 #: project/templates/widget/event_suggestion/create.html:229
msgid "Event" msgid "Event"
@ -1639,18 +1639,18 @@ msgstr ""
msgid "Other calendar" msgid "Other calendar"
msgstr "" msgstr ""
#: project/templates/_macros.html:1861 #: project/templates/_macros.html:1863
msgid "Remove event date" msgid "Remove event date"
msgstr "" msgstr ""
#: project/templates/_macros.html:1894 project/templates/event/create.html:204 #: project/templates/_macros.html:1896 project/templates/event/create.html:204
#: project/templates/event/update.html:103 #: project/templates/event/update.html:111
#: project/templates/event_date/list.html:448 #: project/templates/event_date/list.html:448
#: project/templates/widget/event_suggestion/create.html:129 #: project/templates/widget/event_suggestion/create.html:129
msgid "Enter organizer" msgid "Enter organizer"
msgstr "" msgstr ""
#: project/templates/_macros.html:1922 #: project/templates/_macros.html:1924
msgid "Enter list name" msgid "Enter list name"
msgstr "" msgstr ""
@ -1719,7 +1719,7 @@ msgid "Show events"
msgstr "" msgstr ""
#: project/templates/event/create.html:5 #: project/templates/event/create.html:5
#: project/templates/event/create.html:249 project/templates/layout.html:230 #: project/templates/event/create.html:239 project/templates/layout.html:230
#: project/templates/manage/events.html:55 #: project/templates/manage/events.html:55
#: project/templates/manage/organizers.html:38 #: project/templates/manage/organizers.html:38
msgid "Create event" msgid "Create event"
@ -1925,8 +1925,8 @@ msgstr ""
#: project/templates/admin_unit/create.html:51 #: project/templates/admin_unit/create.html:51
#: project/templates/admin_unit/update.html:67 #: project/templates/admin_unit/update.html:67
#: project/templates/event/create.html:375 #: project/templates/event/create.html:359
#: project/templates/event/update.html:208 #: project/templates/event/update.html:216
#: project/templates/event_place/create.html:58 #: project/templates/event_place/create.html:58
#: project/templates/event_place/update.html:58 #: project/templates/event_place/update.html:58
#: project/templates/organizer/create.html:57 #: project/templates/organizer/create.html:57
@ -2191,45 +2191,36 @@ msgstr ""
msgid "Add event to list" msgid "Add event to list"
msgstr "" msgstr ""
#: project/templates/event/create.html:114 #: project/templates/event/create.html:124
#: project/templates/event/update.html:76 #: project/templates/event/update.html:84
#: project/templates/widget/event_suggestion/create.html:104 msgid "Enter place"
msgid "Enter place or address"
msgstr "" msgstr ""
#: project/templates/event/create.html:268 #: project/templates/event/create.html:258
#: project/templates/event/update.html:136 #: project/templates/event/update.html:144
msgid "Event dates" msgid "Event dates"
msgstr "" msgstr ""
#: project/templates/event/create.html:275 #: project/templates/event/create.html:265
#: project/templates/event/update.html:143 #: project/templates/event/update.html:151
msgid "Add event date" msgid "Add event date"
msgstr "" msgstr ""
#: project/templates/event/create.html:302 #: project/templates/event/create.html:332
msgid "Switch to organizer search" #: project/templates/event/update.html:189
msgstr ""
#: project/templates/event/create.html:337
msgid "Switch to place search"
msgstr ""
#: project/templates/event/create.html:348
#: project/templates/event/update.html:181
msgid "Access" msgid "Access"
msgstr "" msgstr ""
#: project/templates/event/create.html:362 #: project/templates/event/create.html:346
#: project/templates/event/update.html:195 #: project/templates/event/update.html:203
msgid "Target group" msgid "Target group"
msgstr "" msgstr ""
#: project/templates/event/create.html:402 #: project/templates/event/create.html:386
msgid "References are important for the visibility of your events." msgid "References are important for the visibility of your events."
msgstr "" msgstr ""
#: project/templates/event/create.html:403 #: project/templates/event/create.html:387
msgid "Select organizations to display your event on their calendars." msgid "Select organizations to display your event on their calendars."
msgstr "" msgstr ""
@ -2573,6 +2564,10 @@ msgstr ""
msgid "Print" msgid "Print"
msgstr "" msgstr ""
#: project/templates/widget/event_suggestion/create.html:104
msgid "Enter place or address"
msgstr ""
#: project/templates/widget/event_suggestion/create.html:175 #: project/templates/widget/event_suggestion/create.html:175
msgid "Continue as guest" msgid "Continue as guest"
msgstr "" msgstr ""

View File

@ -556,4 +556,8 @@ $(function () {
$(".hide-link").click(function (e) { $(".hide-link").click(function (e) {
hideLink(e, this); hideLink(e, this);
}); });
$(document).on('select2:open', function(e) {
document.querySelector(`[aria-controls="select2-${e.target.id}-results"]`).focus();
});
}); });

View File

@ -793,7 +793,7 @@
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
{% macro render_google_place_autocomplete_header() %} {% macro render_google_place_autocomplete_header(target_prefix='') %}
<script> <script>
$( function() { $( function() {
@ -840,7 +840,7 @@
dataType: "json", dataType: "json",
data: "gmaps_id=" + place_id, data: "gmaps_id=" + place_id,
success: function (data) { success: function (data) {
fill_place_form_with_gmaps_place(data, "", location_only); fill_place_form_with_gmaps_place(data, "{{ target_prefix }}", location_only);
} }
}); });
} }

View File

@ -1,5 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% from "_macros.html" import 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 %} {% 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 -%} {%- block title -%}
{{ _('Create event') }} {{ _('Create event') }}
@ -12,6 +12,7 @@
{% block header_before_site_js %} {% block header_before_site_js %}
{{ render_manage_form_scripts() }} {{ render_manage_form_scripts() }}
{{ render_jquery_steps_header() }} {{ render_jquery_steps_header() }}
{{ render_google_place_autocomplete_header("new_event_place-") }}
{{ render_cropper_header() }} {{ render_cropper_header() }}
<script> <script>
$( function() { $( function() {
@ -87,6 +88,7 @@ $( function() {
case '1': case '1':
$('#existing_place_container').show(); $('#existing_place_container').show();
$('#new_place_container').hide(); $('#new_place_container').hide();
reset_place_form('new_event_place-');
break; break;
case '2': case '2':
$('#existing_place_container').hide(); $('#existing_place_container').hide();
@ -98,23 +100,28 @@ $( function() {
$('#event_place_id').select2({ $('#event_place_id').select2({
width: '100%', width: '100%',
theme: 'bootstrap4', theme: 'bootstrap4',
tags: true,
ajax: { ajax: {
url: "{{ url_for('js_autocomplete_place') }}", url: "{{ url_for('api_v1_organization_place_list', id=admin_unit.id) }}",
dataType: 'json', dataType: 'json',
delay: 250, delay: 250,
cache: true, cache: true,
data: function (params) { data: function (params) {
return { return {
keyword: params.term, name: params.term,
admin_unit_id: '{{ admin_unit.id }}' per_page: 5,
page: params.page || 1
};
},
processResults: function (data) {
return {
results: data.items.map(p => ({"id": p.id, "text": p.name})),
pagination: {
more: data.has_next
}
}; };
} }
}, },
placeholder: "{{ _('Enter place or address') }}", placeholder: "{{ _('Enter place') }}"
createTag: createSelect2Tag,
insertTag: insertSelect2Tag,
templateResult: select2TemplateResult
}).on('select2:close', function (e) { }).on('select2:close', function (e) {
var data = select2GetData(e); var data = select2GetData(e);
@ -154,13 +161,6 @@ $( function() {
update_place_container($(this).val()); update_place_container($(this).val());
}); });
$('#new_place_container_search_link').click(function(e){
e.preventDefault();
e.stopPropagation();
reset_place_form('new_event_place-');
$('input[type=radio][name=event_place_choice][value=1]').click();
});
update_place_container($('input[type=radio][name=event_place_choice]:checked').val()); update_place_container($('input[type=radio][name=event_place_choice]:checked').val());
function update_organizer_container(value) { function update_organizer_container(value) {
@ -168,6 +168,7 @@ $( function() {
case '1': case '1':
$('#existing_organizer_container').show(); $('#existing_organizer_container').show();
$('#new_organizer_container').hide(); $('#new_organizer_container').hide();
reset_organizer_form('new_organizer-');
break; break;
case '2': case '2':
$('#existing_organizer_container').hide(); $('#existing_organizer_container').hide();
@ -179,7 +180,6 @@ $( function() {
$('#organizer_id').select2({ $('#organizer_id').select2({
width: '100%', width: '100%',
theme: 'bootstrap4', theme: 'bootstrap4',
tags: true,
ajax: { ajax: {
url: "{{ url_for('api_v1_organization_organizer_list', id=admin_unit.id) }}", url: "{{ url_for('api_v1_organization_organizer_list', id=admin_unit.id) }}",
dataType: 'json', dataType: 'json',
@ -201,10 +201,7 @@ $( function() {
}; };
} }
}, },
placeholder: "{{ _('Enter organizer') }}", placeholder: "{{ _('Enter organizer') }}"
createTag: createSelect2Tag,
insertTag: insertSelect2Tag,
templateResult: select2TemplateResult
}).on('select2:close', function (e) { }).on('select2:close', function (e) {
var data = select2GetData(e); var data = select2GetData(e);
@ -230,13 +227,6 @@ $( function() {
$(this).valid(); $(this).valid();
}); });
$('#new_organizer_container_search_link').click(function(e){
e.preventDefault();
e.stopPropagation();
reset_organizer_form('new_organizer-');
$('input[type=radio][name=organizer_choice][value=1]').click();
});
update_organizer_container($('input[type=radio][name=organizer_choice]:checked').val()); update_organizer_container($('input[type=radio][name=organizer_choice]:checked').val());
{{ render_co_organizer_select2(admin_unit.id) }} {{ render_co_organizer_select2(admin_unit.id) }}
@ -283,7 +273,7 @@ $( function() {
<div class="card-body"> <div class="card-body">
<div> <div>
<div class="form-text mt-0 text-muted w-100">{{ _("Select the organizer. If the organizer is not yet on the list, just enter it.") }}</div> <div class="form-text mt-0 text-muted w-100">{{ _("Select the organizer. If the organizer is not yet on the list, just enter it.") }}</div>
<div style="display: none;">{{ render_radio_buttons(form.organizer_choice) }}</div> <div>{{ render_radio_buttons(form.organizer_choice) }}</div>
</div> </div>
<div class="my-2" id="existing_organizer_container"> <div class="my-2" id="existing_organizer_container">
@ -297,10 +287,6 @@ $( function() {
{{ render_field_with_errors(form.new_organizer.form.location.street) }} {{ 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.postalCode) }}
{{ render_field_with_errors(form.new_organizer.form.location.city) }} {{ render_field_with_errors(form.new_organizer.form.location.city) }}
<div class="my-4">
<a href="#" id="new_organizer_container_search_link"><i class="fa fa-search"></i> {{ _('Switch to organizer search') }}</a>
</div>
</div> </div>
{{ render_field_with_errors(form.co_organizer_ids, class="w-100") }} {{ render_field_with_errors(form.co_organizer_ids, class="w-100") }}
@ -315,7 +301,7 @@ $( function() {
<div> <div>
<div class="form-text mt-0 text-muted w-100">{{ _("Choose where the event takes place. If the venue is not yet in the list, just enter it.") }}</div> <div class="form-text mt-0 text-muted w-100">{{ _("Choose where the event takes place. If the venue is not yet in the list, just enter it.") }}</div>
<div style="display: none;">{{ render_radio_buttons(form.event_place_choice) }}</div> <div>{{ render_radio_buttons(form.event_place_choice) }}</div>
</div> </div>
<div class="my-2" id="existing_place_container"> <div class="my-2" id="existing_place_container">
@ -323,6 +309,8 @@ $( function() {
</div> </div>
<div class="my-2" id="new_place_container"> <div class="my-2" id="new_place_container">
{{ render_google_place_autocomplete_field() }}
{{ form.new_event_place.hidden_tag() }} {{ form.new_event_place.hidden_tag() }}
{{ render_field_with_errors(form.new_event_place.form.name, is_required=True) }} {{ render_field_with_errors(form.new_event_place.form.name, is_required=True) }}
{{ form.new_event_place.form.location.hidden_tag() }} {{ form.new_event_place.form.location.hidden_tag() }}
@ -332,10 +320,6 @@ $( function() {
{{ render_field_with_errors(form.new_event_place.form.location.state) }} {{ 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.latitude) }}
{{ render_field_with_errors(form.new_event_place.form.location.longitude) }} {{ render_field_with_errors(form.new_event_place.form.location.longitude) }}
<div class="my-4">
<a href="#" id="new_place_container_search_link"><i class="fa fa-search"></i> {{ _('Switch to place search') }}</a>
</div>
</div> </div>
</div> </div>

View File

@ -61,19 +61,27 @@
width: '100%', width: '100%',
theme: 'bootstrap4', theme: 'bootstrap4',
ajax: { ajax: {
url: "{{ url_for('js_autocomplete_place') }}", url: "{{ url_for('api_v1_organization_place_list', id=event.admin_unit.id) }}",
dataType: 'json', dataType: 'json',
delay: 250, delay: 250,
cache: true, cache: true,
data: function (params) { data: function (params) {
return { return {
keyword: params.term, name: params.term,
admin_unit_id: '{{ event.admin_unit_id }}', per_page: 5,
exclude_gmaps: 1, page: params.page || 1
};
},
processResults: function (data) {
return {
results: data.items.map(p => ({"id": p.id, "text": p.name})),
pagination: {
more: data.has_next
}
}; };
} }
}, },
placeholder: "{{ _('Enter place or address') }}" placeholder: "{{ _('Enter place') }}"
}); });
$('#organizer_id').select2({ $('#organizer_id').select2({

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-08-29 23:52+0200\n" "POT-Creation-Date: 2023-09-06 17:11+0200\n"
"PO-Revision-Date: 2020-06-07 18:51+0200\n" "PO-Revision-Date: 2020-06-07 18:51+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n" "Language: de\n"
@ -423,7 +423,7 @@ msgstr ""
"eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern " "eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern "
"und Unterstriche enthalten." "und Unterstriche enthalten."
#: project/forms/admin_unit.py:46 project/templates/_macros.html:1690 #: project/forms/admin_unit.py:46 project/templates/_macros.html:1692
msgid "Short name must contain only letters numbers or underscore" msgid "Short name must contain only letters numbers or underscore"
msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten" msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten"
@ -583,7 +583,7 @@ msgstr "Copyright Text"
msgid "Image" msgid "Image"
msgstr "Bild" msgstr "Bild"
#: project/forms/common.py:74 #: project/forms/common.py:78
#, python-format #, python-format
msgid "" msgid ""
"I read and accept %(tos_open)sTerms of Service%(tos_close)s and " "I read and accept %(tos_open)sTerms of Service%(tos_close)s and "
@ -593,74 +593,74 @@ msgstr ""
"%(privacy_open)sDatenschutzerklärung%(privacy_close)s gelesen und " "%(privacy_open)sDatenschutzerklärung%(privacy_close)s gelesen und "
"akzeptiere diese." "akzeptiere diese."
#: project/forms/common.py:84 #: project/forms/common.py:88
#, python-format #, python-format
msgid "I read and accept %(privacy_open)sPrivacy%(privacy_close)s." msgid "I read and accept %(privacy_open)sPrivacy%(privacy_close)s."
msgstr "" msgstr ""
"Ich habe die %(privacy_open)sDatenschutzerklärung%(privacy_close)s " "Ich habe die %(privacy_open)sDatenschutzerklärung%(privacy_close)s "
"gelesen und akzeptiere diese." "gelesen und akzeptiere diese."
#: project/forms/common.py:95 #: project/forms/common.py:99
msgid "0 (Little relevant)" msgid "0 (Little relevant)"
msgstr "0 (Wenig relevant)" msgstr "0 (Wenig relevant)"
#: project/forms/common.py:100 #: project/forms/common.py:104
msgid "5 (Default)" msgid "5 (Default)"
msgstr "5 (Standard)" msgstr "5 (Standard)"
#: project/forms/common.py:105 #: project/forms/common.py:109
msgid "10 (Highlight)" msgid "10 (Highlight)"
msgstr "10 (Highlight)" msgstr "10 (Highlight)"
#: project/forms/common.py:109 #: project/forms/common.py:113
msgid "Monday" msgid "Monday"
msgstr "Montag" msgstr "Montag"
#: project/forms/common.py:110 #: project/forms/common.py:114
msgid "Tueday" msgid "Tueday"
msgstr "Dienstag" msgstr "Dienstag"
#: project/forms/common.py:111 #: project/forms/common.py:115
msgid "Wednesday" msgid "Wednesday"
msgstr "Mittwoch" msgstr "Mittwoch"
#: project/forms/common.py:112 #: project/forms/common.py:116
msgid "Thursday" msgid "Thursday"
msgstr "Donnerstag" msgstr "Donnerstag"
#: project/forms/common.py:113 #: project/forms/common.py:117
msgid "Friday" msgid "Friday"
msgstr "Freitag" msgstr "Freitag"
#: project/forms/common.py:114 #: project/forms/common.py:118
msgid "Saturday" msgid "Saturday"
msgstr "Samstag" msgstr "Samstag"
#: project/forms/common.py:115 #: project/forms/common.py:119
msgid "Sunday" msgid "Sunday"
msgstr "Sonntag" msgstr "Sonntag"
#: project/forms/common.py:119 #: project/forms/common.py:123
msgid "500 m" msgid "500 m"
msgstr "500 m" msgstr "500 m"
#: project/forms/common.py:120 #: project/forms/common.py:124
msgid "5 km" msgid "5 km"
msgstr "5 km" msgstr "5 km"
#: project/forms/common.py:121 #: project/forms/common.py:125
msgid "10 km" msgid "10 km"
msgstr "10 km" msgstr "10 km"
#: project/forms/common.py:122 #: project/forms/common.py:126
msgid "20 km" msgid "20 km"
msgstr "20 km" msgstr "20 km"
#: project/forms/common.py:123 #: project/forms/common.py:127
msgid "50 km" msgid "50 km"
msgstr "50 km" msgstr "50 km"
#: project/forms/common.py:124 #: project/forms/common.py:128
msgid "100 km" msgid "100 km"
msgstr "100 km" msgstr "100 km"
@ -687,7 +687,7 @@ msgid "All-day"
msgstr "Ganztägig" msgstr "Ganztägig"
#: project/forms/event.py:59 project/templates/_macros.html:951 #: project/forms/event.py:59 project/templates/_macros.html:951
#: project/templates/_macros.html:1860 #: project/templates/_macros.html:1862
#: project/templates/widget/event_suggestion/create.html:240 #: project/templates/widget/event_suggestion/create.html:240
msgid "Recurring event" msgid "Recurring event"
msgstr "Serientermin" msgstr "Serientermin"
@ -892,8 +892,8 @@ msgstr "Wähle Kategorien, die zur Veranstaltung passen."
#: project/forms/event.py:260 project/forms/reference.py:14 #: project/forms/event.py:260 project/forms/reference.py:14
#: project/forms/reference.py:27 project/forms/reference_request.py:76 #: project/forms/reference.py:27 project/forms/reference_request.py:76
#: project/templates/event/create.html:387 #: project/templates/event/create.html:371
#: project/templates/event/update.html:220 #: project/templates/event/update.html:228
msgid "Rating" msgid "Rating"
msgstr "Bewertung" msgstr "Bewertung"
@ -925,8 +925,8 @@ msgstr "Ungültiger Mitveranstalter."
#: project/forms/event.py:291 project/forms/event.py:300 #: project/forms/event.py:291 project/forms/event.py:300
#: project/forms/event.py:382 project/forms/event.py:459 #: project/forms/event.py:382 project/forms/event.py:459
#: project/forms/event_suggestion.py:50 project/templates/_macros.html:464 #: project/forms/event_suggestion.py:50 project/templates/_macros.html:464
#: project/templates/_macros.html:630 project/templates/event/create.html:312 #: project/templates/_macros.html:630 project/templates/event/create.html:298
#: project/templates/event/update.html:170 #: project/templates/event/update.html:178
#: project/templates/event_place/create.html:32 #: project/templates/event_place/create.html:32
#: project/templates/event_place/delete.html:13 #: project/templates/event_place/delete.html:13
#: project/templates/event_place/update.html:32 #: project/templates/event_place/update.html:32
@ -946,8 +946,8 @@ msgstr "Neuen Ort eingeben"
#: project/forms/event.py:390 project/forms/event.py:456 #: project/forms/event.py:390 project/forms/event.py:456
#: project/forms/event_date.py:40 project/forms/event_suggestion.py:60 #: project/forms/event_date.py:40 project/forms/event_suggestion.py:60
#: project/templates/_macros.html:501 project/templates/_macros.html:673 #: project/templates/_macros.html:501 project/templates/_macros.html:673
#: project/templates/_macros.html:954 project/templates/event/create.html:281 #: project/templates/_macros.html:954 project/templates/event/create.html:271
#: project/templates/event/update.html:160 #: project/templates/event/update.html:168
#: project/templates/manage/events.html:108 #: project/templates/manage/events.html:108
#: project/templates/organizer/create.html:28 #: project/templates/organizer/create.html:28
#: project/templates/organizer/delete.html:13 #: project/templates/organizer/delete.html:13
@ -964,7 +964,7 @@ msgid "Enter new organizer"
msgstr "Neuen Veranstalter eingeben" msgstr "Neuen Veranstalter eingeben"
#: project/forms/event.py:323 project/templates/_macros.html:738 #: project/forms/event.py:323 project/templates/_macros.html:738
#: project/templates/event/create.html:398 #: project/templates/event/create.html:382
#: project/templates/manage/reference_requests_incoming.html:5 #: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5 #: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests" msgid "Reference requests"
@ -1006,7 +1006,7 @@ msgstr ""
"Wähle den Veranstalter. Du kannst Veranstalter unter Organisation > " "Wähle den Veranstalter. Du kannst Veranstalter unter Organisation > "
"Veranstalter hinzufügen und ändern." "Veranstalter hinzufügen und ändern."
#: project/forms/event.py:399 project/templates/event/update.html:149 #: project/forms/event.py:399 project/templates/event/update.html:157
#: project/templates/oauth2_token/list.html:21 #: project/templates/oauth2_token/list.html:21
msgid "Status" msgid "Status"
msgstr "Status" msgstr "Status"
@ -1055,14 +1055,14 @@ msgstr "In Planung"
msgid "PublicStatus.draft" msgid "PublicStatus.draft"
msgstr "Entwurf" msgstr "Entwurf"
#: project/forms/event.py:419 project/templates/event/create.html:410 #: project/forms/event.py:419 project/templates/event/create.html:394
msgid "Planned events appear in the scheduling view, but not on public calendars." msgid "Planned events appear in the scheduling view, but not on public calendars."
msgstr "" msgstr ""
"Geplante Veranstaltungen werden in der Planungsansicht angezeigt, aber " "Geplante Veranstaltungen werden in der Planungsansicht angezeigt, aber "
"nicht in öffentlichen Kalendern." "nicht in öffentlichen Kalendern."
#: project/forms/event.py:424 project/templates/event/update.html:5 #: project/forms/event.py:424 project/templates/event/update.html:5
#: project/templates/event/update.html:117 #: project/templates/event/update.html:125
msgid "Update event" msgid "Update event"
msgstr "Veranstaltung aktualisieren" msgstr "Veranstaltung aktualisieren"
@ -1196,7 +1196,7 @@ msgstr "Bitte gib deine Email-Adresse oder deine Telefonnummer für die Prüfung
msgid "I would like to be notified by email after the review" msgid "I would like to be notified by email after the review"
msgstr "Ich möchte per Email benachrichtigt werden nach der Prüfung" msgstr "Ich möchte per Email benachrichtigt werden nach der Prüfung"
#: project/forms/event_suggestion.py:52 project/templates/event/create.html:317 #: project/forms/event_suggestion.py:52 project/templates/event/create.html:303
msgid "" msgid ""
"Choose where the event takes place. If the venue is not yet in the list, " "Choose where the event takes place. If the venue is not yet in the list, "
"just enter it." "just enter it."
@ -1204,7 +1204,7 @@ msgstr ""
"Wähle aus, wo die Veranstaltung stattfindet. Ist der Veranstaltungsort " "Wähle aus, wo die Veranstaltung stattfindet. Ist der Veranstaltungsort "
"noch nicht in der Liste, trage ihn einfach ein." "noch nicht in der Liste, trage ihn einfach ein."
#: project/forms/event_suggestion.py:62 project/templates/event/create.html:285 #: project/forms/event_suggestion.py:62 project/templates/event/create.html:275
msgid "" msgid ""
"Select the organizer. If the organizer is not yet on the list, just enter" "Select the organizer. If the organizer is not yet on the list, just enter"
" it." " it."
@ -1497,8 +1497,8 @@ msgstr "Zuletzt aktualisiert am %(updated_at)s."
#: project/templates/_macros.html:413 project/templates/_macros.html:583 #: project/templates/_macros.html:413 project/templates/_macros.html:583
#: project/templates/event/actions.html:25 #: project/templates/event/actions.html:25
#: project/templates/event/create.html:258 #: project/templates/event/create.html:248
#: project/templates/event/update.html:126 #: project/templates/event/update.html:134
#: project/templates/manage/events.html:107 #: project/templates/manage/events.html:107
#: project/templates/widget/event_suggestion/create.html:229 #: project/templates/widget/event_suggestion/create.html:229
msgid "Event" msgid "Event"
@ -1700,18 +1700,18 @@ msgstr "Yahoo Kalender"
msgid "Other calendar" msgid "Other calendar"
msgstr "Anderer Kalender" msgstr "Anderer Kalender"
#: project/templates/_macros.html:1861 #: project/templates/_macros.html:1863
msgid "Remove event date" msgid "Remove event date"
msgstr "Termin entfernen" msgstr "Termin entfernen"
#: project/templates/_macros.html:1894 project/templates/event/create.html:204 #: project/templates/_macros.html:1896 project/templates/event/create.html:204
#: project/templates/event/update.html:103 #: project/templates/event/update.html:111
#: project/templates/event_date/list.html:448 #: project/templates/event_date/list.html:448
#: project/templates/widget/event_suggestion/create.html:129 #: project/templates/widget/event_suggestion/create.html:129
msgid "Enter organizer" msgid "Enter organizer"
msgstr "Veranstalter eingeben" msgstr "Veranstalter eingeben"
#: project/templates/_macros.html:1922 #: project/templates/_macros.html:1924
msgid "Enter list name" msgid "Enter list name"
msgstr "Listenname eingeben" msgstr "Listenname eingeben"
@ -1780,7 +1780,7 @@ msgid "Show events"
msgstr "Veranstaltungen anzeigen" msgstr "Veranstaltungen anzeigen"
#: project/templates/event/create.html:5 #: project/templates/event/create.html:5
#: project/templates/event/create.html:249 project/templates/layout.html:230 #: project/templates/event/create.html:239 project/templates/layout.html:230
#: project/templates/manage/events.html:55 #: project/templates/manage/events.html:55
#: project/templates/manage/organizers.html:38 #: project/templates/manage/organizers.html:38
msgid "Create event" msgid "Create event"
@ -1986,8 +1986,8 @@ msgstr "Akzeptanz der Nutzungsbedingungen und des Datenschutzes zurücksetzen"
#: project/templates/admin_unit/create.html:51 #: project/templates/admin_unit/create.html:51
#: project/templates/admin_unit/update.html:67 #: project/templates/admin_unit/update.html:67
#: project/templates/event/create.html:375 #: project/templates/event/create.html:359
#: project/templates/event/update.html:208 #: project/templates/event/update.html:216
#: project/templates/event_place/create.html:58 #: project/templates/event_place/create.html:58
#: project/templates/event_place/update.html:58 #: project/templates/event_place/update.html:58
#: project/templates/organizer/create.html:57 #: project/templates/organizer/create.html:57
@ -2258,45 +2258,36 @@ msgstr "Zeige alle Veranstaltungen von %(admin_unit_name)s"
msgid "Add event to list" msgid "Add event to list"
msgstr "Veranstaltung zu Liste hinzufügen" msgstr "Veranstaltung zu Liste hinzufügen"
#: project/templates/event/create.html:114 #: project/templates/event/create.html:124
#: project/templates/event/update.html:76 #: project/templates/event/update.html:84
#: project/templates/widget/event_suggestion/create.html:104 msgid "Enter place"
msgid "Enter place or address" msgstr "Ort eingeben"
msgstr "Orte oder Adresse eingeben"
#: project/templates/event/create.html:268 #: project/templates/event/create.html:258
#: project/templates/event/update.html:136 #: project/templates/event/update.html:144
msgid "Event dates" msgid "Event dates"
msgstr "Termine" msgstr "Termine"
#: project/templates/event/create.html:275 #: project/templates/event/create.html:265
#: project/templates/event/update.html:143 #: project/templates/event/update.html:151
msgid "Add event date" msgid "Add event date"
msgstr "Termin hinzufügen" msgstr "Termin hinzufügen"
#: project/templates/event/create.html:302 #: project/templates/event/create.html:332
msgid "Switch to organizer search" #: project/templates/event/update.html:189
msgstr "Zur Veranstaltersuche wechseln"
#: project/templates/event/create.html:337
msgid "Switch to place search"
msgstr "Zur Ortssuche wechseln"
#: project/templates/event/create.html:348
#: project/templates/event/update.html:181
msgid "Access" msgid "Access"
msgstr "Zugang" msgstr "Zugang"
#: project/templates/event/create.html:362 #: project/templates/event/create.html:346
#: project/templates/event/update.html:195 #: project/templates/event/update.html:203
msgid "Target group" msgid "Target group"
msgstr "Zielgruppe" msgstr "Zielgruppe"
#: project/templates/event/create.html:402 #: project/templates/event/create.html:386
msgid "References are important for the visibility of your events." msgid "References are important for the visibility of your events."
msgstr "Empfehlungen sind wichtig für die Sichtbarkeit deiner Veranstaltungen." msgstr "Empfehlungen sind wichtig für die Sichtbarkeit deiner Veranstaltungen."
#: project/templates/event/create.html:403 #: project/templates/event/create.html:387
msgid "Select organizations to display your event on their calendars." msgid "Select organizations to display your event on their calendars."
msgstr "" msgstr ""
"Wähle Organisationen aus, die deine Veranstaltung in ihren Kalendern " "Wähle Organisationen aus, die deine Veranstaltung in ihren Kalendern "
@ -2651,6 +2642,10 @@ msgstr "Widget"
msgid "Print" msgid "Print"
msgstr "Drucken" msgstr "Drucken"
#: project/templates/widget/event_suggestion/create.html:104
msgid "Enter place or address"
msgstr "Orte oder Adresse eingeben"
#: project/templates/widget/event_suggestion/create.html:175 #: project/templates/widget/event_suggestion/create.html:175
msgid "Continue as guest" msgid "Continue as guest"
msgstr "Weiter als Gast" msgstr "Weiter als Gast"
@ -3130,3 +3125,9 @@ msgstr "Neue Veranstaltung zu prüfen"
#~ "wirst benachrichtigt, nachdem die andere " #~ "wirst benachrichtigt, nachdem die andere "
#~ "Organisation die Veranstaltung geprüft hat." #~ "Organisation die Veranstaltung geprüft hat."
#~ msgid "Switch to organizer search"
#~ msgstr "Zur Veranstaltersuche wechseln"
#~ msgid "Switch to place search"
#~ msgstr "Zur Ortssuche wechseln"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-08-29 23:52+0200\n" "POT-Creation-Date: 2023-09-06 17:11+0200\n"
"PO-Revision-Date: 2021-04-30 15:04+0200\n" "PO-Revision-Date: 2021-04-30 15:04+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n" "Language: en\n"
@ -412,7 +412,7 @@ msgstr ""
msgid "The short name is used to create a unique identifier for your events" msgid "The short name is used to create a unique identifier for your events"
msgstr "" msgstr ""
#: project/forms/admin_unit.py:46 project/templates/_macros.html:1690 #: project/forms/admin_unit.py:46 project/templates/_macros.html:1692
msgid "Short name must contain only letters numbers or underscore" msgid "Short name must contain only letters numbers or underscore"
msgstr "" msgstr ""
@ -564,79 +564,79 @@ msgstr ""
msgid "Image" msgid "Image"
msgstr "" msgstr ""
#: project/forms/common.py:74 #: project/forms/common.py:78
#, python-format #, python-format
msgid "" msgid ""
"I read and accept %(tos_open)sTerms of Service%(tos_close)s and " "I read and accept %(tos_open)sTerms of Service%(tos_close)s and "
"%(privacy_open)sPrivacy%(privacy_close)s." "%(privacy_open)sPrivacy%(privacy_close)s."
msgstr "" msgstr ""
#: project/forms/common.py:84 #: project/forms/common.py:88
#, python-format #, python-format
msgid "I read and accept %(privacy_open)sPrivacy%(privacy_close)s." msgid "I read and accept %(privacy_open)sPrivacy%(privacy_close)s."
msgstr "" msgstr ""
#: project/forms/common.py:95 #: project/forms/common.py:99
msgid "0 (Little relevant)" msgid "0 (Little relevant)"
msgstr "" msgstr ""
#: project/forms/common.py:100 #: project/forms/common.py:104
msgid "5 (Default)" msgid "5 (Default)"
msgstr "" msgstr ""
#: project/forms/common.py:105 #: project/forms/common.py:109
msgid "10 (Highlight)" msgid "10 (Highlight)"
msgstr "" msgstr ""
#: project/forms/common.py:109 #: project/forms/common.py:113
msgid "Monday" msgid "Monday"
msgstr "" msgstr ""
#: project/forms/common.py:110 #: project/forms/common.py:114
msgid "Tueday" msgid "Tueday"
msgstr "" msgstr ""
#: project/forms/common.py:111 #: project/forms/common.py:115
msgid "Wednesday" msgid "Wednesday"
msgstr "" msgstr ""
#: project/forms/common.py:112 #: project/forms/common.py:116
msgid "Thursday" msgid "Thursday"
msgstr "" msgstr ""
#: project/forms/common.py:113 #: project/forms/common.py:117
msgid "Friday" msgid "Friday"
msgstr "" msgstr ""
#: project/forms/common.py:114 #: project/forms/common.py:118
msgid "Saturday" msgid "Saturday"
msgstr "" msgstr ""
#: project/forms/common.py:115 #: project/forms/common.py:119
msgid "Sunday" msgid "Sunday"
msgstr "" msgstr ""
#: project/forms/common.py:119 #: project/forms/common.py:123
msgid "500 m" msgid "500 m"
msgstr "" msgstr ""
#: project/forms/common.py:120 #: project/forms/common.py:124
msgid "5 km" msgid "5 km"
msgstr "" msgstr ""
#: project/forms/common.py:121 #: project/forms/common.py:125
msgid "10 km" msgid "10 km"
msgstr "" msgstr ""
#: project/forms/common.py:122 #: project/forms/common.py:126
msgid "20 km" msgid "20 km"
msgstr "" msgstr ""
#: project/forms/common.py:123 #: project/forms/common.py:127
msgid "50 km" msgid "50 km"
msgstr "" msgstr ""
#: project/forms/common.py:124 #: project/forms/common.py:128
msgid "100 km" msgid "100 km"
msgstr "" msgstr ""
@ -663,7 +663,7 @@ msgid "All-day"
msgstr "" msgstr ""
#: project/forms/event.py:59 project/templates/_macros.html:951 #: project/forms/event.py:59 project/templates/_macros.html:951
#: project/templates/_macros.html:1860 #: project/templates/_macros.html:1862
#: project/templates/widget/event_suggestion/create.html:240 #: project/templates/widget/event_suggestion/create.html:240
msgid "Recurring event" msgid "Recurring event"
msgstr "" msgstr ""
@ -855,8 +855,8 @@ msgstr ""
#: project/forms/event.py:260 project/forms/reference.py:14 #: project/forms/event.py:260 project/forms/reference.py:14
#: project/forms/reference.py:27 project/forms/reference_request.py:76 #: project/forms/reference.py:27 project/forms/reference_request.py:76
#: project/templates/event/create.html:387 #: project/templates/event/create.html:371
#: project/templates/event/update.html:220 #: project/templates/event/update.html:228
msgid "Rating" msgid "Rating"
msgstr "" msgstr ""
@ -884,8 +884,8 @@ msgstr ""
#: project/forms/event.py:291 project/forms/event.py:300 #: project/forms/event.py:291 project/forms/event.py:300
#: project/forms/event.py:382 project/forms/event.py:459 #: project/forms/event.py:382 project/forms/event.py:459
#: project/forms/event_suggestion.py:50 project/templates/_macros.html:464 #: project/forms/event_suggestion.py:50 project/templates/_macros.html:464
#: project/templates/_macros.html:630 project/templates/event/create.html:312 #: project/templates/_macros.html:630 project/templates/event/create.html:298
#: project/templates/event/update.html:170 #: project/templates/event/update.html:178
#: project/templates/event_place/create.html:32 #: project/templates/event_place/create.html:32
#: project/templates/event_place/delete.html:13 #: project/templates/event_place/delete.html:13
#: project/templates/event_place/update.html:32 #: project/templates/event_place/update.html:32
@ -905,8 +905,8 @@ msgstr ""
#: project/forms/event.py:390 project/forms/event.py:456 #: project/forms/event.py:390 project/forms/event.py:456
#: project/forms/event_date.py:40 project/forms/event_suggestion.py:60 #: project/forms/event_date.py:40 project/forms/event_suggestion.py:60
#: project/templates/_macros.html:501 project/templates/_macros.html:673 #: project/templates/_macros.html:501 project/templates/_macros.html:673
#: project/templates/_macros.html:954 project/templates/event/create.html:281 #: project/templates/_macros.html:954 project/templates/event/create.html:271
#: project/templates/event/update.html:160 #: project/templates/event/update.html:168
#: project/templates/manage/events.html:108 #: project/templates/manage/events.html:108
#: project/templates/organizer/create.html:28 #: project/templates/organizer/create.html:28
#: project/templates/organizer/delete.html:13 #: project/templates/organizer/delete.html:13
@ -923,7 +923,7 @@ msgid "Enter new organizer"
msgstr "" msgstr ""
#: project/forms/event.py:323 project/templates/_macros.html:738 #: project/forms/event.py:323 project/templates/_macros.html:738
#: project/templates/event/create.html:398 #: project/templates/event/create.html:382
#: project/templates/manage/reference_requests_incoming.html:5 #: project/templates/manage/reference_requests_incoming.html:5
#: project/templates/manage/reference_requests_outgoing.html:5 #: project/templates/manage/reference_requests_outgoing.html:5
msgid "Reference requests" msgid "Reference requests"
@ -961,7 +961,7 @@ msgid ""
" Organizers." " Organizers."
msgstr "" msgstr ""
#: project/forms/event.py:399 project/templates/event/update.html:149 #: project/forms/event.py:399 project/templates/event/update.html:157
#: project/templates/oauth2_token/list.html:21 #: project/templates/oauth2_token/list.html:21
msgid "Status" msgid "Status"
msgstr "" msgstr ""
@ -1010,12 +1010,12 @@ msgstr "Planned"
msgid "PublicStatus.draft" msgid "PublicStatus.draft"
msgstr "Draft" msgstr "Draft"
#: project/forms/event.py:419 project/templates/event/create.html:410 #: project/forms/event.py:419 project/templates/event/create.html:394
msgid "Planned events appear in the scheduling view, but not on public calendars." msgid "Planned events appear in the scheduling view, but not on public calendars."
msgstr "" msgstr ""
#: project/forms/event.py:424 project/templates/event/update.html:5 #: project/forms/event.py:424 project/templates/event/update.html:5
#: project/templates/event/update.html:117 #: project/templates/event/update.html:125
msgid "Update event" msgid "Update event"
msgstr "" msgstr ""
@ -1149,13 +1149,13 @@ msgstr ""
msgid "I would like to be notified by email after the review" msgid "I would like to be notified by email after the review"
msgstr "" msgstr ""
#: project/forms/event_suggestion.py:52 project/templates/event/create.html:317 #: project/forms/event_suggestion.py:52 project/templates/event/create.html:303
msgid "" msgid ""
"Choose where the event takes place. If the venue is not yet in the list, " "Choose where the event takes place. If the venue is not yet in the list, "
"just enter it." "just enter it."
msgstr "" msgstr ""
#: project/forms/event_suggestion.py:62 project/templates/event/create.html:285 #: project/forms/event_suggestion.py:62 project/templates/event/create.html:275
msgid "" msgid ""
"Select the organizer. If the organizer is not yet on the list, just enter" "Select the organizer. If the organizer is not yet on the list, just enter"
" it." " it."
@ -1446,8 +1446,8 @@ msgstr ""
#: project/templates/_macros.html:413 project/templates/_macros.html:583 #: project/templates/_macros.html:413 project/templates/_macros.html:583
#: project/templates/event/actions.html:25 #: project/templates/event/actions.html:25
#: project/templates/event/create.html:258 #: project/templates/event/create.html:248
#: project/templates/event/update.html:126 #: project/templates/event/update.html:134
#: project/templates/manage/events.html:107 #: project/templates/manage/events.html:107
#: project/templates/widget/event_suggestion/create.html:229 #: project/templates/widget/event_suggestion/create.html:229
msgid "Event" msgid "Event"
@ -1647,18 +1647,18 @@ msgstr ""
msgid "Other calendar" msgid "Other calendar"
msgstr "" msgstr ""
#: project/templates/_macros.html:1861 #: project/templates/_macros.html:1863
msgid "Remove event date" msgid "Remove event date"
msgstr "" msgstr ""
#: project/templates/_macros.html:1894 project/templates/event/create.html:204 #: project/templates/_macros.html:1896 project/templates/event/create.html:204
#: project/templates/event/update.html:103 #: project/templates/event/update.html:111
#: project/templates/event_date/list.html:448 #: project/templates/event_date/list.html:448
#: project/templates/widget/event_suggestion/create.html:129 #: project/templates/widget/event_suggestion/create.html:129
msgid "Enter organizer" msgid "Enter organizer"
msgstr "" msgstr ""
#: project/templates/_macros.html:1922 #: project/templates/_macros.html:1924
msgid "Enter list name" msgid "Enter list name"
msgstr "" msgstr ""
@ -1727,7 +1727,7 @@ msgid "Show events"
msgstr "" msgstr ""
#: project/templates/event/create.html:5 #: project/templates/event/create.html:5
#: project/templates/event/create.html:249 project/templates/layout.html:230 #: project/templates/event/create.html:239 project/templates/layout.html:230
#: project/templates/manage/events.html:55 #: project/templates/manage/events.html:55
#: project/templates/manage/organizers.html:38 #: project/templates/manage/organizers.html:38
msgid "Create event" msgid "Create event"
@ -1933,8 +1933,8 @@ msgstr ""
#: project/templates/admin_unit/create.html:51 #: project/templates/admin_unit/create.html:51
#: project/templates/admin_unit/update.html:67 #: project/templates/admin_unit/update.html:67
#: project/templates/event/create.html:375 #: project/templates/event/create.html:359
#: project/templates/event/update.html:208 #: project/templates/event/update.html:216
#: project/templates/event_place/create.html:58 #: project/templates/event_place/create.html:58
#: project/templates/event_place/update.html:58 #: project/templates/event_place/update.html:58
#: project/templates/organizer/create.html:57 #: project/templates/organizer/create.html:57
@ -2199,45 +2199,36 @@ msgstr ""
msgid "Add event to list" msgid "Add event to list"
msgstr "" msgstr ""
#: project/templates/event/create.html:114 #: project/templates/event/create.html:124
#: project/templates/event/update.html:76 #: project/templates/event/update.html:84
#: project/templates/widget/event_suggestion/create.html:104 msgid "Enter place"
msgid "Enter place or address"
msgstr "" msgstr ""
#: project/templates/event/create.html:268 #: project/templates/event/create.html:258
#: project/templates/event/update.html:136 #: project/templates/event/update.html:144
msgid "Event dates" msgid "Event dates"
msgstr "" msgstr ""
#: project/templates/event/create.html:275 #: project/templates/event/create.html:265
#: project/templates/event/update.html:143 #: project/templates/event/update.html:151
msgid "Add event date" msgid "Add event date"
msgstr "" msgstr ""
#: project/templates/event/create.html:302 #: project/templates/event/create.html:332
msgid "Switch to organizer search" #: project/templates/event/update.html:189
msgstr ""
#: project/templates/event/create.html:337
msgid "Switch to place search"
msgstr ""
#: project/templates/event/create.html:348
#: project/templates/event/update.html:181
msgid "Access" msgid "Access"
msgstr "" msgstr ""
#: project/templates/event/create.html:362 #: project/templates/event/create.html:346
#: project/templates/event/update.html:195 #: project/templates/event/update.html:203
msgid "Target group" msgid "Target group"
msgstr "" msgstr ""
#: project/templates/event/create.html:402 #: project/templates/event/create.html:386
msgid "References are important for the visibility of your events." msgid "References are important for the visibility of your events."
msgstr "" msgstr ""
#: project/templates/event/create.html:403 #: project/templates/event/create.html:387
msgid "Select organizations to display your event on their calendars." msgid "Select organizations to display your event on their calendars."
msgstr "" msgstr ""
@ -2581,6 +2572,10 @@ msgstr ""
msgid "Print" msgid "Print"
msgstr "" msgstr ""
#: project/templates/widget/event_suggestion/create.html:104
msgid "Enter place or address"
msgstr ""
#: project/templates/widget/event_suggestion/create.html:175 #: project/templates/widget/event_suggestion/create.html:175
msgid "Continue as guest" msgid "Continue as guest"
msgstr "" msgstr ""
@ -3032,3 +3027,9 @@ msgstr ""
#~ " reviews the event." #~ " reviews the event."
#~ msgstr "" #~ msgstr ""
#~ msgid "Switch to organizer search"
#~ msgstr ""
#~ msgid "Switch to place search"
#~ msgstr ""

View File

@ -43,7 +43,7 @@ from project.services.event import (
update_event, update_event,
upsert_event_category, upsert_event_category,
) )
from project.utils import get_event_category_name, get_place_str from project.utils import get_event_category_name
from project.views.event_suggestion import send_event_suggestion_review_status_mail from project.views.event_suggestion import send_event_suggestion_review_status_mail
from project.views.reference_request import ( from project.views.reference_request import (
handle_request_according_to_relation, handle_request_according_to_relation,
@ -340,7 +340,7 @@ def prepare_event_place(form):
place = db.session.get(EventPlace, form.event_place_id.data) place = db.session.get(EventPlace, form.event_place_id.data)
if place: if place:
form.event_place_id.choices = [(place.id, get_place_str(place))] form.event_place_id.choices = [(place.id, place.name)]
if not form.event_place_id.choices: if not form.event_place_id.choices:
form.event_place_id.choices = [] form.event_place_id.choices = []