diff --git a/intervention/forms.py b/intervention/forms.py index 8f03e927..bf682885 100644 --- a/intervention/forms.py +++ b/intervention/forms.py @@ -220,15 +220,28 @@ class OpenInterventionForm(EditInterventionForm): self.disable_form_field(field) +class DummyFilterInput(forms.HiddenInput): + """ A dummy input widget + + Does not render anything. Can be used to keep filter logic using django_filter without having a pre defined + filter widget being rendered to the template. + + """ + template_name = "konova/custom_widgets/dummy-filter-input.html" + + +class TextToClipboardInput(forms.TextInput): + template_name = "konova/custom_widgets/text-to-clipboard-input.html" + + class ShareInterventionForm(BaseModalForm): url = forms.CharField( label=_("Share link"), label_suffix="", - disabled=True, required=False, - widget=forms.TextInput( + widget=TextToClipboardInput( attrs={ - "style": "width:100%", + "readonly": True } ) ) @@ -251,16 +264,3 @@ class ShareInterventionForm(BaseModalForm): "url", self.share_link ) - - def save(self): - i = 0 - - -class DummyFilterInput(forms.HiddenInput): - """ A dummy input widget - - Does not render anything. Can be used to keep filter logic using django_filter without having a pre defined - filter widget being rendered to the template. - - """ - template_name = "intervention/dummy-filter-input.html" \ No newline at end of file diff --git a/intervention/templates/intervention/dummy-filter-input.html b/konova/templates/konova/custom_widgets/dummy-filter-input.html similarity index 100% rename from intervention/templates/intervention/dummy-filter-input.html rename to konova/templates/konova/custom_widgets/dummy-filter-input.html diff --git a/konova/templates/konova/custom_widgets/text-to-clipboard-input.html b/konova/templates/konova/custom_widgets/text-to-clipboard-input.html new file mode 100644 index 00000000..9da9e540 --- /dev/null +++ b/konova/templates/konova/custom_widgets/text-to-clipboard-input.html @@ -0,0 +1,18 @@ +{% load i18n fontawesome_5 %} + +
+ +
+ {% fa5_icon 'clipboard' 'far' %} +
+
+ + \ No newline at end of file diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 677fcf6f..1c3fb20d 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 588274a8..9a25cc2e 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-07-30 13:23+0200\n" +"POT-Creation-Date: 2021-07-30 14:26+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -58,13 +58,13 @@ msgid "Add a payment for intervention '{}'" msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen" #: compensation/tables.py:24 compensation/tables.py:164 -#: intervention/forms.py:27 intervention/tables.py:23 +#: intervention/forms.py:26 intervention/tables.py:23 #: intervention/templates/intervention/detail/related-objects.html:30 msgid "Identifier" msgstr "Kennung" #: compensation/tables.py:29 compensation/tables.py:169 -#: intervention/forms.py:34 intervention/tables.py:28 +#: intervention/forms.py:33 intervention/tables.py:28 #: intervention/templates/intervention/detail/related-documents.html:28 #: intervention/templates/intervention/detail/related-objects.html:33 #: intervention/templates/intervention/detail/view.html:60 konova/forms.py:181 @@ -177,89 +177,90 @@ msgstr "Gemarkung" msgid "Search for district" msgstr "Nach Gemarkung suchen" -#: intervention/forms.py:30 +#: intervention/forms.py:29 msgid "Generated automatically if none was given" msgstr "Wird automatisch erzeugt, falls nicht angegeben" -#: intervention/forms.py:39 +#: intervention/forms.py:38 msgid "Type" msgstr "Typ" -#: intervention/forms.py:42 +#: intervention/forms.py:41 msgid "Which intervention type is this" msgstr "Welcher Eingriffstyp" -#: intervention/forms.py:45 +#: intervention/forms.py:44 #: intervention/templates/intervention/detail/view.html:68 msgid "Law" msgstr "Gesetz" -#: intervention/forms.py:48 +#: intervention/forms.py:47 msgid "Based on which law" msgstr "Basiert auf welchem Recht" -#: intervention/forms.py:51 +#: intervention/forms.py:50 #: intervention/templates/intervention/detail/view.html:88 msgid "Intervention handler" msgstr "Eingriffsverursacher" -#: intervention/forms.py:54 +#: intervention/forms.py:53 msgid "Who performs the intervention" msgstr "Wer führt den Eingriff durch" -#: intervention/forms.py:57 +#: intervention/forms.py:56 msgid "Data provider" msgstr "Datenbereitsteller" -#: intervention/forms.py:59 +#: intervention/forms.py:58 msgid "Who provides the data for the intervention" msgstr "Wer stellt die Daten für den Eingriff zur Verfügung" -#: intervention/forms.py:64 +#: intervention/forms.py:63 msgid "Organization" msgstr "Organisation" -#: intervention/forms.py:70 +#: intervention/forms.py:69 msgid "Data provider details" msgstr "Datenbereitsteller Details" -#: intervention/forms.py:73 +#: intervention/forms.py:72 msgid "Further details" msgstr "Weitere Details" -#: intervention/forms.py:86 +#: intervention/forms.py:85 msgid "Map" msgstr "Karte" -#: intervention/forms.py:88 +#: intervention/forms.py:87 msgid "Where does the intervention take place" msgstr "Wo findet der Eingriff statt" -#: intervention/forms.py:96 +#: intervention/forms.py:95 msgid "Files" msgstr "Dateien" -#: intervention/forms.py:103 +#: intervention/forms.py:102 msgid "New intervention" msgstr "Neuer Eingriff" -#: intervention/forms.py:146 +#: intervention/forms.py:145 msgid "Edit intervention" msgstr "Eingriff bearbeiten" -#: intervention/forms.py:226 +#: intervention/forms.py:239 msgid "Share link" msgstr "Freigabelink" -#: intervention/forms.py:239 +#: intervention/forms.py:251 #: intervention/templates/intervention/detail/view.html:27 msgid "Share" msgstr "Freigabe" -#: intervention/forms.py:240 +#: intervention/forms.py:252 msgid "" "Send this link to users who you want to have writing access on the data." msgstr "" +"Senden Sie diesen Link an andere KSP Nutzer, damit diese Schreibrechte auf diese Daten erhalten." #: intervention/tables.py:70 msgid "Interventions" @@ -389,6 +390,14 @@ msgstr "Zuletzt bearbeitet" msgid "No geometry added, yet." msgstr "Keine Geometrie vorhanden" +#: intervention/templates/intervention/text-to-clipboard-input.html:6 +msgid "Copy to clipboard" +msgstr "In Zwischenablage kopieren" + +#: intervention/templates/intervention/text-to-clipboard-input.html:16 +msgid "Copied to clipboard" +msgstr "In Zwischenablage kopiert" + #: intervention/views.py:62 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt"