diff --git a/analysis/forms.py b/analysis/forms.py index 4aafdcbb..11d2f98b 100644 --- a/analysis/forms.py +++ b/analysis/forms.py @@ -65,6 +65,8 @@ class TimespanReportForm(BaseForm): self.form_title = _("Generate report") self.form_caption = _("Select a timespan and the desired conservation office") self.action_url = reverse("analysis:reports") + self.show_cancel_btn = False + self.action_btn_label = _("Continue") def save(self) -> str: """ Generates a redirect url for the detail report diff --git a/konova/forms.py b/konova/forms.py index 26914d27..74e53896 100644 --- a/konova/forms.py +++ b/konova/forms.py @@ -37,12 +37,14 @@ class BaseForm(forms.Form): """ template = None action_url = None + action_btn_label = _("Save") form_title = None cancel_redirect = None form_caption = None instance = None # The data holding model object form_attrs = {} # Holds additional attributes, that can be used in the template has_required_fields = False # Automatically set. Triggers hint rendering in templates + show_cancel_btn = True def __init__(self, *args, **kwargs): self.instance = kwargs.pop("instance", None) @@ -189,6 +191,7 @@ class BaseModalForm(BaseForm, BSModalForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self.action_btn_label = _("Continue") def process_request(self, request: HttpRequest, msg_success: str = _("Object removed"), msg_error: str = FORM_INVALID, redirect_url: str = None): """ Generic processing of request diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index ef92aa2c..baf99f19 100644 Binary files a/locale/de/LC_MESSAGES/django.mo and b/locale/de/LC_MESSAGES/django.mo differ diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 2c6664ec..764b7349 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -11,15 +11,15 @@ #: intervention/forms/forms.py:53 intervention/forms/forms.py:155 #: intervention/forms/forms.py:167 intervention/forms/modalForms.py:107 #: intervention/forms/modalForms.py:120 intervention/forms/modalForms.py:133 -#: konova/forms.py:140 konova/forms.py:244 konova/forms.py:310 -#: konova/forms.py:337 konova/forms.py:347 konova/forms.py:360 -#: konova/forms.py:372 konova/forms.py:393 user/forms.py:38 +#: konova/forms.py:142 konova/forms.py:246 konova/forms.py:312 +#: konova/forms.py:339 konova/forms.py:349 konova/forms.py:362 +#: konova/forms.py:374 konova/forms.py:395 user/forms.py:38 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-20 13:19+0200\n" +"POT-Creation-Date: 2021-10-20 13:37+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,15 +29,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: analysis/forms.py:26 analysis/templates/analysis/reports/detail.html:8 +#: analysis/forms.py:24 analysis/templates/analysis/reports/detail.html:8 msgid "From" msgstr "Vom" -#: analysis/forms.py:38 +#: analysis/forms.py:36 msgid "To" msgstr "Bis" -#: analysis/forms.py:49 compensation/forms/forms.py:93 +#: analysis/forms.py:47 compensation/forms/forms.py:93 #: compensation/templates/compensation/detail/eco_account/view.html:58 #: compensation/templates/compensation/report/eco_account/report.html:16 #: ema/templates/ema/detail/view.html:42 @@ -47,22 +47,22 @@ msgstr "Bis" msgid "Conservation office" msgstr "Eintragungsstelle" -#: analysis/forms.py:51 compensation/forms/forms.py:95 +#: analysis/forms.py:49 compensation/forms/forms.py:95 msgid "Select the responsible office" msgstr "Verantwortliche Stelle" -#: analysis/forms.py:60 compensation/forms/forms.py:67 +#: analysis/forms.py:58 compensation/forms/forms.py:67 #: compensation/forms/forms.py:104 compensation/forms/forms.py:155 #: intervention/forms/forms.py:63 intervention/forms/forms.py:80 #: intervention/forms/forms.py:96 intervention/forms/forms.py:112 msgid "Click for selection" msgstr "Auswählen..." -#: analysis/forms.py:67 +#: analysis/forms.py:65 msgid "Generate report" msgstr "Bericht generieren" -#: analysis/forms.py:68 +#: analysis/forms.py:66 msgid "Select a timespan and the desired conservation office" msgstr "Wählen Sie die Zeitspanne und die gewünschte Eintragungsstelle" @@ -300,7 +300,7 @@ msgstr "Automatisch generiert" #: intervention/templates/intervention/detail/includes/documents.html:28 #: intervention/templates/intervention/detail/view.html:31 #: intervention/templates/intervention/report/report.html:12 -#: konova/forms.py:336 +#: konova/forms.py:338 msgid "Title" msgstr "Bezeichnung" @@ -335,7 +335,7 @@ msgstr "Wählen Sie ggf. Fördermittelprojekte" #: 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:371 konova/templates/konova/comment_card.html:16 +#: konova/forms.py:373 konova/templates/konova/comment_card.html:16 msgid "Comment" msgstr "Kommentar" @@ -422,7 +422,7 @@ msgstr "Zahlung wird an diesem Datum erwartet" #: compensation/forms/modalForms.py:63 compensation/forms/modalForms.py:274 #: compensation/forms/modalForms.py:369 intervention/forms/modalForms.py:134 -#: konova/forms.py:373 +#: konova/forms.py:375 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" @@ -462,7 +462,7 @@ msgstr "Geben Sie die Daten des neuen Zustandes ein" msgid "Added state" msgstr "Zustand hinzugefügt" -#: compensation/forms/modalForms.py:190 konova/forms.py:193 +#: compensation/forms/modalForms.py:190 konova/forms.py:195 msgid "Object removed" msgstr "Objekt entfernt" @@ -768,7 +768,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:392 +#: konova/forms.py:394 msgid "Add new document" msgstr "Neues Dokument hinzufügen" @@ -1220,7 +1220,7 @@ msgstr "Datum des Widerspruchs" msgid "Document" msgstr "Dokument" -#: intervention/forms/modalForms.py:122 konova/forms.py:361 +#: intervention/forms/modalForms.py:122 konova/forms.py:363 msgid "Must be smaller than 15 Mb" msgstr "Muss kleiner als 15 Mb sein" @@ -1242,7 +1242,7 @@ msgstr "Kompensationen und Zahlungen geprüft" msgid "Run check" msgstr "Prüfung vornehmen" -#: intervention/forms/modalForms.py:201 konova/forms.py:446 +#: intervention/forms/modalForms.py:201 konova/forms.py:448 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -1466,64 +1466,68 @@ msgstr "" "somit nichts eingeben, bearbeiten oder sonstige Aktionen ausführen. " "Kontaktieren Sie bitte einen Administrator. +++" -#: konova/forms.py:69 +#: konova/forms.py:40 templates/form/collapsable/form.html:62 +msgid "Save" +msgstr "Speichern" + +#: konova/forms.py:71 msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms.py:139 konova/forms.py:309 +#: konova/forms.py:141 konova/forms.py:311 msgid "Confirm" msgstr "Bestätige" -#: konova/forms.py:151 konova/forms.py:318 +#: konova/forms.py:153 konova/forms.py:320 msgid "Remove" msgstr "Löschen" -#: konova/forms.py:153 +#: konova/forms.py:155 msgid "You are about to remove {} {}" msgstr "Sie sind dabei {} {} zu löschen" -#: konova/forms.py:243 templates/form/collapsable/form.html:45 +#: konova/forms.py:245 templates/form/collapsable/form.html:45 msgid "Geometry" msgstr "Geometrie" -#: konova/forms.py:319 +#: konova/forms.py:321 msgid "Are you sure?" msgstr "Sind Sie sicher?" -#: konova/forms.py:346 +#: konova/forms.py:348 msgid "Created on" msgstr "Erstellt" -#: konova/forms.py:348 +#: konova/forms.py:350 msgid "When has this file been created? Important for photos." msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?" -#: konova/forms.py:359 +#: konova/forms.py:361 #: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231 msgid "File" msgstr "Datei" -#: konova/forms.py:423 +#: konova/forms.py:425 msgid "Added document" msgstr "Dokument hinzugefügt" -#: konova/forms.py:437 +#: konova/forms.py:439 msgid "Confirm record" msgstr "Verzeichnen bestätigen" -#: konova/forms.py:445 +#: konova/forms.py:447 msgid "Record data" msgstr "Daten verzeichnen" -#: konova/forms.py:452 +#: konova/forms.py:454 msgid "Confirm unrecord" msgstr "Entzeichnen bestätigen" -#: konova/forms.py:453 +#: konova/forms.py:455 msgid "Unrecord data" msgstr "Daten entzeichnen" -#: konova/forms.py:454 +#: konova/forms.py:456 msgid "I, {} {}, confirm that this data must be unrecorded." msgstr "" "Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." @@ -1721,15 +1725,10 @@ msgid "General data" msgstr "Allgemeine Daten" #: templates/form/collapsable/form.html:58 -#: templates/form/table/generic_table_form.html:23 +#: templates/form/table/generic_table_form.html:24 msgid "Cancel" msgstr "Abbrechen" -#: templates/form/collapsable/form.html:62 -#: templates/form/table/generic_table_form.html:27 -msgid "Save" -msgstr "Speichern" - #: templates/form/table/generic_table_form_body.html:24 msgid "Fields with * are required." msgstr "* sind Pflichtfelder." diff --git a/templates/form/table/generic_table_form.html b/templates/form/table/generic_table_form.html index 7d321436..a89ee4bf 100644 --- a/templates/form/table/generic_table_form.html +++ b/templates/form/table/generic_table_form.html @@ -19,12 +19,14 @@ {% include 'form/table/generic_table_form_body.html' %}
+ {% if form.show_cancel_btn %} + {% endif %}
- +
diff --git a/templates/modal/modal_form.html b/templates/modal/modal_form.html index eda17303..6f47b127 100644 --- a/templates/modal/modal_form.html +++ b/templates/modal/modal_form.html @@ -22,7 +22,7 @@ {% if form.render_submit %} {% endif %} \ No newline at end of file