From 31a43a78ec553b3cb4ad36071f5cc110dba9c107 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Sun, 25 Jul 2021 22:56:29 +0200 Subject: [PATCH] Add validation to AdminUnit:Create #237 --- messages.pot | 302 ++++++++--------- project/__init__.py | 6 + project/forms/admin_unit.py | 10 +- project/templates/_macros.html | 53 ++- project/templates/admin_unit/create.html | 6 +- project/templates/admin_unit/update.html | 6 +- project/templates/layout.html | 11 + .../translations/de/LC_MESSAGES/messages.mo | Bin 27635 -> 27713 bytes .../translations/de/LC_MESSAGES/messages.po | 306 +++++++++--------- .../translations/en/LC_MESSAGES/messages.mo | Bin 3153 -> 3153 bytes .../translations/en/LC_MESSAGES/messages.po | 302 ++++++++--------- project/views/js.py | 24 ++ tests/utils.py | 20 +- tests/views/test_js.py | 37 +++ 14 files changed, 625 insertions(+), 458 deletions(-) create mode 100644 project/views/js.py create mode 100644 tests/views/test_js.py diff --git a/messages.pot b/messages.pot index ed1a41d..fabf6cd 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: 2021-07-22 22:41+0200\n" +"POT-Creation-Date: 2021-07-25 22:35+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -165,24 +165,24 @@ msgstr "" msgid "." msgstr "" -#: project/forms/admin.py:10 project/templates/layout.html:246 +#: project/forms/admin.py:10 project/templates/layout.html:257 #: project/views/root.py:42 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:250 +#: project/forms/admin.py:11 project/templates/layout.html:261 #: project/views/root.py:50 msgid "Legal notice" msgstr "" -#: project/forms/admin.py:12 project/templates/_macros.html:1245 -#: project/templates/layout.html:254 -#: project/templates/widget/event_suggestion/create.html:170 +#: project/forms/admin.py:12 project/templates/_macros.html:1271 +#: project/templates/layout.html:265 +#: project/templates/widget/event_suggestion/create.html:172 #: project/views/admin_unit.py:36 project/views/root.py:58 msgid "Contact" msgstr "" -#: project/forms/admin.py:13 project/templates/layout.html:258 +#: project/forms/admin.py:13 project/templates/layout.html:269 #: project/views/root.py:66 msgid "Privacy" msgstr "" @@ -216,43 +216,43 @@ msgstr "" msgid "Update organization" msgstr "" -#: project/forms/admin_unit.py:13 project/forms/event.py:33 +#: project/forms/admin_unit.py:14 project/forms/event.py:33 #: project/forms/event_place.py:12 project/forms/organizer.py:12 msgid "Street" msgstr "" -#: project/forms/admin_unit.py:14 project/forms/event.py:34 +#: project/forms/admin_unit.py:15 project/forms/event.py:34 #: project/forms/event_place.py:13 project/forms/organizer.py:13 msgid "Postal code" msgstr "" -#: project/forms/admin_unit.py:15 project/forms/event.py:35 +#: project/forms/admin_unit.py:16 project/forms/event.py:35 #: project/forms/event_place.py:14 project/forms/organizer.py:14 msgid "City" msgstr "" -#: project/forms/admin_unit.py:16 project/forms/event_place.py:15 +#: project/forms/admin_unit.py:17 project/forms/event_place.py:15 #: project/forms/organizer.py:15 msgid "State" msgstr "" -#: project/forms/admin_unit.py:18 project/forms/event_place.py:17 +#: project/forms/admin_unit.py:19 project/forms/event_place.py:17 #: project/forms/organizer.py:17 msgid "Latitude" msgstr "" -#: project/forms/admin_unit.py:21 project/forms/event_place.py:20 +#: project/forms/admin_unit.py:22 project/forms/event_place.py:20 #: project/forms/organizer.py:20 msgid "Longitude" msgstr "" -#: project/forms/admin_unit.py:26 project/forms/event.py:40 +#: project/forms/admin_unit.py:28 project/forms/event.py:40 #: project/forms/event.py:69 project/forms/event.py:363 #: project/forms/event_place.py:25 project/forms/event_place.py:50 #: project/forms/event_suggestion.py:26 project/forms/oauth2_client.py:66 #: project/forms/organizer.py:25 project/forms/organizer.py:52 #: project/forms/reference.py:40 project/forms/reference_request.py:22 -#: project/templates/_macros.html:111 +#: project/templates/_macros.html:126 #: project/templates/admin/admin_units.html:19 #: project/templates/event_place/list.html:19 #: project/templates/oauth2_client/list.html:25 @@ -260,69 +260,69 @@ msgstr "" msgid "Name" msgstr "" -#: project/forms/admin_unit.py:28 +#: project/forms/admin_unit.py:31 msgid "Short name" msgstr "" -#: project/forms/admin_unit.py:29 +#: project/forms/admin_unit.py:32 msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:36 +#: project/forms/admin_unit.py:40 project/templates/admin_unit/create.html:13 msgid "Short name must contain only letters numbers or underscore" msgstr "" -#: project/forms/admin_unit.py:42 project/forms/event.py:61 +#: project/forms/admin_unit.py:46 project/forms/event.py:61 #: project/forms/event.py:98 project/forms/event_place.py:26 #: project/forms/organizer.py:26 msgid "Link URL" msgstr "" -#: project/forms/admin_unit.py:43 project/forms/admin_unit_member.py:11 +#: project/forms/admin_unit.py:47 project/forms/admin_unit_member.py:11 #: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 #: project/forms/event.py:62 project/forms/event_suggestion.py:38 -#: project/forms/organizer.py:27 project/templates/_macros.html:238 -#: project/templates/_macros.html:1335 project/templates/admin/users.html:19 +#: project/forms/organizer.py:27 project/templates/_macros.html:253 +#: project/templates/_macros.html:1361 project/templates/admin/users.html:19 msgid "Email" msgstr "" -#: project/forms/admin_unit.py:44 project/forms/event.py:63 +#: project/forms/admin_unit.py:48 project/forms/event.py:63 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:28 -#: project/templates/_macros.html:281 +#: project/templates/_macros.html:296 msgid "Phone" msgstr "" -#: project/forms/admin_unit.py:45 project/forms/event.py:64 -#: project/forms/organizer.py:29 project/templates/_macros.html:289 +#: project/forms/admin_unit.py:49 project/forms/event.py:64 +#: project/forms/organizer.py:29 project/templates/_macros.html:304 msgid "Fax" msgstr "" -#: project/forms/admin_unit.py:46 project/forms/organizer.py:30 +#: project/forms/admin_unit.py:50 project/forms/organizer.py:30 msgid "Logo" msgstr "" -#: project/forms/admin_unit.py:59 project/templates/admin_unit/create.html:11 +#: project/forms/admin_unit.py:63 project/templates/admin_unit/create.html:52 #: project/templates/manage/admin_units.html:18 msgid "Create organization" msgstr "" -#: project/forms/admin_unit.py:63 project/forms/admin_unit.py:86 +#: project/forms/admin_unit.py:67 project/forms/admin_unit.py:90 msgid "Update settings" msgstr "" -#: project/forms/admin_unit.py:67 +#: project/forms/admin_unit.py:71 msgid "Font" msgstr "" -#: project/forms/admin_unit.py:69 +#: project/forms/admin_unit.py:73 msgid "Background Color" msgstr "" -#: project/forms/admin_unit.py:75 +#: project/forms/admin_unit.py:79 msgid "Primary Color" msgstr "" -#: project/forms/admin_unit.py:81 +#: project/forms/admin_unit.py:85 msgid "Link Color" msgstr "" @@ -490,7 +490,7 @@ msgstr "" msgid "Enter a link where tickets can be purchased." msgstr "" -#: project/forms/event.py:110 project/templates/_macros.html:220 +#: project/forms/event.py:110 project/templates/_macros.html:235 msgid "Tags" msgstr "" @@ -540,8 +540,8 @@ msgstr "" msgid "If the participants needs to register for the event." msgstr "" -#: project/forms/event.py:144 project/templates/_macros.html:252 -#: project/templates/layout.html:144 +#: project/forms/event.py:144 project/templates/_macros.html:267 +#: project/templates/layout.html:155 msgid "Booked up" msgstr "" @@ -597,11 +597,11 @@ msgstr "" msgid "EventAttendanceMode.offline" msgstr "" -#: project/forms/event.py:191 project/templates/layout.html:132 +#: project/forms/event.py:191 project/templates/layout.html:143 msgid "EventAttendanceMode.online" msgstr "" -#: project/forms/event.py:193 project/templates/layout.html:135 +#: project/forms/event.py:193 project/templates/layout.html:146 msgid "EventAttendanceMode.mixed" msgstr "" @@ -610,7 +610,7 @@ msgid "Choose how people can attend the event." msgstr "" #: project/forms/event.py:199 project/forms/event_place.py:27 -#: project/templates/widget/event_suggestion/create.html:217 +#: project/templates/widget/event_suggestion/create.html:219 msgid "Photo" msgstr "" @@ -620,16 +620,16 @@ msgid "" " course it works without it." msgstr "" -#: project/forms/event.py:211 project/templates/_macros.html:1172 +#: project/forms/event.py:211 project/templates/_macros.html:1184 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:217 project/templates/_macros.html:1189 +#: project/forms/event.py:217 project/templates/_macros.html:1201 msgid "An event can last a maximum of 14 days." msgstr "" -#: project/forms/event.py:225 project/templates/_macros.html:399 -#: project/templates/_macros.html:558 +#: project/forms/event.py:225 project/templates/_macros.html:414 +#: project/templates/_macros.html:573 msgid "Previous start date" msgstr "" @@ -647,8 +647,8 @@ msgstr "" #: project/forms/event.py:238 project/forms/reference.py:14 #: project/forms/reference.py:27 project/forms/reference_request.py:70 -#: project/templates/event/create.html:190 -#: project/templates/event/update.html:155 +#: project/templates/event/create.html:193 +#: project/templates/event/update.html:158 msgid "Rating" msgstr "" @@ -661,9 +661,9 @@ msgstr "" #: project/forms/event.py:250 project/forms/event.py:259 #: project/forms/event.py:319 project/forms/event_suggestion.py:50 -#: project/templates/_macros.html:438 project/templates/_macros.html:594 -#: project/templates/event/create.html:121 -#: project/templates/event/update.html:105 +#: project/templates/_macros.html:453 project/templates/_macros.html:609 +#: project/templates/event/create.html:124 +#: project/templates/event/update.html:108 #: project/templates/event_place/create.html:21 #: project/templates/event_place/delete.html:13 #: project/templates/event_place/update.html:21 @@ -680,9 +680,9 @@ msgstr "" #: project/forms/event.py:266 project/forms/event.py:275 #: project/forms/event.py:327 project/forms/event.py:377 -#: project/forms/event_suggestion.py:60 project/templates/_macros.html:476 -#: project/templates/_macros.html:631 project/templates/event/create.html:96 -#: project/templates/event/update.html:96 +#: project/forms/event_suggestion.py:60 project/templates/_macros.html:491 +#: project/templates/_macros.html:646 project/templates/event/create.html:99 +#: project/templates/event/update.html:99 #: project/templates/organizer/create.html:17 #: project/templates/organizer/delete.html:13 #: project/templates/organizer/update.html:17 @@ -698,7 +698,7 @@ msgid "Enter new organizer" msgstr "" #: project/forms/event.py:281 project/templates/event/create.html:4 -#: project/templates/event/create.html:68 +#: project/templates/event/create.html:71 #: project/templates/manage/events.html:12 #: project/templates/manage/organizers.html:21 msgid "Create event" @@ -724,7 +724,7 @@ msgid "" "Organizers." msgstr "" -#: project/forms/event.py:336 project/templates/event/update.html:86 +#: project/forms/event.py:336 project/templates/event/update.html:89 #: project/templates/oauth2_token/list.html:21 msgid "Status" msgstr "" @@ -733,23 +733,23 @@ msgstr "" msgid "EventStatus.scheduled" msgstr "" -#: project/forms/event.py:340 project/templates/layout.html:98 -#: project/templates/layout.html:113 +#: project/forms/event.py:340 project/templates/layout.html:109 +#: project/templates/layout.html:124 msgid "EventStatus.cancelled" msgstr "" -#: project/forms/event.py:341 project/templates/layout.html:101 -#: project/templates/layout.html:116 +#: project/forms/event.py:341 project/templates/layout.html:112 +#: project/templates/layout.html:127 msgid "EventStatus.movedOnline" msgstr "" -#: project/forms/event.py:342 project/templates/layout.html:104 -#: project/templates/layout.html:119 +#: project/forms/event.py:342 project/templates/layout.html:115 +#: project/templates/layout.html:130 msgid "EventStatus.postponed" msgstr "" -#: project/forms/event.py:343 project/templates/layout.html:107 -#: project/templates/layout.html:122 +#: project/forms/event.py:343 project/templates/layout.html:118 +#: project/templates/layout.html:133 msgid "EventStatus.rescheduled" msgstr "" @@ -758,11 +758,11 @@ msgid "Select the status of the event." msgstr "" #: project/forms/event.py:348 project/templates/event/update.html:4 -#: project/templates/event/update.html:58 +#: project/templates/event/update.html:61 msgid "Update event" msgstr "" -#: project/forms/event.py:362 project/templates/_macros.html:1140 +#: project/forms/event.py:362 project/templates/_macros.html:1156 #: project/templates/event/actions.html:47 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -783,7 +783,7 @@ msgid "Keyword" msgstr "" #: project/forms/event.py:374 project/forms/event_date.py:19 -#: project/forms/planing.py:17 project/templates/_macros.html:362 +#: project/forms/planing.py:17 project/templates/_macros.html:377 msgid "Category" msgstr "" @@ -792,8 +792,8 @@ msgid "Find events" msgstr "" #: project/forms/event_date.py:22 project/forms/planing.py:20 -#: project/templates/_macros.html:113 project/templates/_macros.html:296 -#: project/templates/admin_unit/create.html:27 +#: project/templates/_macros.html:128 project/templates/_macros.html:311 +#: project/templates/admin_unit/create.html:68 #: project/templates/admin_unit/update.html:28 #: project/templates/event_place/create.html:30 #: project/templates/event_place/update.html:30 @@ -846,13 +846,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:126 +#: project/forms/event_suggestion.py:52 project/templates/event/create.html:129 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:100 +#: project/forms/event_suggestion.py:62 project/templates/event/create.html:103 msgid "" "Select the organizer. If the organizer is not yet on the list, just enter" " it." @@ -860,7 +860,7 @@ msgstr "" #: project/forms/event_suggestion.py:78 #: project/templates/widget/event_suggestion/create.html:4 -#: project/templates/widget/event_suggestion/create.html:123 +#: project/templates/widget/event_suggestion/create.html:125 msgid "Create event suggestion" msgstr "" @@ -926,8 +926,8 @@ msgid "Weekdays" msgstr "" #: project/forms/reference.py:11 project/forms/reference_request.py:15 -#: project/templates/_macros.html:497 project/templates/_macros.html:657 -#: project/templates/admin_unit/create.html:17 +#: project/templates/_macros.html:512 project/templates/_macros.html:672 +#: project/templates/admin_unit/create.html:58 #: project/templates/admin_unit/update.html:18 msgid "Organization" msgstr "" @@ -953,7 +953,7 @@ msgstr "" msgid "Delete request" msgstr "" -#: project/forms/reference_request.py:27 project/templates/_macros.html:1257 +#: project/forms/reference_request.py:27 project/templates/_macros.html:1283 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -999,206 +999,206 @@ msgstr "" msgid "Deny" msgstr "" -#: project/forms/widgets.py:149 +#: project/forms/widgets.py:147 msgid "This field is required." msgstr "" -#: project/templates/_macros.html:110 project/templates/_macros.html:385 -#: project/templates/_macros.html:392 project/templates/_macros.html:836 +#: project/templates/_macros.html:125 project/templates/_macros.html:400 +#: project/templates/_macros.html:407 project/templates/_macros.html:852 msgid "Date" msgstr "" -#: project/templates/_macros.html:112 +#: project/templates/_macros.html:127 msgid "Host" msgstr "" -#: project/templates/_macros.html:134 +#: project/templates/_macros.html:149 msgid "Show all events" msgstr "" -#: project/templates/_macros.html:150 +#: project/templates/_macros.html:165 msgid "Show on Google Maps" msgstr "" -#: project/templates/_macros.html:229 +#: project/templates/_macros.html:244 msgid "Link" msgstr "" -#: project/templates/_macros.html:339 +#: project/templates/_macros.html:354 #, python-format msgid "Created at %(created_at)s by %(created_by)s." msgstr "" -#: project/templates/_macros.html:341 +#: project/templates/_macros.html:356 #, python-format msgid "Created at %(created_at)s." msgstr "" -#: project/templates/_macros.html:346 +#: project/templates/_macros.html:361 #, python-format msgid "Last updated at %(updated_at)s by %(updated_by)s." msgstr "" -#: project/templates/_macros.html:348 +#: project/templates/_macros.html:363 #, python-format msgid "Last updated at %(updated_at)s." msgstr "" -#: project/templates/_macros.html:378 project/templates/_macros.html:554 +#: project/templates/_macros.html:393 project/templates/_macros.html:569 #: project/templates/event/actions.html:12 -#: project/templates/event/create.html:75 +#: project/templates/event/create.html:78 #: project/templates/event/delete.html:13 -#: project/templates/event/update.html:65 +#: project/templates/event/update.html:68 #: project/templates/reference/delete.html:13 -#: project/templates/widget/event_suggestion/create.html:195 +#: project/templates/widget/event_suggestion/create.html:197 msgid "Event" msgstr "" -#: project/templates/_macros.html:388 project/templates/_macros.html:540 +#: project/templates/_macros.html:403 project/templates/_macros.html:555 #, python-format msgid "%(count)d event dates" msgstr "" -#: project/templates/_macros.html:421 project/templates/_macros.html:576 -#: project/templates/_macros.html:1320 project/templates/event/actions.html:32 +#: project/templates/_macros.html:436 project/templates/_macros.html:591 +#: project/templates/_macros.html:1346 project/templates/event/actions.html:32 msgid "Share" msgstr "" -#: project/templates/_macros.html:425 project/templates/_macros.html:580 -#: project/templates/_macros.html:1350 +#: project/templates/_macros.html:440 project/templates/_macros.html:595 +#: project/templates/_macros.html:1376 msgid "Add to calendar" msgstr "" -#: project/templates/_macros.html:459 project/templates/_macros.html:613 +#: project/templates/_macros.html:474 project/templates/_macros.html:628 msgid "Show directions" msgstr "" -#: project/templates/_macros.html:464 project/templates/_macros.html:618 +#: project/templates/_macros.html:479 project/templates/_macros.html:633 msgid "The event takes place online." msgstr "" -#: project/templates/_macros.html:466 project/templates/_macros.html:620 +#: project/templates/_macros.html:481 project/templates/_macros.html:635 msgid "The event takes place both offline and online." msgstr "" -#: project/templates/_macros.html:681 project/templates/event_date/list.html:4 +#: project/templates/_macros.html:696 project/templates/event_date/list.html:4 #: project/templates/event_date/list.html:258 #: project/templates/event_date/search.html:3 #: project/templates/reference_request/review.html:30 msgid "Event Dates" msgstr "" -#: project/templates/_macros.html:753 +#: project/templates/_macros.html:769 msgid "Search location on Google" msgstr "" -#: project/templates/_macros.html:786 project/templates/_macros.html:788 +#: project/templates/_macros.html:802 project/templates/_macros.html:804 #: project/templates/event_date/list.html:279 -#: project/templates/widget/event_suggestion/create.html:159 -#: project/templates/widget/event_suggestion/create.html:184 -#: project/templates/widget/event_suggestion/create.html:206 -#: project/templates/widget/event_suggestion/create.html:229 -#: project/templates/widget/event_suggestion/create.html:262 -#: project/templates/widget/event_suggestion/create.html:291 +#: project/templates/widget/event_suggestion/create.html:161 +#: project/templates/widget/event_suggestion/create.html:186 +#: project/templates/widget/event_suggestion/create.html:208 +#: project/templates/widget/event_suggestion/create.html:231 +#: project/templates/widget/event_suggestion/create.html:264 +#: project/templates/widget/event_suggestion/create.html:293 msgid "Previous" msgstr "" -#: project/templates/_macros.html:790 +#: project/templates/_macros.html:806 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "" -#: project/templates/_macros.html:792 project/templates/_macros.html:794 +#: project/templates/_macros.html:808 project/templates/_macros.html:810 #: project/templates/event_date/list.html:281 -#: project/templates/widget/event_suggestion/create.html:160 -#: project/templates/widget/event_suggestion/create.html:185 -#: project/templates/widget/event_suggestion/create.html:207 -#: project/templates/widget/event_suggestion/create.html:230 -#: project/templates/widget/event_suggestion/create.html:263 +#: project/templates/widget/event_suggestion/create.html:162 +#: project/templates/widget/event_suggestion/create.html:187 +#: project/templates/widget/event_suggestion/create.html:209 +#: project/templates/widget/event_suggestion/create.html:232 +#: project/templates/widget/event_suggestion/create.html:265 msgid "Next" msgstr "" -#: project/templates/_macros.html:859 +#: project/templates/_macros.html:875 msgid "Radius" msgstr "" -#: project/templates/_macros.html:1069 +#: project/templates/_macros.html:1085 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1090 +#: project/templates/_macros.html:1106 msgid "Close" msgstr "" -#: project/templates/_macros.html:1091 +#: project/templates/_macros.html:1107 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1103 +#: project/templates/_macros.html:1119 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1139 project/templates/event/actions.html:46 +#: project/templates/_macros.html:1155 project/templates/event/actions.html:46 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1142 project/templates/manage/events.html:30 +#: project/templates/_macros.html:1158 project/templates/manage/events.html:30 msgid "More" msgstr "" -#: project/templates/_macros.html:1217 +#: project/templates/_macros.html:1243 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1329 +#: project/templates/_macros.html:1355 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1329 +#: project/templates/_macros.html:1355 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1358 +#: project/templates/_macros.html:1384 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1359 +#: project/templates/_macros.html:1385 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1360 +#: project/templates/_macros.html:1386 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1361 +#: project/templates/_macros.html:1387 msgid "Other calendar" msgstr "" -#: project/templates/home.html:27 project/templates/layout.html:192 +#: project/templates/home.html:27 project/templates/layout.html:203 msgid "Manage" msgstr "" #: project/templates/home.html:29 project/templates/security/login_user.html:23 -#: project/views/widget.py:175 +#: project/views/widget.py:179 msgid "Register for free" msgstr "" -#: project/templates/event_place/read.html:22 project/templates/layout.html:195 +#: project/templates/event_place/read.html:22 project/templates/layout.html:206 #: project/templates/layout_manage.html:24 #: project/templates/manage/events.html:5 #: project/templates/manage/events.html:9 msgid "Events" msgstr "" -#: project/templates/layout.html:196 +#: project/templates/layout.html:207 msgid "Planing" msgstr "" -#: project/templates/layout.html:197 +#: project/templates/layout.html:208 msgid "Example" msgstr "" -#: project/templates/layout.html:206 +#: project/templates/layout.html:217 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1208,15 +1208,15 @@ msgstr "" #: project/templates/admin/admin.html:3 project/templates/admin/admin.html:9 #: project/templates/admin/admin_units.html:10 -#: project/templates/admin/users.html:10 project/templates/layout.html:209 +#: project/templates/admin/users.html:10 project/templates/layout.html:220 msgid "Admin" msgstr "" -#: project/templates/layout.html:213 +#: project/templates/layout.html:224 msgid "Logout" msgstr "" -#: project/templates/developer/read.html:4 project/templates/layout.html:268 +#: project/templates/developer/read.html:4 project/templates/layout.html:279 #: project/templates/profile.html:29 msgid "Developer" msgstr "" @@ -1331,10 +1331,10 @@ msgstr "" msgid "Edit" msgstr "" -#: project/templates/admin_unit/create.html:47 +#: project/templates/admin_unit/create.html:88 #: project/templates/admin_unit/update.html:48 -#: project/templates/event/create.html:178 -#: project/templates/event/update.html:143 +#: project/templates/event/create.html:181 +#: project/templates/event/update.html:146 #: project/templates/event_place/create.html:47 #: project/templates/event_place/update.html:47 #: project/templates/organizer/create.html:46 @@ -1439,18 +1439,18 @@ msgstr "" msgid "List all events of %(admin_unit_name)s" msgstr "" -#: project/templates/event/create.html:85 -#: project/templates/event/update.html:75 +#: project/templates/event/create.html:88 +#: project/templates/event/update.html:78 msgid "Event date" msgstr "" -#: project/templates/event/create.html:151 -#: project/templates/event/update.html:116 +#: project/templates/event/create.html:154 +#: project/templates/event/update.html:119 msgid "Access" msgstr "" -#: project/templates/event/create.html:165 -#: project/templates/event/update.html:130 +#: project/templates/event/create.html:168 +#: project/templates/event/update.html:133 msgid "Target group" msgstr "" @@ -1642,15 +1642,15 @@ msgstr "" msgid "Print" msgstr "" -#: project/templates/widget/event_suggestion/create.html:141 +#: project/templates/widget/event_suggestion/create.html:143 msgid "Continue as guest" msgstr "" -#: project/templates/widget/event_suggestion/create.html:240 +#: project/templates/widget/event_suggestion/create.html:242 msgid "Optional details" msgstr "" -#: project/templates/widget/event_suggestion/create.html:273 +#: project/templates/widget/event_suggestion/create.html:275 msgid "Preview" msgstr "" @@ -1761,6 +1761,10 @@ msgstr "" msgid "Event review status updated" msgstr "" +#: project/views/js.py:20 +msgid "Short name is already taken" +msgstr "" + #: project/views/oauth2_client.py:37 msgid "OAuth2 client successfully created" msgstr "" @@ -1850,17 +1854,17 @@ msgstr "" msgid "You do not have permission for this action" msgstr "" -#: project/views/widget.py:167 +#: project/views/widget.py:171 msgid "Thank you so much! The event is being verified." msgstr "" -#: project/views/widget.py:171 +#: project/views/widget.py:175 msgid "" "For more options and your own calendar of events, you can register for " "free." msgstr "" -#: project/views/widget.py:234 +#: project/views/widget.py:238 msgid "New event review" msgstr "" diff --git a/project/__init__.py b/project/__init__.py index 957504e..0cf2ff2 100644 --- a/project/__init__.py +++ b/project/__init__.py @@ -10,6 +10,7 @@ from flask_migrate import Migrate from flask_qrcode import QRcode from flask_security import Security, SQLAlchemySessionUserDatastore from flask_sqlalchemy import SQLAlchemy +from flask_wtf.csrf import CSRFProtect from project.custom_session_interface import CustomSessionInterface @@ -85,6 +86,10 @@ babel = Babel(app) # cors cors = CORS(app, resources={r"/.well-known/*", r"/api/*", r"/oauth/*", "/swagger/"}) +# CRSF protection +csrf = CSRFProtect(app) +app.config["WTF_CSRF_CHECK_DEFAULT"] = False + # Mail mail_server = os.getenv("MAIL_SERVER") @@ -168,6 +173,7 @@ from project.views import ( event_place, event_suggestion, image, + js, manage, oauth, oauth2_client, diff --git a/project/forms/admin_unit.py b/project/forms/admin_unit.py index 1452ef8..be6af9b 100644 --- a/project/forms/admin_unit.py +++ b/project/forms/admin_unit.py @@ -2,10 +2,11 @@ from flask_babelex import lazy_gettext from flask_wtf import FlaskForm from wtforms import DecimalField, FormField, StringField, SubmitField from wtforms.fields.html5 import EmailField, TelField, URLField -from wtforms.validators import DataRequired, Optional, Regexp +from wtforms.validators import DataRequired, Length, Optional, Regexp from wtforms.widgets.html5 import ColorInput from project.forms.common import Base64ImageForm +from project.forms.widgets import HTML5StringField from project.models import Image, Location @@ -23,14 +24,17 @@ class AdminUnitLocationForm(FlaskForm): class BaseAdminUnitForm(FlaskForm): - name = StringField(lazy_gettext("Name"), validators=[DataRequired()]) - short_name = StringField( + name = HTML5StringField( + lazy_gettext("Name"), validators=[DataRequired(), Length(min=5, max=255)] + ) + short_name = HTML5StringField( lazy_gettext("Short name"), description=lazy_gettext( "The short name is used to create a unique identifier for your events" ), validators=[ DataRequired(), + Length(min=5, max=100), Regexp( r"^\w+$", message=lazy_gettext( diff --git a/project/templates/_macros.html b/project/templates/_macros.html index dbe64e4..e19d42d 100644 --- a/project/templates/_macros.html +++ b/project/templates/_macros.html @@ -752,6 +752,7 @@ $('#{{ prefix }}location-longitude').val(place.geometry.location.lng()); $('#location_search').val(''); + $('#location_search').trigger('place_changed'); }); } google.maps.event.addDomListener(window, 'load', initialize); @@ -765,7 +766,7 @@
- + @@ -1390,3 +1391,53 @@ $('#end-container').on('hidden', function() { {% endmacro %} + +{% macro render_admin_unit_form_script(admin_unit_id=None) %} + +{% endmacro %} diff --git a/project/templates/admin_unit/create.html b/project/templates/admin_unit/create.html index 2275bba..06030e4 100644 --- a/project/templates/admin_unit/create.html +++ b/project/templates/admin_unit/create.html @@ -1,15 +1,17 @@ {% extends "layout.html" %} -{% from "_macros.html" import render_cropper_logo_block, render_crop_image_form_section, render_google_place_autocomplete_header, render_google_place_autocomplete_field, render_field_with_errors, render_field %} +{% from "_macros.html" import render_admin_unit_form_script, render_jquery_steps_header, render_cropper_logo_block, render_crop_image_form_section, render_google_place_autocomplete_header, render_google_place_autocomplete_field, render_field_with_errors, render_field %} {% block header %} +{{ render_jquery_steps_header() }} {{ render_google_place_autocomplete_header(True) }} {{ render_cropper_logo_block() }} +{{ render_admin_unit_form_script() }} {% endblock %} {% block content %}

{{ _('Create organization') }}

-
+ {{ form.hidden_tag() }}
diff --git a/project/templates/admin_unit/update.html b/project/templates/admin_unit/update.html index ccf3c88..1303164 100644 --- a/project/templates/admin_unit/update.html +++ b/project/templates/admin_unit/update.html @@ -1,16 +1,18 @@ {% extends "layout_manage.html" %} {% set active_id = "settings" %} -{% from "_macros.html" import render_cropper_logo_block, render_crop_image_form_section, render_google_place_autocomplete_header, render_google_place_autocomplete_field, render_field_with_errors, render_field %} +{% from "_macros.html" import render_admin_unit_form_script, render_jquery_steps_header, render_cropper_logo_block, render_crop_image_form_section, render_google_place_autocomplete_header, render_google_place_autocomplete_field, render_field_with_errors, render_field %} {% block header %} +{{ render_jquery_steps_header() }} {{ render_google_place_autocomplete_header(True) }} {{ render_cropper_logo_block() }} +{{ render_admin_unit_form_script(admin_unit.id) }} {% endblock %} {% block content %}

{{ _('Settings') }}

- + {{ form.hidden_tag() }}
diff --git a/project/templates/layout.html b/project/templates/layout.html index 11bb897..db5a6a1 100644 --- a/project/templates/layout.html +++ b/project/templates/layout.html @@ -85,6 +85,17 @@ + {% block header_before_site_js %} {%- endblock -%} diff --git a/project/translations/de/LC_MESSAGES/messages.mo b/project/translations/de/LC_MESSAGES/messages.mo index 9878cbb402fb145b680dcea7070a977d0084f70b..6a09535ce9bf9ea4393daaf7c3e6e65f0b86c31f 100644 GIT binary patch delta 6485 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 delta 6434 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 diff --git a/project/translations/de/LC_MESSAGES/messages.po b/project/translations/de/LC_MESSAGES/messages.po index c97269e..29980a1 100644 --- a/project/translations/de/LC_MESSAGES/messages.po +++ b/project/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-07-22 22:41+0200\n" +"POT-Creation-Date: 2021-07-25 22:35+0200\n" "PO-Revision-Date: 2020-06-07 18:51+0200\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -166,24 +166,24 @@ msgstr "Event_" msgid "." msgstr "." -#: project/forms/admin.py:10 project/templates/layout.html:246 +#: project/forms/admin.py:10 project/templates/layout.html:257 #: project/views/root.py:42 msgid "Terms of service" msgstr "Nutzungsbedingungen" -#: project/forms/admin.py:11 project/templates/layout.html:250 +#: project/forms/admin.py:11 project/templates/layout.html:261 #: project/views/root.py:50 msgid "Legal notice" msgstr "Impressum" -#: project/forms/admin.py:12 project/templates/_macros.html:1245 -#: project/templates/layout.html:254 -#: project/templates/widget/event_suggestion/create.html:170 +#: project/forms/admin.py:12 project/templates/_macros.html:1271 +#: project/templates/layout.html:265 +#: project/templates/widget/event_suggestion/create.html:172 #: project/views/admin_unit.py:36 project/views/root.py:58 msgid "Contact" msgstr "Kontakt" -#: project/forms/admin.py:13 project/templates/layout.html:258 +#: project/forms/admin.py:13 project/templates/layout.html:269 #: project/views/root.py:66 msgid "Privacy" msgstr "Datenschutz" @@ -219,43 +219,43 @@ msgstr "" msgid "Update organization" msgstr "Organisation aktualisieren" -#: project/forms/admin_unit.py:13 project/forms/event.py:33 +#: project/forms/admin_unit.py:14 project/forms/event.py:33 #: project/forms/event_place.py:12 project/forms/organizer.py:12 msgid "Street" msgstr "Straße" -#: project/forms/admin_unit.py:14 project/forms/event.py:34 +#: project/forms/admin_unit.py:15 project/forms/event.py:34 #: project/forms/event_place.py:13 project/forms/organizer.py:13 msgid "Postal code" msgstr "Postleitzahl" -#: project/forms/admin_unit.py:15 project/forms/event.py:35 +#: project/forms/admin_unit.py:16 project/forms/event.py:35 #: project/forms/event_place.py:14 project/forms/organizer.py:14 msgid "City" msgstr "Stadt/Ort" -#: project/forms/admin_unit.py:16 project/forms/event_place.py:15 +#: project/forms/admin_unit.py:17 project/forms/event_place.py:15 #: project/forms/organizer.py:15 msgid "State" msgstr "Bundesland" -#: project/forms/admin_unit.py:18 project/forms/event_place.py:17 +#: project/forms/admin_unit.py:19 project/forms/event_place.py:17 #: project/forms/organizer.py:17 msgid "Latitude" msgstr "Breitengrad" -#: project/forms/admin_unit.py:21 project/forms/event_place.py:20 +#: project/forms/admin_unit.py:22 project/forms/event_place.py:20 #: project/forms/organizer.py:20 msgid "Longitude" msgstr "Längengrad" -#: project/forms/admin_unit.py:26 project/forms/event.py:40 +#: project/forms/admin_unit.py:28 project/forms/event.py:40 #: project/forms/event.py:69 project/forms/event.py:363 #: project/forms/event_place.py:25 project/forms/event_place.py:50 #: project/forms/event_suggestion.py:26 project/forms/oauth2_client.py:66 #: project/forms/organizer.py:25 project/forms/organizer.py:52 #: project/forms/reference.py:40 project/forms/reference_request.py:22 -#: project/templates/_macros.html:111 +#: project/templates/_macros.html:126 #: project/templates/admin/admin_units.html:19 #: project/templates/event_place/list.html:19 #: project/templates/oauth2_client/list.html:25 @@ -263,72 +263,72 @@ msgstr "Längengrad" msgid "Name" msgstr "Name" -#: project/forms/admin_unit.py:28 +#: project/forms/admin_unit.py:31 msgid "Short name" msgstr "Kurzname" -#: project/forms/admin_unit.py:29 +#: project/forms/admin_unit.py:32 msgid "The short name is used to create a unique identifier for your events" msgstr "" "Der Kurzname wird verwendet, um die Veranstaltungen der Organisation " "eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern " "und Unterstriche enthalten." -#: project/forms/admin_unit.py:36 +#: project/forms/admin_unit.py:40 project/templates/admin_unit/create.html:13 msgid "Short name must contain only letters numbers or underscore" msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten" -#: project/forms/admin_unit.py:42 project/forms/event.py:61 +#: project/forms/admin_unit.py:46 project/forms/event.py:61 #: project/forms/event.py:98 project/forms/event_place.py:26 #: project/forms/organizer.py:26 msgid "Link URL" msgstr "Link URL" -#: project/forms/admin_unit.py:43 project/forms/admin_unit_member.py:11 +#: project/forms/admin_unit.py:47 project/forms/admin_unit_member.py:11 #: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 #: project/forms/event.py:62 project/forms/event_suggestion.py:38 -#: project/forms/organizer.py:27 project/templates/_macros.html:238 -#: project/templates/_macros.html:1335 project/templates/admin/users.html:19 +#: project/forms/organizer.py:27 project/templates/_macros.html:253 +#: project/templates/_macros.html:1361 project/templates/admin/users.html:19 msgid "Email" msgstr "Email" -#: project/forms/admin_unit.py:44 project/forms/event.py:63 +#: project/forms/admin_unit.py:48 project/forms/event.py:63 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:28 -#: project/templates/_macros.html:281 +#: project/templates/_macros.html:296 msgid "Phone" msgstr "Telefon" -#: project/forms/admin_unit.py:45 project/forms/event.py:64 -#: project/forms/organizer.py:29 project/templates/_macros.html:289 +#: project/forms/admin_unit.py:49 project/forms/event.py:64 +#: project/forms/organizer.py:29 project/templates/_macros.html:304 msgid "Fax" msgstr "Fax" -#: project/forms/admin_unit.py:46 project/forms/organizer.py:30 +#: project/forms/admin_unit.py:50 project/forms/organizer.py:30 msgid "Logo" msgstr "Logo" -#: project/forms/admin_unit.py:59 project/templates/admin_unit/create.html:11 +#: project/forms/admin_unit.py:63 project/templates/admin_unit/create.html:52 #: project/templates/manage/admin_units.html:18 msgid "Create organization" msgstr "Organisation erstellen" -#: project/forms/admin_unit.py:63 project/forms/admin_unit.py:86 +#: project/forms/admin_unit.py:67 project/forms/admin_unit.py:90 msgid "Update settings" msgstr "Einstellungen speichern" -#: project/forms/admin_unit.py:67 +#: project/forms/admin_unit.py:71 msgid "Font" msgstr "Schriftart" -#: project/forms/admin_unit.py:69 +#: project/forms/admin_unit.py:73 msgid "Background Color" msgstr "Hintergrundfarbe" -#: project/forms/admin_unit.py:75 +#: project/forms/admin_unit.py:79 msgid "Primary Color" msgstr "Hauptfarbe" -#: project/forms/admin_unit.py:81 +#: project/forms/admin_unit.py:85 msgid "Link Color" msgstr "Linkfarbe" @@ -471,8 +471,8 @@ msgid "" " If the event takes place regularly, enter when the first date will end." msgstr "" "Gib an, wann die Veranstaltung endet. Eine Veranstaltung darf maximal 14 " -"Tage dauern. Wenn die Veranstaltung regelmäßig stattfindet, gib an, wann der" -" erste Termin endet." +"Tage dauern. Wenn die Veranstaltung regelmäßig stattfindet, gib an, wann " +"der erste Termin endet." #: project/forms/event.py:88 msgid "Recurrence rule" @@ -506,7 +506,7 @@ msgstr "Ticket Link" msgid "Enter a link where tickets can be purchased." msgstr "Gib einen Link ein, über den Tickets gekauft werden können." -#: project/forms/event.py:110 project/templates/_macros.html:220 +#: project/forms/event.py:110 project/templates/_macros.html:235 msgid "Tags" msgstr "Stichworte" @@ -559,8 +559,8 @@ msgstr "Anmeldung erforderlich" msgid "If the participants needs to register for the event." msgstr "Wenn sich die Teilnehmer für die Veranstaltung anmelden müssen." -#: project/forms/event.py:144 project/templates/_macros.html:252 -#: project/templates/layout.html:144 +#: project/forms/event.py:144 project/templates/_macros.html:267 +#: project/templates/layout.html:155 msgid "Booked up" msgstr "Ausgebucht" @@ -620,11 +620,11 @@ msgstr "Teilnahme" msgid "EventAttendanceMode.offline" msgstr "Präsenzveranstaltung" -#: project/forms/event.py:191 project/templates/layout.html:132 +#: project/forms/event.py:191 project/templates/layout.html:143 msgid "EventAttendanceMode.online" msgstr "Online" -#: project/forms/event.py:193 project/templates/layout.html:135 +#: project/forms/event.py:193 project/templates/layout.html:146 msgid "EventAttendanceMode.mixed" msgstr "Präsenzveranstaltung und online" @@ -633,7 +633,7 @@ msgid "Choose how people can attend the event." msgstr "Wähle aus, wie Personen an der Veranstaltung teilnehmen können." #: project/forms/event.py:199 project/forms/event_place.py:27 -#: project/templates/widget/event_suggestion/create.html:217 +#: project/templates/widget/event_suggestion/create.html:219 msgid "Photo" msgstr "Foto" @@ -645,16 +645,16 @@ msgstr "" "Wir empfehlen dir, ein Foto für die Veranstaltung hochzuladen. Es macht " "schon deutlich mehr her, aber es geht natürlich auch ohne." -#: project/forms/event.py:211 project/templates/_macros.html:1172 +#: project/forms/event.py:211 project/templates/_macros.html:1184 msgid "The start must be before the end." msgstr "Der Start muss vor dem Ende sein." -#: project/forms/event.py:217 project/templates/_macros.html:1189 +#: project/forms/event.py:217 project/templates/_macros.html:1201 msgid "An event can last a maximum of 14 days." msgstr "Eine Veranstaltung darf maximal 14 Tage dauern." -#: project/forms/event.py:225 project/templates/_macros.html:399 -#: project/templates/_macros.html:558 +#: project/forms/event.py:225 project/templates/_macros.html:414 +#: project/templates/_macros.html:573 msgid "Previous start date" msgstr "Vorheriges Startdatum" @@ -674,8 +674,8 @@ msgstr "Wähle Kategorien, die zur Veranstaltung passen." #: project/forms/event.py:238 project/forms/reference.py:14 #: project/forms/reference.py:27 project/forms/reference_request.py:70 -#: project/templates/event/create.html:190 -#: project/templates/event/update.html:155 +#: project/templates/event/create.html:193 +#: project/templates/event/update.html:158 msgid "Rating" msgstr "Bewertung" @@ -690,9 +690,9 @@ msgstr "" #: project/forms/event.py:250 project/forms/event.py:259 #: project/forms/event.py:319 project/forms/event_suggestion.py:50 -#: project/templates/_macros.html:438 project/templates/_macros.html:594 -#: project/templates/event/create.html:121 -#: project/templates/event/update.html:105 +#: project/templates/_macros.html:453 project/templates/_macros.html:609 +#: project/templates/event/create.html:124 +#: project/templates/event/update.html:108 #: project/templates/event_place/create.html:21 #: project/templates/event_place/delete.html:13 #: project/templates/event_place/update.html:21 @@ -709,9 +709,9 @@ msgstr "Neuen Ort eingeben" #: project/forms/event.py:266 project/forms/event.py:275 #: project/forms/event.py:327 project/forms/event.py:377 -#: project/forms/event_suggestion.py:60 project/templates/_macros.html:476 -#: project/templates/_macros.html:631 project/templates/event/create.html:96 -#: project/templates/event/update.html:96 +#: project/forms/event_suggestion.py:60 project/templates/_macros.html:491 +#: project/templates/_macros.html:646 project/templates/event/create.html:99 +#: project/templates/event/update.html:99 #: project/templates/organizer/create.html:17 #: project/templates/organizer/delete.html:13 #: project/templates/organizer/update.html:17 @@ -727,7 +727,7 @@ msgid "Enter new organizer" msgstr "Neuen Veranstalter eingeben" #: project/forms/event.py:281 project/templates/event/create.html:4 -#: project/templates/event/create.html:68 +#: project/templates/event/create.html:71 #: project/templates/manage/events.html:12 #: project/templates/manage/organizers.html:21 msgid "Create event" @@ -757,7 +757,7 @@ msgstr "" "Wähle den Veranstalter. Du kannst Veranstalter unter Verwaltung > " "Veranstalter hinzufügen und ändern." -#: project/forms/event.py:336 project/templates/event/update.html:86 +#: project/forms/event.py:336 project/templates/event/update.html:89 #: project/templates/oauth2_token/list.html:21 msgid "Status" msgstr "Status" @@ -766,23 +766,23 @@ msgstr "Status" msgid "EventStatus.scheduled" msgstr "Geplant" -#: project/forms/event.py:340 project/templates/layout.html:98 -#: project/templates/layout.html:113 +#: project/forms/event.py:340 project/templates/layout.html:109 +#: project/templates/layout.html:124 msgid "EventStatus.cancelled" msgstr "Abgesagt" -#: project/forms/event.py:341 project/templates/layout.html:101 -#: project/templates/layout.html:116 +#: project/forms/event.py:341 project/templates/layout.html:112 +#: project/templates/layout.html:127 msgid "EventStatus.movedOnline" msgstr "Online verschoben" -#: project/forms/event.py:342 project/templates/layout.html:104 -#: project/templates/layout.html:119 +#: project/forms/event.py:342 project/templates/layout.html:115 +#: project/templates/layout.html:130 msgid "EventStatus.postponed" msgstr "Verschoben" -#: project/forms/event.py:343 project/templates/layout.html:107 -#: project/templates/layout.html:122 +#: project/forms/event.py:343 project/templates/layout.html:118 +#: project/templates/layout.html:133 msgid "EventStatus.rescheduled" msgstr "Neu angesetzt" @@ -791,11 +791,11 @@ msgid "Select the status of the event." msgstr "Wähle den Status der Veranstaltung." #: project/forms/event.py:348 project/templates/event/update.html:4 -#: project/templates/event/update.html:58 +#: project/templates/event/update.html:61 msgid "Update event" msgstr "Veranstaltung aktualisieren" -#: project/forms/event.py:362 project/templates/_macros.html:1140 +#: project/forms/event.py:362 project/templates/_macros.html:1156 #: project/templates/event/actions.html:47 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -816,7 +816,7 @@ msgid "Keyword" msgstr "Stichwort" #: project/forms/event.py:374 project/forms/event_date.py:19 -#: project/forms/planing.py:17 project/templates/_macros.html:362 +#: project/forms/planing.py:17 project/templates/_macros.html:377 msgid "Category" msgstr "Kategorie" @@ -825,8 +825,8 @@ msgid "Find events" msgstr "Veranstaltungen finden" #: project/forms/event_date.py:22 project/forms/planing.py:20 -#: project/templates/_macros.html:113 project/templates/_macros.html:296 -#: project/templates/admin_unit/create.html:27 +#: project/templates/_macros.html:128 project/templates/_macros.html:311 +#: project/templates/admin_unit/create.html:68 #: project/templates/admin_unit/update.html:28 #: project/templates/event_place/create.html:30 #: project/templates/event_place/update.html:30 @@ -879,7 +879,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" msgstr "Ich möchte per Email benachrichtigt werden nach der Prüfung" -#: project/forms/event_suggestion.py:52 project/templates/event/create.html:126 +#: project/forms/event_suggestion.py:52 project/templates/event/create.html:129 msgid "" "Choose where the event takes place. If the venue is not yet in the list, " "just enter it." @@ -887,7 +887,7 @@ msgstr "" "Wähle aus, wo die Veranstaltung stattfindet. Ist der Veranstaltungsort " "noch nicht in der Liste, trage ihn einfach ein." -#: project/forms/event_suggestion.py:62 project/templates/event/create.html:100 +#: project/forms/event_suggestion.py:62 project/templates/event/create.html:103 msgid "" "Select the organizer. If the organizer is not yet on the list, just enter" " it." @@ -897,7 +897,7 @@ msgstr "" #: project/forms/event_suggestion.py:78 #: project/templates/widget/event_suggestion/create.html:4 -#: project/templates/widget/event_suggestion/create.html:123 +#: project/templates/widget/event_suggestion/create.html:125 msgid "Create event suggestion" msgstr "Veranstaltung vorschlagen" @@ -963,8 +963,8 @@ msgid "Weekdays" msgstr "Wochentage" #: project/forms/reference.py:11 project/forms/reference_request.py:15 -#: project/templates/_macros.html:497 project/templates/_macros.html:657 -#: project/templates/admin_unit/create.html:17 +#: project/templates/_macros.html:512 project/templates/_macros.html:672 +#: project/templates/admin_unit/create.html:58 #: project/templates/admin_unit/update.html:18 msgid "Organization" msgstr "Organisation" @@ -990,7 +990,7 @@ msgstr "Anfrage speichern" msgid "Delete request" msgstr "Anfrage löschen" -#: project/forms/reference_request.py:27 project/templates/_macros.html:1257 +#: project/forms/reference_request.py:27 project/templates/_macros.html:1283 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1036,208 +1036,208 @@ msgstr "Erlauben" msgid "Deny" msgstr "Ablehnen" -#: project/forms/widgets.py:149 +#: project/forms/widgets.py:147 msgid "This field is required." msgstr "Dieses Feld ist erforderlich." -#: project/templates/_macros.html:110 project/templates/_macros.html:385 -#: project/templates/_macros.html:392 project/templates/_macros.html:836 +#: project/templates/_macros.html:125 project/templates/_macros.html:400 +#: project/templates/_macros.html:407 project/templates/_macros.html:852 msgid "Date" msgstr "Datum" -#: project/templates/_macros.html:112 +#: project/templates/_macros.html:127 msgid "Host" msgstr "Veranstalter" -#: project/templates/_macros.html:134 +#: project/templates/_macros.html:149 msgid "Show all events" msgstr "Alle Veranstaltungen anzeigen" -#: project/templates/_macros.html:150 +#: project/templates/_macros.html:165 msgid "Show on Google Maps" msgstr "Auf Google Maps anzeigen" -#: project/templates/_macros.html:229 +#: project/templates/_macros.html:244 msgid "Link" msgstr "Link" -#: project/templates/_macros.html:339 +#: project/templates/_macros.html:354 #, python-format msgid "Created at %(created_at)s by %(created_by)s." msgstr "Erstellt am %(created_at)s von %(created_by)s." -#: project/templates/_macros.html:341 +#: project/templates/_macros.html:356 #, python-format msgid "Created at %(created_at)s." msgstr "Erstellt am %(created_at)s." -#: project/templates/_macros.html:346 +#: project/templates/_macros.html:361 #, python-format msgid "Last updated at %(updated_at)s by %(updated_by)s." msgstr "Zuletzt aktualisiert am %(updated_at)s von %(updated_by)s." -#: project/templates/_macros.html:348 +#: project/templates/_macros.html:363 #, python-format msgid "Last updated at %(updated_at)s." msgstr "Zuletzt aktualisiert am %(updated_at)s." -#: project/templates/_macros.html:378 project/templates/_macros.html:554 +#: project/templates/_macros.html:393 project/templates/_macros.html:569 #: project/templates/event/actions.html:12 -#: project/templates/event/create.html:75 +#: project/templates/event/create.html:78 #: project/templates/event/delete.html:13 -#: project/templates/event/update.html:65 +#: project/templates/event/update.html:68 #: project/templates/reference/delete.html:13 -#: project/templates/widget/event_suggestion/create.html:195 +#: project/templates/widget/event_suggestion/create.html:197 msgid "Event" msgstr "Veranstaltung" -#: project/templates/_macros.html:388 project/templates/_macros.html:540 +#: project/templates/_macros.html:403 project/templates/_macros.html:555 #, python-format msgid "%(count)d event dates" msgstr "%(count)d Termine" -#: project/templates/_macros.html:421 project/templates/_macros.html:576 -#: project/templates/_macros.html:1320 project/templates/event/actions.html:32 +#: project/templates/_macros.html:436 project/templates/_macros.html:591 +#: project/templates/_macros.html:1346 project/templates/event/actions.html:32 msgid "Share" msgstr "Teilen" -#: project/templates/_macros.html:425 project/templates/_macros.html:580 -#: project/templates/_macros.html:1350 +#: project/templates/_macros.html:440 project/templates/_macros.html:595 +#: project/templates/_macros.html:1376 msgid "Add to calendar" msgstr "Zum Kalender" -#: project/templates/_macros.html:459 project/templates/_macros.html:613 +#: project/templates/_macros.html:474 project/templates/_macros.html:628 msgid "Show directions" msgstr "Anreise planen" -#: project/templates/_macros.html:464 project/templates/_macros.html:618 +#: project/templates/_macros.html:479 project/templates/_macros.html:633 msgid "The event takes place online." msgstr "Die Veranstaltung findet online statt." -#: project/templates/_macros.html:466 project/templates/_macros.html:620 +#: project/templates/_macros.html:481 project/templates/_macros.html:635 msgid "The event takes place both offline and online." msgstr "" "Die Veranstaltung findet sowohl als Präsenzveranstaltung als auch online " "statt." -#: project/templates/_macros.html:681 project/templates/event_date/list.html:4 +#: project/templates/_macros.html:696 project/templates/event_date/list.html:4 #: project/templates/event_date/list.html:258 #: project/templates/event_date/search.html:3 #: project/templates/reference_request/review.html:30 msgid "Event Dates" msgstr "Termine" -#: project/templates/_macros.html:753 +#: project/templates/_macros.html:769 msgid "Search location on Google" msgstr "Ort bei Google suchen" -#: project/templates/_macros.html:786 project/templates/_macros.html:788 +#: project/templates/_macros.html:802 project/templates/_macros.html:804 #: project/templates/event_date/list.html:279 -#: project/templates/widget/event_suggestion/create.html:159 -#: project/templates/widget/event_suggestion/create.html:184 -#: project/templates/widget/event_suggestion/create.html:206 -#: project/templates/widget/event_suggestion/create.html:229 -#: project/templates/widget/event_suggestion/create.html:262 -#: project/templates/widget/event_suggestion/create.html:291 +#: project/templates/widget/event_suggestion/create.html:161 +#: project/templates/widget/event_suggestion/create.html:186 +#: project/templates/widget/event_suggestion/create.html:208 +#: project/templates/widget/event_suggestion/create.html:231 +#: project/templates/widget/event_suggestion/create.html:264 +#: project/templates/widget/event_suggestion/create.html:293 msgid "Previous" msgstr "Zurück" -#: project/templates/_macros.html:790 +#: project/templates/_macros.html:806 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "Seite %(page)d von %(pages)d (%(total)d insgesamt)" -#: project/templates/_macros.html:792 project/templates/_macros.html:794 +#: project/templates/_macros.html:808 project/templates/_macros.html:810 #: project/templates/event_date/list.html:281 -#: project/templates/widget/event_suggestion/create.html:160 -#: project/templates/widget/event_suggestion/create.html:185 -#: project/templates/widget/event_suggestion/create.html:207 -#: project/templates/widget/event_suggestion/create.html:230 -#: project/templates/widget/event_suggestion/create.html:263 +#: project/templates/widget/event_suggestion/create.html:162 +#: project/templates/widget/event_suggestion/create.html:187 +#: project/templates/widget/event_suggestion/create.html:209 +#: project/templates/widget/event_suggestion/create.html:232 +#: project/templates/widget/event_suggestion/create.html:265 msgid "Next" msgstr "Weiter" -#: project/templates/_macros.html:859 +#: project/templates/_macros.html:875 msgid "Radius" msgstr "Umkreis" -#: project/templates/_macros.html:1069 +#: project/templates/_macros.html:1085 msgid "Edit image" msgstr "Bild bearbeiten" -#: project/templates/_macros.html:1090 +#: project/templates/_macros.html:1106 msgid "Close" msgstr "Schließen" -#: project/templates/_macros.html:1091 +#: project/templates/_macros.html:1107 msgid "Okay" msgstr "OK" -#: project/templates/_macros.html:1103 +#: project/templates/_macros.html:1119 msgid "Choose image file" msgstr "Bild-Datei auswählen" -#: project/templates/_macros.html:1139 project/templates/event/actions.html:46 +#: project/templates/_macros.html:1155 project/templates/event/actions.html:46 msgid "Edit event" msgstr "Veranstaltung bearbeiten" -#: project/templates/_macros.html:1142 project/templates/manage/events.html:30 +#: project/templates/_macros.html:1158 project/templates/manage/events.html:30 msgid "More" msgstr "Mehr" -#: project/templates/_macros.html:1217 +#: project/templates/_macros.html:1243 msgid "Event suggestion" msgstr "Veranstaltungsvorschlag" -#: project/templates/_macros.html:1329 +#: project/templates/_macros.html:1355 msgid "Link copied" msgstr "Link kopiert" -#: project/templates/_macros.html:1329 +#: project/templates/_macros.html:1355 msgid "Copy link" msgstr "Link kopieren" -#: project/templates/_macros.html:1358 +#: project/templates/_macros.html:1384 msgid "Google calendar" msgstr "Google Kalender" -#: project/templates/_macros.html:1359 +#: project/templates/_macros.html:1385 msgid "Apple calendar" msgstr "Apple Kalender" -#: project/templates/_macros.html:1360 +#: project/templates/_macros.html:1386 msgid "Yahoo calendar" msgstr "Yahoo Kalender" -#: project/templates/_macros.html:1361 +#: project/templates/_macros.html:1387 msgid "Other calendar" msgstr "Anderer Kalender" -#: project/templates/home.html:27 project/templates/layout.html:192 +#: project/templates/home.html:27 project/templates/layout.html:203 msgid "Manage" msgstr "Verwaltung" #: project/templates/home.html:29 project/templates/security/login_user.html:23 -#: project/views/widget.py:175 +#: project/views/widget.py:179 msgid "Register for free" msgstr "Kostenlos registrieren" -#: project/templates/event_place/read.html:22 project/templates/layout.html:195 +#: project/templates/event_place/read.html:22 project/templates/layout.html:206 #: project/templates/layout_manage.html:24 #: project/templates/manage/events.html:5 #: project/templates/manage/events.html:9 msgid "Events" msgstr "Veranstaltungen" -#: project/templates/layout.html:196 +#: project/templates/layout.html:207 msgid "Planing" msgstr "Planung" -#: project/templates/layout.html:197 +#: project/templates/layout.html:208 msgid "Example" msgstr "Beispiel" -#: project/templates/layout.html:206 +#: project/templates/layout.html:217 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1247,15 +1247,15 @@ msgstr "Profil" #: project/templates/admin/admin.html:3 project/templates/admin/admin.html:9 #: project/templates/admin/admin_units.html:10 -#: project/templates/admin/users.html:10 project/templates/layout.html:209 +#: project/templates/admin/users.html:10 project/templates/layout.html:220 msgid "Admin" msgstr "Administration" -#: project/templates/layout.html:213 +#: project/templates/layout.html:224 msgid "Logout" msgstr "Ausloggen" -#: project/templates/developer/read.html:4 project/templates/layout.html:268 +#: project/templates/developer/read.html:4 project/templates/layout.html:279 #: project/templates/profile.html:29 msgid "Developer" msgstr "Entwickler" @@ -1370,10 +1370,10 @@ msgstr "Benutzer" msgid "Edit" msgstr "Bearbeiten" -#: project/templates/admin_unit/create.html:47 +#: project/templates/admin_unit/create.html:88 #: project/templates/admin_unit/update.html:48 -#: project/templates/event/create.html:178 -#: project/templates/event/update.html:143 +#: project/templates/event/create.html:181 +#: project/templates/event/update.html:146 #: project/templates/event_place/create.html:47 #: project/templates/event_place/update.html:47 #: project/templates/organizer/create.html:46 @@ -1480,18 +1480,18 @@ msgstr "Erstelle eine weitere Veranstaltung für %(admin_unit_name)s" msgid "List all events of %(admin_unit_name)s" msgstr "Zeige alle Veranstaltungen von %(admin_unit_name)s" -#: project/templates/event/create.html:85 -#: project/templates/event/update.html:75 +#: project/templates/event/create.html:88 +#: project/templates/event/update.html:78 msgid "Event date" msgstr "Termin" -#: project/templates/event/create.html:151 -#: project/templates/event/update.html:116 +#: project/templates/event/create.html:154 +#: project/templates/event/update.html:119 msgid "Access" msgstr "Zugang" -#: project/templates/event/create.html:165 -#: project/templates/event/update.html:130 +#: project/templates/event/create.html:168 +#: project/templates/event/update.html:133 msgid "Target group" msgstr "Zielgruppe" @@ -1683,15 +1683,15 @@ msgstr "Widget" msgid "Print" msgstr "Drucken" -#: project/templates/widget/event_suggestion/create.html:141 +#: project/templates/widget/event_suggestion/create.html:143 msgid "Continue as guest" msgstr "Weiter als Gast" -#: project/templates/widget/event_suggestion/create.html:240 +#: project/templates/widget/event_suggestion/create.html:242 msgid "Optional details" msgstr "Optionale Details" -#: project/templates/widget/event_suggestion/create.html:273 +#: project/templates/widget/event_suggestion/create.html:275 msgid "Preview" msgstr "Vorschau" @@ -1805,6 +1805,10 @@ msgstr "Veranstaltungsvorschlag erfolgreich abgelehnt" msgid "Event review status updated" msgstr "Prüfungsstatus aktualisiert" +#: project/views/js.py:20 +msgid "Short name is already taken" +msgstr "Der Kurzname ist bereits vergeben" + #: project/views/oauth2_client.py:37 msgid "OAuth2 client successfully created" msgstr "OAuth2 Client erfolgreich erstellt" @@ -1898,11 +1902,11 @@ msgstr "Anzeigen" msgid "You do not have permission for this action" msgstr "Du hast keine Berechtigung für diese Aktion" -#: project/views/widget.py:167 +#: project/views/widget.py:171 msgid "Thank you so much! The event is being verified." msgstr "Vielen Dank! Die Veranstaltung wird geprüft." -#: project/views/widget.py:171 +#: project/views/widget.py:175 msgid "" "For more options and your own calendar of events, you can register for " "free." @@ -1910,7 +1914,7 @@ msgstr "" "Für mehr Optionen und einen eigenen Veranstaltungskalender, kannst du " "dich kostenlos registrieren." -#: project/views/widget.py:234 +#: project/views/widget.py:238 msgid "New event review" msgstr "Neue Veranstaltung zu prüfen" diff --git a/project/translations/en/LC_MESSAGES/messages.mo b/project/translations/en/LC_MESSAGES/messages.mo index f8231757d575b60b78b26f21560a80c90b5a211a..b3c4e8f3158b2bf68cdc047d770746c4088b6c42 100644 GIT binary patch delta 20 ccmca8aZzH!QVw=g1tTLXW7ExRIF>R4085Dmp#T5? delta 20 ccmca8aZzH!QVw<_1tTLX6T{7GIF>R4083N`n*aa+ diff --git a/project/translations/en/LC_MESSAGES/messages.po b/project/translations/en/LC_MESSAGES/messages.po index 25e070d..fdeee4e 100644 --- a/project/translations/en/LC_MESSAGES/messages.po +++ b/project/translations/en/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-07-22 22:41+0200\n" +"POT-Creation-Date: 2021-07-25 22:35+0200\n" "PO-Revision-Date: 2021-04-30 15:04+0200\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -166,24 +166,24 @@ msgstr "" msgid "." msgstr "" -#: project/forms/admin.py:10 project/templates/layout.html:246 +#: project/forms/admin.py:10 project/templates/layout.html:257 #: project/views/root.py:42 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:250 +#: project/forms/admin.py:11 project/templates/layout.html:261 #: project/views/root.py:50 msgid "Legal notice" msgstr "" -#: project/forms/admin.py:12 project/templates/_macros.html:1245 -#: project/templates/layout.html:254 -#: project/templates/widget/event_suggestion/create.html:170 +#: project/forms/admin.py:12 project/templates/_macros.html:1271 +#: project/templates/layout.html:265 +#: project/templates/widget/event_suggestion/create.html:172 #: project/views/admin_unit.py:36 project/views/root.py:58 msgid "Contact" msgstr "" -#: project/forms/admin.py:13 project/templates/layout.html:258 +#: project/forms/admin.py:13 project/templates/layout.html:269 #: project/views/root.py:66 msgid "Privacy" msgstr "" @@ -217,43 +217,43 @@ msgstr "" msgid "Update organization" msgstr "" -#: project/forms/admin_unit.py:13 project/forms/event.py:33 +#: project/forms/admin_unit.py:14 project/forms/event.py:33 #: project/forms/event_place.py:12 project/forms/organizer.py:12 msgid "Street" msgstr "" -#: project/forms/admin_unit.py:14 project/forms/event.py:34 +#: project/forms/admin_unit.py:15 project/forms/event.py:34 #: project/forms/event_place.py:13 project/forms/organizer.py:13 msgid "Postal code" msgstr "" -#: project/forms/admin_unit.py:15 project/forms/event.py:35 +#: project/forms/admin_unit.py:16 project/forms/event.py:35 #: project/forms/event_place.py:14 project/forms/organizer.py:14 msgid "City" msgstr "" -#: project/forms/admin_unit.py:16 project/forms/event_place.py:15 +#: project/forms/admin_unit.py:17 project/forms/event_place.py:15 #: project/forms/organizer.py:15 msgid "State" msgstr "" -#: project/forms/admin_unit.py:18 project/forms/event_place.py:17 +#: project/forms/admin_unit.py:19 project/forms/event_place.py:17 #: project/forms/organizer.py:17 msgid "Latitude" msgstr "" -#: project/forms/admin_unit.py:21 project/forms/event_place.py:20 +#: project/forms/admin_unit.py:22 project/forms/event_place.py:20 #: project/forms/organizer.py:20 msgid "Longitude" msgstr "" -#: project/forms/admin_unit.py:26 project/forms/event.py:40 +#: project/forms/admin_unit.py:28 project/forms/event.py:40 #: project/forms/event.py:69 project/forms/event.py:363 #: project/forms/event_place.py:25 project/forms/event_place.py:50 #: project/forms/event_suggestion.py:26 project/forms/oauth2_client.py:66 #: project/forms/organizer.py:25 project/forms/organizer.py:52 #: project/forms/reference.py:40 project/forms/reference_request.py:22 -#: project/templates/_macros.html:111 +#: project/templates/_macros.html:126 #: project/templates/admin/admin_units.html:19 #: project/templates/event_place/list.html:19 #: project/templates/oauth2_client/list.html:25 @@ -261,69 +261,69 @@ msgstr "" msgid "Name" msgstr "" -#: project/forms/admin_unit.py:28 +#: project/forms/admin_unit.py:31 msgid "Short name" msgstr "" -#: project/forms/admin_unit.py:29 +#: project/forms/admin_unit.py:32 msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:36 +#: project/forms/admin_unit.py:40 project/templates/admin_unit/create.html:13 msgid "Short name must contain only letters numbers or underscore" msgstr "" -#: project/forms/admin_unit.py:42 project/forms/event.py:61 +#: project/forms/admin_unit.py:46 project/forms/event.py:61 #: project/forms/event.py:98 project/forms/event_place.py:26 #: project/forms/organizer.py:26 msgid "Link URL" msgstr "" -#: project/forms/admin_unit.py:43 project/forms/admin_unit_member.py:11 +#: project/forms/admin_unit.py:47 project/forms/admin_unit_member.py:11 #: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 #: project/forms/event.py:62 project/forms/event_suggestion.py:38 -#: project/forms/organizer.py:27 project/templates/_macros.html:238 -#: project/templates/_macros.html:1335 project/templates/admin/users.html:19 +#: project/forms/organizer.py:27 project/templates/_macros.html:253 +#: project/templates/_macros.html:1361 project/templates/admin/users.html:19 msgid "Email" msgstr "" -#: project/forms/admin_unit.py:44 project/forms/event.py:63 +#: project/forms/admin_unit.py:48 project/forms/event.py:63 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:28 -#: project/templates/_macros.html:281 +#: project/templates/_macros.html:296 msgid "Phone" msgstr "" -#: project/forms/admin_unit.py:45 project/forms/event.py:64 -#: project/forms/organizer.py:29 project/templates/_macros.html:289 +#: project/forms/admin_unit.py:49 project/forms/event.py:64 +#: project/forms/organizer.py:29 project/templates/_macros.html:304 msgid "Fax" msgstr "" -#: project/forms/admin_unit.py:46 project/forms/organizer.py:30 +#: project/forms/admin_unit.py:50 project/forms/organizer.py:30 msgid "Logo" msgstr "" -#: project/forms/admin_unit.py:59 project/templates/admin_unit/create.html:11 +#: project/forms/admin_unit.py:63 project/templates/admin_unit/create.html:52 #: project/templates/manage/admin_units.html:18 msgid "Create organization" msgstr "" -#: project/forms/admin_unit.py:63 project/forms/admin_unit.py:86 +#: project/forms/admin_unit.py:67 project/forms/admin_unit.py:90 msgid "Update settings" msgstr "" -#: project/forms/admin_unit.py:67 +#: project/forms/admin_unit.py:71 msgid "Font" msgstr "" -#: project/forms/admin_unit.py:69 +#: project/forms/admin_unit.py:73 msgid "Background Color" msgstr "" -#: project/forms/admin_unit.py:75 +#: project/forms/admin_unit.py:79 msgid "Primary Color" msgstr "" -#: project/forms/admin_unit.py:81 +#: project/forms/admin_unit.py:85 msgid "Link Color" msgstr "" @@ -491,7 +491,7 @@ msgstr "" msgid "Enter a link where tickets can be purchased." msgstr "" -#: project/forms/event.py:110 project/templates/_macros.html:220 +#: project/forms/event.py:110 project/templates/_macros.html:235 msgid "Tags" msgstr "" @@ -541,8 +541,8 @@ msgstr "" msgid "If the participants needs to register for the event." msgstr "" -#: project/forms/event.py:144 project/templates/_macros.html:252 -#: project/templates/layout.html:144 +#: project/forms/event.py:144 project/templates/_macros.html:267 +#: project/templates/layout.html:155 msgid "Booked up" msgstr "" @@ -598,11 +598,11 @@ msgstr "" msgid "EventAttendanceMode.offline" msgstr "Normal (Offline)" -#: project/forms/event.py:191 project/templates/layout.html:132 +#: project/forms/event.py:191 project/templates/layout.html:143 msgid "EventAttendanceMode.online" msgstr "Online" -#: project/forms/event.py:193 project/templates/layout.html:135 +#: project/forms/event.py:193 project/templates/layout.html:146 msgid "EventAttendanceMode.mixed" msgstr "Online and offline" @@ -611,7 +611,7 @@ msgid "Choose how people can attend the event." msgstr "" #: project/forms/event.py:199 project/forms/event_place.py:27 -#: project/templates/widget/event_suggestion/create.html:217 +#: project/templates/widget/event_suggestion/create.html:219 msgid "Photo" msgstr "" @@ -621,16 +621,16 @@ msgid "" " course it works without it." msgstr "" -#: project/forms/event.py:211 project/templates/_macros.html:1172 +#: project/forms/event.py:211 project/templates/_macros.html:1184 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:217 project/templates/_macros.html:1189 +#: project/forms/event.py:217 project/templates/_macros.html:1201 msgid "An event can last a maximum of 14 days." msgstr "" -#: project/forms/event.py:225 project/templates/_macros.html:399 -#: project/templates/_macros.html:558 +#: project/forms/event.py:225 project/templates/_macros.html:414 +#: project/templates/_macros.html:573 msgid "Previous start date" msgstr "" @@ -648,8 +648,8 @@ msgstr "" #: project/forms/event.py:238 project/forms/reference.py:14 #: project/forms/reference.py:27 project/forms/reference_request.py:70 -#: project/templates/event/create.html:190 -#: project/templates/event/update.html:155 +#: project/templates/event/create.html:193 +#: project/templates/event/update.html:158 msgid "Rating" msgstr "" @@ -662,9 +662,9 @@ msgstr "" #: project/forms/event.py:250 project/forms/event.py:259 #: project/forms/event.py:319 project/forms/event_suggestion.py:50 -#: project/templates/_macros.html:438 project/templates/_macros.html:594 -#: project/templates/event/create.html:121 -#: project/templates/event/update.html:105 +#: project/templates/_macros.html:453 project/templates/_macros.html:609 +#: project/templates/event/create.html:124 +#: project/templates/event/update.html:108 #: project/templates/event_place/create.html:21 #: project/templates/event_place/delete.html:13 #: project/templates/event_place/update.html:21 @@ -681,9 +681,9 @@ msgstr "" #: project/forms/event.py:266 project/forms/event.py:275 #: project/forms/event.py:327 project/forms/event.py:377 -#: project/forms/event_suggestion.py:60 project/templates/_macros.html:476 -#: project/templates/_macros.html:631 project/templates/event/create.html:96 -#: project/templates/event/update.html:96 +#: project/forms/event_suggestion.py:60 project/templates/_macros.html:491 +#: project/templates/_macros.html:646 project/templates/event/create.html:99 +#: project/templates/event/update.html:99 #: project/templates/organizer/create.html:17 #: project/templates/organizer/delete.html:13 #: project/templates/organizer/update.html:17 @@ -699,7 +699,7 @@ msgid "Enter new organizer" msgstr "" #: project/forms/event.py:281 project/templates/event/create.html:4 -#: project/templates/event/create.html:68 +#: project/templates/event/create.html:71 #: project/templates/manage/events.html:12 #: project/templates/manage/organizers.html:21 msgid "Create event" @@ -725,7 +725,7 @@ msgid "" "Organizers." msgstr "" -#: project/forms/event.py:336 project/templates/event/update.html:86 +#: project/forms/event.py:336 project/templates/event/update.html:89 #: project/templates/oauth2_token/list.html:21 msgid "Status" msgstr "" @@ -734,23 +734,23 @@ msgstr "" msgid "EventStatus.scheduled" msgstr "Scheduled" -#: project/forms/event.py:340 project/templates/layout.html:98 -#: project/templates/layout.html:113 +#: project/forms/event.py:340 project/templates/layout.html:109 +#: project/templates/layout.html:124 msgid "EventStatus.cancelled" msgstr "Cancelled" -#: project/forms/event.py:341 project/templates/layout.html:101 -#: project/templates/layout.html:116 +#: project/forms/event.py:341 project/templates/layout.html:112 +#: project/templates/layout.html:127 msgid "EventStatus.movedOnline" msgstr "Moved online" -#: project/forms/event.py:342 project/templates/layout.html:104 -#: project/templates/layout.html:119 +#: project/forms/event.py:342 project/templates/layout.html:115 +#: project/templates/layout.html:130 msgid "EventStatus.postponed" msgstr "Postponed" -#: project/forms/event.py:343 project/templates/layout.html:107 -#: project/templates/layout.html:122 +#: project/forms/event.py:343 project/templates/layout.html:118 +#: project/templates/layout.html:133 msgid "EventStatus.rescheduled" msgstr "Rescheduled" @@ -759,11 +759,11 @@ msgid "Select the status of the event." msgstr "" #: project/forms/event.py:348 project/templates/event/update.html:4 -#: project/templates/event/update.html:58 +#: project/templates/event/update.html:61 msgid "Update event" msgstr "" -#: project/forms/event.py:362 project/templates/_macros.html:1140 +#: project/forms/event.py:362 project/templates/_macros.html:1156 #: project/templates/event/actions.html:47 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -784,7 +784,7 @@ msgid "Keyword" msgstr "" #: project/forms/event.py:374 project/forms/event_date.py:19 -#: project/forms/planing.py:17 project/templates/_macros.html:362 +#: project/forms/planing.py:17 project/templates/_macros.html:377 msgid "Category" msgstr "" @@ -793,8 +793,8 @@ msgid "Find events" msgstr "" #: project/forms/event_date.py:22 project/forms/planing.py:20 -#: project/templates/_macros.html:113 project/templates/_macros.html:296 -#: project/templates/admin_unit/create.html:27 +#: project/templates/_macros.html:128 project/templates/_macros.html:311 +#: project/templates/admin_unit/create.html:68 #: project/templates/admin_unit/update.html:28 #: project/templates/event_place/create.html:30 #: project/templates/event_place/update.html:30 @@ -847,13 +847,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:126 +#: project/forms/event_suggestion.py:52 project/templates/event/create.html:129 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:100 +#: project/forms/event_suggestion.py:62 project/templates/event/create.html:103 msgid "" "Select the organizer. If the organizer is not yet on the list, just enter" " it." @@ -861,7 +861,7 @@ msgstr "" #: project/forms/event_suggestion.py:78 #: project/templates/widget/event_suggestion/create.html:4 -#: project/templates/widget/event_suggestion/create.html:123 +#: project/templates/widget/event_suggestion/create.html:125 msgid "Create event suggestion" msgstr "" @@ -927,8 +927,8 @@ msgid "Weekdays" msgstr "" #: project/forms/reference.py:11 project/forms/reference_request.py:15 -#: project/templates/_macros.html:497 project/templates/_macros.html:657 -#: project/templates/admin_unit/create.html:17 +#: project/templates/_macros.html:512 project/templates/_macros.html:672 +#: project/templates/admin_unit/create.html:58 #: project/templates/admin_unit/update.html:18 msgid "Organization" msgstr "" @@ -954,7 +954,7 @@ msgstr "" msgid "Delete request" msgstr "" -#: project/forms/reference_request.py:27 project/templates/_macros.html:1257 +#: project/forms/reference_request.py:27 project/templates/_macros.html:1283 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1000,206 +1000,206 @@ msgstr "" msgid "Deny" msgstr "" -#: project/forms/widgets.py:149 +#: project/forms/widgets.py:147 msgid "This field is required." msgstr "" -#: project/templates/_macros.html:110 project/templates/_macros.html:385 -#: project/templates/_macros.html:392 project/templates/_macros.html:836 +#: project/templates/_macros.html:125 project/templates/_macros.html:400 +#: project/templates/_macros.html:407 project/templates/_macros.html:852 msgid "Date" msgstr "" -#: project/templates/_macros.html:112 +#: project/templates/_macros.html:127 msgid "Host" msgstr "" -#: project/templates/_macros.html:134 +#: project/templates/_macros.html:149 msgid "Show all events" msgstr "" -#: project/templates/_macros.html:150 +#: project/templates/_macros.html:165 msgid "Show on Google Maps" msgstr "" -#: project/templates/_macros.html:229 +#: project/templates/_macros.html:244 msgid "Link" msgstr "" -#: project/templates/_macros.html:339 +#: project/templates/_macros.html:354 #, python-format msgid "Created at %(created_at)s by %(created_by)s." msgstr "" -#: project/templates/_macros.html:341 +#: project/templates/_macros.html:356 #, python-format msgid "Created at %(created_at)s." msgstr "" -#: project/templates/_macros.html:346 +#: project/templates/_macros.html:361 #, python-format msgid "Last updated at %(updated_at)s by %(updated_by)s." msgstr "" -#: project/templates/_macros.html:348 +#: project/templates/_macros.html:363 #, python-format msgid "Last updated at %(updated_at)s." msgstr "" -#: project/templates/_macros.html:378 project/templates/_macros.html:554 +#: project/templates/_macros.html:393 project/templates/_macros.html:569 #: project/templates/event/actions.html:12 -#: project/templates/event/create.html:75 +#: project/templates/event/create.html:78 #: project/templates/event/delete.html:13 -#: project/templates/event/update.html:65 +#: project/templates/event/update.html:68 #: project/templates/reference/delete.html:13 -#: project/templates/widget/event_suggestion/create.html:195 +#: project/templates/widget/event_suggestion/create.html:197 msgid "Event" msgstr "" -#: project/templates/_macros.html:388 project/templates/_macros.html:540 +#: project/templates/_macros.html:403 project/templates/_macros.html:555 #, python-format msgid "%(count)d event dates" msgstr "" -#: project/templates/_macros.html:421 project/templates/_macros.html:576 -#: project/templates/_macros.html:1320 project/templates/event/actions.html:32 +#: project/templates/_macros.html:436 project/templates/_macros.html:591 +#: project/templates/_macros.html:1346 project/templates/event/actions.html:32 msgid "Share" msgstr "" -#: project/templates/_macros.html:425 project/templates/_macros.html:580 -#: project/templates/_macros.html:1350 +#: project/templates/_macros.html:440 project/templates/_macros.html:595 +#: project/templates/_macros.html:1376 msgid "Add to calendar" msgstr "" -#: project/templates/_macros.html:459 project/templates/_macros.html:613 +#: project/templates/_macros.html:474 project/templates/_macros.html:628 msgid "Show directions" msgstr "" -#: project/templates/_macros.html:464 project/templates/_macros.html:618 +#: project/templates/_macros.html:479 project/templates/_macros.html:633 msgid "The event takes place online." msgstr "" -#: project/templates/_macros.html:466 project/templates/_macros.html:620 +#: project/templates/_macros.html:481 project/templates/_macros.html:635 msgid "The event takes place both offline and online." msgstr "" -#: project/templates/_macros.html:681 project/templates/event_date/list.html:4 +#: project/templates/_macros.html:696 project/templates/event_date/list.html:4 #: project/templates/event_date/list.html:258 #: project/templates/event_date/search.html:3 #: project/templates/reference_request/review.html:30 msgid "Event Dates" msgstr "" -#: project/templates/_macros.html:753 +#: project/templates/_macros.html:769 msgid "Search location on Google" msgstr "" -#: project/templates/_macros.html:786 project/templates/_macros.html:788 +#: project/templates/_macros.html:802 project/templates/_macros.html:804 #: project/templates/event_date/list.html:279 -#: project/templates/widget/event_suggestion/create.html:159 -#: project/templates/widget/event_suggestion/create.html:184 -#: project/templates/widget/event_suggestion/create.html:206 -#: project/templates/widget/event_suggestion/create.html:229 -#: project/templates/widget/event_suggestion/create.html:262 -#: project/templates/widget/event_suggestion/create.html:291 +#: project/templates/widget/event_suggestion/create.html:161 +#: project/templates/widget/event_suggestion/create.html:186 +#: project/templates/widget/event_suggestion/create.html:208 +#: project/templates/widget/event_suggestion/create.html:231 +#: project/templates/widget/event_suggestion/create.html:264 +#: project/templates/widget/event_suggestion/create.html:293 msgid "Previous" msgstr "" -#: project/templates/_macros.html:790 +#: project/templates/_macros.html:806 #, python-format msgid "Page %(page)d of %(pages)d (%(total)d total)" msgstr "" -#: project/templates/_macros.html:792 project/templates/_macros.html:794 +#: project/templates/_macros.html:808 project/templates/_macros.html:810 #: project/templates/event_date/list.html:281 -#: project/templates/widget/event_suggestion/create.html:160 -#: project/templates/widget/event_suggestion/create.html:185 -#: project/templates/widget/event_suggestion/create.html:207 -#: project/templates/widget/event_suggestion/create.html:230 -#: project/templates/widget/event_suggestion/create.html:263 +#: project/templates/widget/event_suggestion/create.html:162 +#: project/templates/widget/event_suggestion/create.html:187 +#: project/templates/widget/event_suggestion/create.html:209 +#: project/templates/widget/event_suggestion/create.html:232 +#: project/templates/widget/event_suggestion/create.html:265 msgid "Next" msgstr "" -#: project/templates/_macros.html:859 +#: project/templates/_macros.html:875 msgid "Radius" msgstr "" -#: project/templates/_macros.html:1069 +#: project/templates/_macros.html:1085 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1090 +#: project/templates/_macros.html:1106 msgid "Close" msgstr "" -#: project/templates/_macros.html:1091 +#: project/templates/_macros.html:1107 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1103 +#: project/templates/_macros.html:1119 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1139 project/templates/event/actions.html:46 +#: project/templates/_macros.html:1155 project/templates/event/actions.html:46 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1142 project/templates/manage/events.html:30 +#: project/templates/_macros.html:1158 project/templates/manage/events.html:30 msgid "More" msgstr "" -#: project/templates/_macros.html:1217 +#: project/templates/_macros.html:1243 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1329 +#: project/templates/_macros.html:1355 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1329 +#: project/templates/_macros.html:1355 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1358 +#: project/templates/_macros.html:1384 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1359 +#: project/templates/_macros.html:1385 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1360 +#: project/templates/_macros.html:1386 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1361 +#: project/templates/_macros.html:1387 msgid "Other calendar" msgstr "" -#: project/templates/home.html:27 project/templates/layout.html:192 +#: project/templates/home.html:27 project/templates/layout.html:203 msgid "Manage" msgstr "" #: project/templates/home.html:29 project/templates/security/login_user.html:23 -#: project/views/widget.py:175 +#: project/views/widget.py:179 msgid "Register for free" msgstr "" -#: project/templates/event_place/read.html:22 project/templates/layout.html:195 +#: project/templates/event_place/read.html:22 project/templates/layout.html:206 #: project/templates/layout_manage.html:24 #: project/templates/manage/events.html:5 #: project/templates/manage/events.html:9 msgid "Events" msgstr "" -#: project/templates/layout.html:196 +#: project/templates/layout.html:207 msgid "Planing" msgstr "" -#: project/templates/layout.html:197 +#: project/templates/layout.html:208 msgid "Example" msgstr "" -#: project/templates/layout.html:206 +#: project/templates/layout.html:217 #: project/templates/oauth2_client/list.html:10 #: project/templates/oauth2_client/read.html:10 #: project/templates/oauth2_token/list.html:10 project/templates/profile.html:4 @@ -1209,15 +1209,15 @@ msgstr "" #: project/templates/admin/admin.html:3 project/templates/admin/admin.html:9 #: project/templates/admin/admin_units.html:10 -#: project/templates/admin/users.html:10 project/templates/layout.html:209 +#: project/templates/admin/users.html:10 project/templates/layout.html:220 msgid "Admin" msgstr "" -#: project/templates/layout.html:213 +#: project/templates/layout.html:224 msgid "Logout" msgstr "" -#: project/templates/developer/read.html:4 project/templates/layout.html:268 +#: project/templates/developer/read.html:4 project/templates/layout.html:279 #: project/templates/profile.html:29 msgid "Developer" msgstr "" @@ -1332,10 +1332,10 @@ msgstr "" msgid "Edit" msgstr "" -#: project/templates/admin_unit/create.html:47 +#: project/templates/admin_unit/create.html:88 #: project/templates/admin_unit/update.html:48 -#: project/templates/event/create.html:178 -#: project/templates/event/update.html:143 +#: project/templates/event/create.html:181 +#: project/templates/event/update.html:146 #: project/templates/event_place/create.html:47 #: project/templates/event_place/update.html:47 #: project/templates/organizer/create.html:46 @@ -1440,18 +1440,18 @@ msgstr "" msgid "List all events of %(admin_unit_name)s" msgstr "" -#: project/templates/event/create.html:85 -#: project/templates/event/update.html:75 +#: project/templates/event/create.html:88 +#: project/templates/event/update.html:78 msgid "Event date" msgstr "" -#: project/templates/event/create.html:151 -#: project/templates/event/update.html:116 +#: project/templates/event/create.html:154 +#: project/templates/event/update.html:119 msgid "Access" msgstr "" -#: project/templates/event/create.html:165 -#: project/templates/event/update.html:130 +#: project/templates/event/create.html:168 +#: project/templates/event/update.html:133 msgid "Target group" msgstr "" @@ -1643,15 +1643,15 @@ msgstr "" msgid "Print" msgstr "" -#: project/templates/widget/event_suggestion/create.html:141 +#: project/templates/widget/event_suggestion/create.html:143 msgid "Continue as guest" msgstr "" -#: project/templates/widget/event_suggestion/create.html:240 +#: project/templates/widget/event_suggestion/create.html:242 msgid "Optional details" msgstr "" -#: project/templates/widget/event_suggestion/create.html:273 +#: project/templates/widget/event_suggestion/create.html:275 msgid "Preview" msgstr "" @@ -1762,6 +1762,10 @@ msgstr "" msgid "Event review status updated" msgstr "" +#: project/views/js.py:20 +msgid "Short name is already taken" +msgstr "" + #: project/views/oauth2_client.py:37 msgid "OAuth2 client successfully created" msgstr "" @@ -1851,17 +1855,17 @@ msgstr "" msgid "You do not have permission for this action" msgstr "" -#: project/views/widget.py:167 +#: project/views/widget.py:171 msgid "Thank you so much! The event is being verified." msgstr "" -#: project/views/widget.py:171 +#: project/views/widget.py:175 msgid "" "For more options and your own calendar of events, you can register for " "free." msgstr "" -#: project/views/widget.py:234 +#: project/views/widget.py:238 msgid "New event review" msgstr "" diff --git a/project/views/js.py b/project/views/js.py new file mode 100644 index 0000000..ccda309 --- /dev/null +++ b/project/views/js.py @@ -0,0 +1,24 @@ +import json + +from flask import request +from flask_babelex import gettext + +from project import app, csrf +from project.models import AdminUnit + + +@app.route("/js/check/organization/short_name", methods=["POST"]) +def js_check_org_short_name(): + csrf.protect() + + short_name = request.form["short_name"] + admin_unit_id = ( + int(request.form["admin_unit_id"]) if "admin_unit_id" in request.form else -1 + ) + organization = AdminUnit.query.filter(AdminUnit.short_name == short_name).first() + + if not organization or organization.id == admin_unit_id: + return json.dumps(True) + + error = gettext("Short name is already taken") + return json.dumps(error) diff --git a/tests/utils.py b/tests/utils.py index ea48b53..ebedecf 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -14,6 +14,7 @@ class UtilActions(object): self._refresh_token = None self._client_id = None self._client_secret = None + self._ajax_csrf = None def get_access_token(self): return self._access_token @@ -82,6 +83,15 @@ class UtilActions(object): re.search(pattern.encode("utf-8"), response.data).group(1).decode("utf-8") ) + def get_ajax_csrf(self, response): + pattern = 'var csrf_token = "(.*)";' + match = re.search(pattern.encode("utf-8"), response.data) + + if not match: + return None + + return match.group(1).decode("utf-8") + def create_form_data(self, response, values: dict) -> dict: from tests.form import Form @@ -102,6 +112,9 @@ class UtilActions(object): if self._access_token: headers["Authorization"] = f"Bearer {self._access_token}" + if self._ajax_csrf: + headers["X-CSRFToken"] = self._ajax_csrf + return headers def log_request(self, url): @@ -187,7 +200,12 @@ class UtilActions(object): return url def get(self, url): - return self._client.get(url) + response = self._client.get(url) + + if response.status_code == 200: + self._ajax_csrf = self.get_ajax_csrf(response) + + return response def get_ok(self, url): response = self.get(url) diff --git a/tests/views/test_js.py b/tests/views/test_js.py new file mode 100644 index 0000000..a0c6e96 --- /dev/null +++ b/tests/views/test_js.py @@ -0,0 +1,37 @@ +def test_js_check_org_short_name(client, seeder, utils): + seeder.create_user(admin=True) + utils.login() + + url = utils.get_url("admin_unit_create") + response = utils.get(url) + + with client: + url = utils.get_url("js_check_org_short_name") + response = utils.post_form_data( + url, + { + "short_name": "meinecrew", + }, + ) + utils.assert_response_ok(response) + assert response.data == b"true" + + +def test_js_check_org_short_name_exists(client, seeder, utils): + seeder.create_user(admin=True) + user_id = utils.login() + seeder.create_admin_unit(user_id, "Meine Crew") + + url = utils.get_url("admin_unit_create") + response = utils.get(url) + + with client: + url = utils.get_url("js_check_org_short_name") + response = utils.post_form_data( + url, + { + "short_name": "meinecrew", + }, + ) + utils.assert_response_ok(response) + assert response.data == b'"Der Kurzname ist bereits vergeben"'