#7 New forms WIP

* adds saving functionality for new intervention form
* refactors new identifier generating, so a pre-generated identifier from a new element form will be checked again before saving
* adds css fixes for disturbing input field:focus bugs
* adds missing csrf token to new collapsible form
* adds/updates translations
* introduces mark_as_deleted as only marking instead of using delete() which will really delete from the db
This commit is contained in:
mipel
2021-09-23 15:05:17 +02:00
parent c43a5c243e
commit cb19c0f85d
11 changed files with 375 additions and 182 deletions

View File

@@ -7,16 +7,17 @@
#: compensation/forms.py:67 compensation/forms.py:264 compensation/forms.py:345
#: intervention/filters.py:26 intervention/filters.py:40
#: intervention/filters.py:47 intervention/filters.py:48
#: intervention/forms.py:352 intervention/forms.py:364
#: intervention/forms.py:377 konova/forms.py:139 konova/forms.py:282
#: konova/forms.py:317 konova/forms.py:322 konova/forms.py:334
#: konova/forms.py:346 konova/forms.py:366 user/forms.py:38
#: intervention/forms.py:56 intervention/forms.py:151 intervention/forms.py:162
#: intervention/forms.py:422 intervention/forms.py:434
#: intervention/forms.py:447 konova/forms.py:140 konova/forms.py:250
#: konova/forms.py:296 konova/forms.py:331 konova/forms.py:336
#: konova/forms.py:348 konova/forms.py:360 konova/forms.py:380 user/forms.py:38
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-21 14:24+0200\n"
"POT-Creation-Date: 2021-09-23 12:46+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -53,16 +54,16 @@ msgstr "Zahlung wird an diesem Datum erwartet"
#: ema/templates/ema/detail/includes/actions.html:34
#: ema/templates/ema/detail/includes/deadlines.html:34
#: ema/templates/ema/detail/includes/documents.html:31
#: intervention/forms.py:376
#: intervention/forms.py:446
#: intervention/templates/intervention/detail/includes/documents.html:31
#: intervention/templates/intervention/detail/includes/payments.html:34
#: intervention/templates/intervention/detail/includes/revocation.html:38
#: konova/forms.py:345
#: konova/forms.py:359
msgid "Comment"
msgstr "Kommentar"
#: compensation/forms.py:68 compensation/forms.py:265 compensation/forms.py:346
#: intervention/forms.py:378 konova/forms.py:347
#: intervention/forms.py:448 konova/forms.py:361
msgid "Additional comment, maximum {} letters"
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
@@ -97,11 +98,11 @@ msgstr "Biotoptyp wählen"
#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:36
#: ema/templates/ema/detail/includes/states-after.html:36
#: ema/templates/ema/detail/includes/states-before.html:36
#: intervention/forms.py:517
#: intervention/forms.py:587
msgid "Surface"
msgstr "Fläche"
#: compensation/forms.py:155 intervention/forms.py:519
#: compensation/forms.py:155 intervention/forms.py:589
msgid "in m²"
msgstr ""
@@ -117,7 +118,7 @@ msgstr "Geben Sie die Daten des neuen Zustandes ein"
msgid "Added state"
msgstr "Zustand hinzugefügt"
#: compensation/forms.py:185 konova/forms.py:198
#: compensation/forms.py:185 konova/forms.py:199
msgid "Object removed"
msgstr "Objekt entfernt"
@@ -133,7 +134,7 @@ msgstr "Fristart wählen"
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31
#: ema/templates/ema/detail/includes/deadlines.html:31
#: intervention/forms.py:351
#: intervention/forms.py:421
msgid "Date"
msgstr "Datum"
@@ -257,7 +258,7 @@ msgstr ""
"wollen. Kontaktieren Sie die für die Abbuchungen verantwortlichen Nutzer!"
#: compensation/tables.py:24 compensation/tables.py:164 ema/tables.py:28
#: intervention/forms.py:33 intervention/tables.py:23
#: intervention/forms.py:37 intervention/tables.py:23
#: intervention/templates/intervention/detail/includes/compensations.html:30
msgid "Identifier"
msgstr "Kennung"
@@ -268,11 +269,11 @@ msgstr "Kennung"
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:28
#: compensation/templates/compensation/detail/eco_account/view.html:31
#: ema/tables.py:33 ema/templates/ema/detail/includes/documents.html:28
#: ema/templates/ema/detail/view.html:24 intervention/forms.py:39
#: ema/templates/ema/detail/view.html:24 intervention/forms.py:43
#: intervention/tables.py:28
#: intervention/templates/intervention/detail/includes/compensations.html:33
#: intervention/templates/intervention/detail/includes/documents.html:28
#: intervention/templates/intervention/detail/view.html:31 konova/forms.py:316
#: intervention/templates/intervention/detail/view.html:31 konova/forms.py:330
msgid "Title"
msgstr "Bezeichnung"
@@ -363,7 +364,7 @@ msgstr "Ökokonten"
#: compensation/tables.py:222
#: compensation/templates/compensation/detail/eco_account/view.html:19
#: intervention/forms.py:501 intervention/forms.py:508
#: intervention/forms.py:571 intervention/forms.py:578
#: konova/templates/konova/home.html:88 templates/navbar.html:34
msgid "Eco-account"
msgstr "Ökokonto"
@@ -476,7 +477,7 @@ msgstr "Dokumente"
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
#: ema/templates/ema/detail/includes/documents.html:14
#: intervention/templates/intervention/detail/includes/documents.html:14
#: konova/forms.py:365
#: konova/forms.py:379
msgid "Add new document"
msgstr "Neues Dokument hinzufügen"
@@ -581,7 +582,7 @@ msgstr "Zuletzt bearbeitet"
#: compensation/templates/compensation/detail/compensation/view.html:92
#: compensation/templates/compensation/detail/eco_account/view.html:91
#: ema/templates/ema/detail/view.html:82 intervention/forms.py:285
#: ema/templates/ema/detail/view.html:82 intervention/forms.py:355
#: intervention/templates/intervention/detail/view.html:116
msgid "Shared with"
msgstr "Freigegeben für"
@@ -642,19 +643,19 @@ msgid "Missing"
msgstr "Fehlt"
#: compensation/templates/compensation/detail/eco_account/view.html:58
#: ema/templates/ema/detail/view.html:42 intervention/forms.py:91
#: ema/templates/ema/detail/view.html:42 intervention/forms.py:101
#: intervention/templates/intervention/detail/view.html:56
msgid "Conservation office"
msgstr "Eintragungsstelle"
#: compensation/templates/compensation/detail/eco_account/view.html:62
#: ema/templates/ema/detail/view.html:46 intervention/forms.py:112
#: ema/templates/ema/detail/view.html:46 intervention/forms.py:127
#: intervention/templates/intervention/detail/view.html:60
msgid "Conservation office file number"
msgstr "Aktenzeichen Eintragungsstelle"
#: compensation/templates/compensation/detail/eco_account/view.html:66
#: ema/templates/ema/detail/view.html:50 intervention/forms.py:118
#: ema/templates/ema/detail/view.html:50 intervention/forms.py:138
#: intervention/templates/intervention/detail/view.html:64
msgid "Intervention handler"
msgstr "Eingriffsverursacher"
@@ -666,7 +667,7 @@ msgstr ""
#: compensation/views/compensation_views.py:123
#: compensation/views/eco_account_views.py:190 ema/views.py:128
#: intervention/views.py:391
#: intervention/views.py:393
msgid "Log"
msgstr "Log"
@@ -676,7 +677,7 @@ msgstr "Kompensation entfernt"
#: compensation/views/compensation_views.py:163
#: compensation/views/eco_account_views.py:289 ema/views.py:250
#: intervention/views.py:94
#: intervention/views.py:96
msgid "Document added"
msgstr "Dokument hinzugefügt"
@@ -712,16 +713,16 @@ msgid "Deduction removed"
msgstr "Abbuchung entfernt"
#: compensation/views/eco_account_views.py:210 ema/views.py:171
#: intervention/views.py:431
#: intervention/views.py:433
msgid "{} unrecorded"
msgstr "{} entzeichnet"
#: compensation/views/eco_account_views.py:210 ema/views.py:171
#: intervention/views.py:431
#: intervention/views.py:433
msgid "{} recorded"
msgstr "{} verzeichnet"
#: compensation/views/eco_account_views.py:346 intervention/views.py:413
#: compensation/views/eco_account_views.py:346 intervention/views.py:415
msgid "Deduction added"
msgstr "Abbuchung hinzugefügt"
@@ -773,111 +774,129 @@ msgstr "Gemarkung"
msgid "Search for district"
msgstr "Nach Gemarkung suchen"
#: intervention/forms.py:36
#: intervention/forms.py:40
msgid "Generated automatically"
msgstr "Automatisch generiert"
#: intervention/forms.py:41
#: intervention/forms.py:45
msgid "An explanatory name"
msgstr "Aussagekräftiger Titel"
#: intervention/forms.py:45
#: intervention/forms.py:49
msgid "Construction XY; Location ABC"
msgstr "Bauvorhaben XY; Flur ABC"
#: intervention/forms.py:54
#: intervention/templates/intervention/detail/view.html:35
msgid "Process type"
msgstr "Verfahrenstyp"
#: intervention/forms.py:60
#: intervention/forms.py:70
#: intervention/templates/intervention/detail/view.html:39
msgid "Law"
msgstr "Gesetz"
#: intervention/forms.py:62
#: intervention/forms.py:72
msgid "Multiple selection possible"
msgstr "Mehrfachauswahl möglich"
#: intervention/forms.py:76
#: intervention/forms.py:86
#: intervention/templates/intervention/detail/view.html:48
msgid "Registration office"
msgstr "Zulassungsbehörde"
#: intervention/forms.py:106
#: intervention/forms.py:116
#: intervention/templates/intervention/detail/view.html:52
msgid "Registration office file number"
msgstr "Aktenzeichen Zulassungsbehörde"
#: intervention/forms.py:122
msgid "ZB-123/ABC.456"
msgstr ""
#: intervention/forms.py:133
msgid "ETS-123/ABC.456"
msgstr ""
#: intervention/forms.py:142
msgid "Who performs the intervention"
msgstr "Wer führt den Eingriff durch"
#: intervention/forms.py:134
msgid "Map"
msgstr "Karte"
#: intervention/forms.py:145
msgid "Company Mustermann"
msgstr "Firma Mustermann"
#: intervention/forms.py:136
msgid "Where does the intervention take place"
msgstr "Wo findet der Eingriff statt"
#: intervention/forms.py:150
#: intervention/templates/intervention/detail/view.html:96
msgid "Registration date"
msgstr "Datum Zulassung bzw. Satzungsbeschluss"
#: intervention/forms.py:141
#: intervention/forms.py:161
#: intervention/templates/intervention/detail/view.html:100
msgid "Binding on"
msgstr "Datum Bestandskraft"
#: intervention/forms.py:174
msgid "New intervention"
msgstr "Neuer Eingriff"
#: intervention/forms.py:178
#: intervention/forms.py:248
msgid "Edit intervention"
msgstr "Eingriff bearbeiten"
#: intervention/forms.py:274
#: intervention/forms.py:344
msgid "Share link"
msgstr "Freigabelink"
#: intervention/forms.py:276
#: intervention/forms.py:346
msgid "Send this link to users who you want to have writing access on the data"
msgstr "Andere Nutzer erhalten über diesen Link Zugriff auf die Daten"
#: intervention/forms.py:288
#: intervention/forms.py:358
msgid "Remove check to remove access for this user"
msgstr "Wählen Sie die Nutzer ab, die keinen Zugriff mehr haben sollen"
#: intervention/forms.py:299
#: intervention/forms.py:369
#: intervention/templates/intervention/detail/includes/controls.html:15
msgid "Share"
msgstr "Freigabe"
#: intervention/forms.py:300
#: intervention/forms.py:370
msgid "Share settings for {}"
msgstr "Freigabe Einstellungen für {}"
#: intervention/forms.py:353
#: intervention/forms.py:423
msgid "Date of revocation"
msgstr "Datum des Widerspruchs"
#: intervention/forms.py:363
#: intervention/forms.py:433
#: intervention/templates/intervention/detail/includes/revocation.html:35
msgid "Document"
msgstr "Dokument"
#: intervention/forms.py:366 konova/forms.py:335
#: intervention/forms.py:436 konova/forms.py:349
msgid "Must be smaller than 15 Mb"
msgstr "Muss kleiner als 15 Mb sein"
#: intervention/forms.py:389
#: intervention/forms.py:459
#: intervention/templates/intervention/detail/includes/revocation.html:18
msgid "Add revocation"
msgstr "Widerspruch hinzufügen"
#: intervention/forms.py:429
#: intervention/forms.py:499
msgid "Checked intervention data"
msgstr "Eingriffsdaten geprüft"
#: intervention/forms.py:435
#: intervention/forms.py:505
msgid "Checked compensations data and payments"
msgstr "Kompensationen und Zahlungen geprüft"
#: intervention/forms.py:443
#: intervention/forms.py:513
#: intervention/templates/intervention/detail/includes/controls.html:19
msgid "Run check"
msgstr "Prüfung vornehmen"
#: intervention/forms.py:444 konova/forms.py:419
#: intervention/forms.py:514 konova/forms.py:433
msgid ""
"I, {} {}, confirm that all necessary control steps have been performed by "
"myself."
@@ -885,30 +904,30 @@ msgstr ""
"Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt "
"wurden:"
#: intervention/forms.py:503
#: intervention/forms.py:573
msgid "Only recorded accounts can be selected for deductions"
msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden."
#: intervention/forms.py:522 intervention/forms.py:529
#: intervention/forms.py:592 intervention/forms.py:599
#: intervention/tables.py:88
#: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/home.html:11 templates/navbar.html:22
msgid "Intervention"
msgstr "Eingriff"
#: intervention/forms.py:524
#: intervention/forms.py:594
msgid "Only shared interventions can be selected"
msgstr "Nur freigegebene Eingriffe können gewählt werden"
#: intervention/forms.py:537
#: intervention/forms.py:607
msgid "New Deduction"
msgstr "Neue Abbuchung"
#: intervention/forms.py:538
#: intervention/forms.py:608
msgid "Enter the information for a new deduction from a chosen eco-account"
msgstr "Geben Sie die Informationen für eine neue Abbuchung ein."
#: intervention/forms.py:574
#: intervention/forms.py:644
msgid ""
"Eco-account {} is not recorded yet. You can only deduct from recorded "
"accounts."
@@ -916,7 +935,7 @@ msgstr ""
"Ökokonto {} ist noch nicht verzeichnet. Abbuchungen können nur von "
"verzeichneten Ökokonten erfolgen."
#: intervention/forms.py:587
#: intervention/forms.py:657
msgid ""
"The account {} has not enough surface for a deduction of {} m². There are "
"only {} m² left"
@@ -1017,31 +1036,23 @@ msgstr "Vom"
msgid "Remove revocation"
msgstr "Widerspruch entfernen"
#: intervention/templates/intervention/detail/view.html:96
msgid "Registration date"
msgstr "Datum Zulassung bzw. Satzungsbeschluss"
#: intervention/templates/intervention/detail/view.html:100
msgid "Binding on"
msgstr "Datum Bestandskraft"
#: intervention/templates/intervention/detail/view.html:103
msgid "Exists"
msgstr "vorhanden"
#: intervention/views.py:66
#: intervention/views.py:67
msgid "Intervention {} added"
msgstr "Eingriff {} hinzugefügt"
#: intervention/views.py:69 intervention/views.py:224
#: intervention/views.py:70 intervention/views.py:226
msgid "Invalid input"
msgstr "Eingabe fehlerhaft"
#: intervention/views.py:182
#: intervention/views.py:184
msgid "This intervention has a revocation from {}"
msgstr "Es existiert ein Widerspruch vom {}"
#: intervention/views.py:198
#: intervention/views.py:200
msgid ""
"Remember: This data has not been shared with you, yet. This means you can "
"only read but can not edit or perform any actions like running a check or "
@@ -1051,43 +1062,43 @@ msgstr ""
"bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, "
"noch Prüfungen durchführen oder verzeichnen können."
#: intervention/views.py:221
#: intervention/views.py:223
msgid "{} edited"
msgstr "{} bearbeitet"
#: intervention/views.py:250
#: intervention/views.py:252
msgid "{} removed"
msgstr "{} entfernt"
#: intervention/views.py:271
#: intervention/views.py:273
msgid "Revocation removed"
msgstr "Widerspruch entfernt"
#: intervention/views.py:297
#: intervention/views.py:299
msgid "{} has already been shared with you"
msgstr "{} wurde bereits für Sie freigegeben"
#: intervention/views.py:302
#: intervention/views.py:304
msgid "{} has been shared with you"
msgstr "{} ist nun für Sie freigegeben"
#: intervention/views.py:309
#: intervention/views.py:311
msgid "Share link invalid"
msgstr "Freigabelink ungültig"
#: intervention/views.py:330
#: intervention/views.py:332
msgid "Share settings updated"
msgstr "Freigabe Einstellungen aktualisiert"
#: intervention/views.py:349
#: intervention/views.py:351
msgid "Check performed"
msgstr "Prüfung durchgeführt"
#: intervention/views.py:369
#: intervention/views.py:371
msgid "Revocation added"
msgstr "Widerspruch hinzugefügt"
#: intervention/views.py:436
#: intervention/views.py:438
msgid "There are errors on this intervention:"
msgstr "Es liegen Fehler in diesem Eingriff vor:"
@@ -1112,60 +1123,64 @@ msgstr ""
msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/forms.py:68
#: konova/forms.py:69
msgid "Not editable"
msgstr "Nicht editierbar"
#: konova/forms.py:138 konova/forms.py:281
#: konova/forms.py:139 konova/forms.py:295
msgid "Confirm"
msgstr "Bestätige"
#: konova/forms.py:150 konova/forms.py:290
#: konova/forms.py:151 konova/forms.py:304
msgid "Remove"
msgstr "Löschen"
#: konova/forms.py:152
#: konova/forms.py:153
msgid "You are about to remove {} {}"
msgstr "Sie sind dabei {} {} zu löschen"
#: konova/forms.py:291
#: konova/forms.py:249 templates/form/main_data_collapse_form.html:47
msgid "Geometry"
msgstr "Geometrie"
#: konova/forms.py:305
msgid "Are you sure?"
msgstr "Sind Sie sicher?"
#: konova/forms.py:321
#: konova/forms.py:335
msgid "Created on"
msgstr "Erstellt"
#: konova/forms.py:323
#: konova/forms.py:337
msgid "When has this file been created? Important for photos."
msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?"
#: konova/forms.py:333
#: konova/forms.py:347
#: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231
msgid "File"
msgstr "Datei"
#: konova/forms.py:396
#: konova/forms.py:410
msgid "Added document"
msgstr "Dokument hinzugefügt"
#: konova/forms.py:410
#: konova/forms.py:424
msgid "Confirm record"
msgstr "Verzeichnen bestätigen"
#: konova/forms.py:418
#: konova/forms.py:432
msgid "Record data"
msgstr "Daten verzeichnen"
#: konova/forms.py:425
#: konova/forms.py:439
msgid "Confirm unrecord"
msgstr "Entzeichnen bestätigen"
#: konova/forms.py:426
#: konova/forms.py:440
msgid "Unrecord data"
msgstr "Daten entzeichnen"
#: konova/forms.py:427
#: konova/forms.py:441
msgid "I, {} {}, confirm that this data must be unrecorded."
msgstr ""
"Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen."
@@ -1311,12 +1326,12 @@ msgid "Contact"
msgstr "Kontakt"
#: templates/form/generic_table_form.html:23
#: templates/form/main_data_collapse_form.html:58
#: templates/form/main_data_collapse_form.html:61
msgid "Cancel"
msgstr "Abbrechen"
#: templates/form/generic_table_form.html:27
#: templates/form/main_data_collapse_form.html:62
#: templates/form/main_data_collapse_form.html:65
msgid "Save"
msgstr "Speichern"
@@ -1324,7 +1339,7 @@ msgstr "Speichern"
msgid "Fields with * are required."
msgstr "* sind Pflichtfelder."
#: templates/form/main_data_collapse_form.html:13
#: templates/form/main_data_collapse_form.html:14
msgid ""
"\n"
" First enter the most basic data. Of course you can "
@@ -1335,23 +1350,20 @@ msgid ""
" "
msgstr ""
"\n"
"Geben Sie zunächst die grundlegenden Daten ein. Sie können diese später immer noch ändern.\n"
"Alle weiteren Daten, wie Dokumente oder weitere Details, können nach dem Speichern des neuen Eintrags hinzugefügt "
"werden.\n"
"Geben Sie zunächst die grundlegenden Daten ein. Sie können diese später "
"immer noch ändern.\n"
"Alle weiteren Daten, wie Dokumente oder weitere Details, können nach dem "
"Speichern des neuen Eintrags hinzugefügt werden.\n"
" "
#: templates/form/main_data_collapse_form.html:19
#: templates/form/main_data_collapse_form.html:20
msgid "Open the input topic with a simple click."
msgstr "Mit einem Linksklick öffnen Sie den jeweiligen Formularbereich."
#: templates/form/main_data_collapse_form.html:29
#: templates/form/main_data_collapse_form.html:30
msgid "General data"
msgstr "Allgemeine Daten"
#: templates/form/main_data_collapse_form.html:44
msgid "Geometry"
msgstr "Geometrie"
#: templates/generic_index.html:28
msgid "New entry"
msgstr "Neuer Eintrag"
@@ -2708,6 +2720,12 @@ msgstr ""
msgid "A fontawesome icon field"
msgstr ""
#~ msgid "Map"
#~ msgstr "Karte"
#~ msgid "Where does the intervention take place"
#~ msgstr "Wo findet der Eingriff statt"
#~ msgid "Which intervention type is this"
#~ msgstr "Welcher Eingriffstyp"