diff --git a/cypress/e2e/event.cy.js b/cypress/e2e/event.cy.js index 479d485..841da7c 100644 --- a/cypress/e2e/event.cy.js +++ b/cypress/e2e/event.cy.js @@ -11,14 +11,14 @@ describe("Event", () => { cy.get("#add-date-defintion-btn").click(); 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_place_container_search_link").click(); - cy.select2("event_place_id", "Gos", "Goslar, 38640 Goslar"); + cy.get('#event_place_choice-0').click(); + 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_container_search_link").click(); + cy.get('#organizer_choice-0').click(); cy.select2("organizer_id", "Mei", "Meine Crew"); cy.get("#submit").click(); @@ -54,7 +54,7 @@ describe("Event", () => { cy.visit("/admin_unit/" + adminUnitId + "/events/create"); 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.get("#submit_draft").click(); diff --git a/messages.pot b/messages.pot index a99da5f..8e2f664 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -411,7 +411,7 @@ msgstr "" msgid "The short name is used to create a unique identifier for your events" 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" msgstr "" @@ -563,79 +563,79 @@ msgstr "" msgid "Image" msgstr "" -#: project/forms/common.py:74 +#: project/forms/common.py:78 #, python-format msgid "" "I read and accept %(tos_open)sTerms of Service%(tos_close)s and " "%(privacy_open)sPrivacy%(privacy_close)s." msgstr "" -#: project/forms/common.py:84 +#: project/forms/common.py:88 #, python-format msgid "I read and accept %(privacy_open)sPrivacy%(privacy_close)s." msgstr "" -#: project/forms/common.py:95 +#: project/forms/common.py:99 msgid "0 (Little relevant)" msgstr "" -#: project/forms/common.py:100 +#: project/forms/common.py:104 msgid "5 (Default)" msgstr "" -#: project/forms/common.py:105 +#: project/forms/common.py:109 msgid "10 (Highlight)" msgstr "" -#: project/forms/common.py:109 +#: project/forms/common.py:113 msgid "Monday" msgstr "" -#: project/forms/common.py:110 +#: project/forms/common.py:114 msgid "Tueday" msgstr "" -#: project/forms/common.py:111 +#: project/forms/common.py:115 msgid "Wednesday" msgstr "" -#: project/forms/common.py:112 +#: project/forms/common.py:116 msgid "Thursday" msgstr "" -#: project/forms/common.py:113 +#: project/forms/common.py:117 msgid "Friday" msgstr "" -#: project/forms/common.py:114 +#: project/forms/common.py:118 msgid "Saturday" msgstr "" -#: project/forms/common.py:115 +#: project/forms/common.py:119 msgid "Sunday" msgstr "" -#: project/forms/common.py:119 +#: project/forms/common.py:123 msgid "500 m" msgstr "" -#: project/forms/common.py:120 +#: project/forms/common.py:124 msgid "5 km" msgstr "" -#: project/forms/common.py:121 +#: project/forms/common.py:125 msgid "10 km" msgstr "" -#: project/forms/common.py:122 +#: project/forms/common.py:126 msgid "20 km" msgstr "" -#: project/forms/common.py:123 +#: project/forms/common.py:127 msgid "50 km" msgstr "" -#: project/forms/common.py:124 +#: project/forms/common.py:128 msgid "100 km" msgstr "" @@ -662,7 +662,7 @@ msgid "All-day" msgstr "" #: 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 msgid "Recurring event" msgstr "" @@ -854,8 +854,8 @@ msgstr "" #: project/forms/event.py:260 project/forms/reference.py:14 #: project/forms/reference.py:27 project/forms/reference_request.py:76 -#: project/templates/event/create.html:387 -#: project/templates/event/update.html:220 +#: project/templates/event/create.html:371 +#: project/templates/event/update.html:228 msgid "Rating" msgstr "" @@ -883,8 +883,8 @@ msgstr "" #: project/forms/event.py:291 project/forms/event.py:300 #: project/forms/event.py:382 project/forms/event.py:459 #: project/forms/event_suggestion.py:50 project/templates/_macros.html:464 -#: project/templates/_macros.html:630 project/templates/event/create.html:312 -#: project/templates/event/update.html:170 +#: project/templates/_macros.html:630 project/templates/event/create.html:298 +#: project/templates/event/update.html:178 #: project/templates/event_place/create.html:32 #: project/templates/event_place/delete.html:13 #: 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_date.py:40 project/forms/event_suggestion.py:60 #: project/templates/_macros.html:501 project/templates/_macros.html:673 -#: project/templates/_macros.html:954 project/templates/event/create.html:281 -#: project/templates/event/update.html:160 +#: project/templates/_macros.html:954 project/templates/event/create.html:271 +#: project/templates/event/update.html:168 #: project/templates/manage/events.html:108 #: project/templates/organizer/create.html:28 #: project/templates/organizer/delete.html:13 @@ -922,7 +922,7 @@ msgid "Enter new organizer" msgstr "" #: 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_outgoing.html:5 msgid "Reference requests" @@ -960,7 +960,7 @@ msgid "" " Organizers." 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 msgid "Status" msgstr "" @@ -1009,12 +1009,12 @@ msgstr "" msgid "PublicStatus.draft" 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." msgstr "" #: 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" msgstr "" @@ -1148,13 +1148,13 @@ msgstr "" msgid "I would like to be notified by email after the review" 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 "" "Choose where the event takes place. If the venue is not yet in the list, " "just enter it." 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 "" "Select the organizer. If the organizer is not yet on the list, just enter" " it." @@ -1438,8 +1438,8 @@ msgstr "" #: project/templates/_macros.html:413 project/templates/_macros.html:583 #: project/templates/event/actions.html:25 -#: project/templates/event/create.html:258 -#: project/templates/event/update.html:126 +#: project/templates/event/create.html:248 +#: project/templates/event/update.html:134 #: project/templates/manage/events.html:107 #: project/templates/widget/event_suggestion/create.html:229 msgid "Event" @@ -1639,18 +1639,18 @@ msgstr "" msgid "Other calendar" msgstr "" -#: project/templates/_macros.html:1861 +#: project/templates/_macros.html:1863 msgid "Remove event date" msgstr "" -#: project/templates/_macros.html:1894 project/templates/event/create.html:204 -#: project/templates/event/update.html:103 +#: project/templates/_macros.html:1896 project/templates/event/create.html:204 +#: project/templates/event/update.html:111 #: project/templates/event_date/list.html:448 #: project/templates/widget/event_suggestion/create.html:129 msgid "Enter organizer" msgstr "" -#: project/templates/_macros.html:1922 +#: project/templates/_macros.html:1924 msgid "Enter list name" msgstr "" @@ -1719,7 +1719,7 @@ msgid "Show events" msgstr "" #: 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/organizers.html:38 msgid "Create event" @@ -1925,8 +1925,8 @@ msgstr "" #: project/templates/admin_unit/create.html:51 #: project/templates/admin_unit/update.html:67 -#: project/templates/event/create.html:375 -#: project/templates/event/update.html:208 +#: project/templates/event/create.html:359 +#: project/templates/event/update.html:216 #: project/templates/event_place/create.html:58 #: project/templates/event_place/update.html:58 #: project/templates/organizer/create.html:57 @@ -2191,45 +2191,36 @@ msgstr "" msgid "Add event to list" msgstr "" -#: project/templates/event/create.html:114 -#: project/templates/event/update.html:76 -#: project/templates/widget/event_suggestion/create.html:104 -msgid "Enter place or address" +#: project/templates/event/create.html:124 +#: project/templates/event/update.html:84 +msgid "Enter place" msgstr "" -#: project/templates/event/create.html:268 -#: project/templates/event/update.html:136 +#: project/templates/event/create.html:258 +#: project/templates/event/update.html:144 msgid "Event dates" msgstr "" -#: project/templates/event/create.html:275 -#: project/templates/event/update.html:143 +#: project/templates/event/create.html:265 +#: project/templates/event/update.html:151 msgid "Add event date" msgstr "" -#: project/templates/event/create.html:302 -msgid "Switch to organizer search" -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 +#: project/templates/event/create.html:332 +#: project/templates/event/update.html:189 msgid "Access" msgstr "" -#: project/templates/event/create.html:362 -#: project/templates/event/update.html:195 +#: project/templates/event/create.html:346 +#: project/templates/event/update.html:203 msgid "Target group" msgstr "" -#: project/templates/event/create.html:402 +#: project/templates/event/create.html:386 msgid "References are important for the visibility of your events." msgstr "" -#: project/templates/event/create.html:403 +#: project/templates/event/create.html:387 msgid "Select organizations to display your event on their calendars." msgstr "" @@ -2573,6 +2564,10 @@ msgstr "" msgid "Print" msgstr "" +#: project/templates/widget/event_suggestion/create.html:104 +msgid "Enter place or address" +msgstr "" + #: project/templates/widget/event_suggestion/create.html:175 msgid "Continue as guest" msgstr "" diff --git a/project/static/site.js b/project/static/site.js index 98300de..3ddfece 100644 --- a/project/static/site.js +++ b/project/static/site.js @@ -556,4 +556,8 @@ $(function () { $(".hide-link").click(function (e) { hideLink(e, this); }); + + $(document).on('select2:open', function(e) { + document.querySelector(`[aria-controls="select2-${e.target.id}-results"]`).focus(); + }); }); diff --git a/project/templates/_macros.html b/project/templates/_macros.html index 311ee0d..af2d139 100644 --- a/project/templates/_macros.html +++ b/project/templates/_macros.html @@ -793,7 +793,7 @@ {% endif %} {% endmacro %} -{% macro render_google_place_autocomplete_header() %} +{% macro render_google_place_autocomplete_header(target_prefix='') %}