From 090f6faa4eee71d485c047ace34983adcc99a344 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 19 Apr 2022 09:43:36 +0200 Subject: [PATCH] #140 Block edit on recorded * adds new modal form content template recorded_no_edit.html * adds modal content change, such that no data can be edited on any form as long as the entry is recorded -> instead, users are informed on the form, that the recording state prohibits editing * adds translations --- compensation/models/compensation.py | 12 +++ compensation/views/compensation.py | 17 ++++- compensation/views/eco_account.py | 10 ++- ema/views.py | 9 ++- intervention/views.py | 10 ++- konova/forms.py | 29 ++++++- konova/models/object.py | 9 +++ konova/utils/message_templates.py | 1 + locale/de/LC_MESSAGES/django.mo | Bin 41223 -> 41898 bytes locale/de/LC_MESSAGES/django.po | 109 ++++++++++++++++----------- templates/form/recorded_no_edit.html | 19 +++++ 11 files changed, 177 insertions(+), 48 deletions(-) create mode 100644 templates/form/recorded_no_edit.html diff --git a/compensation/models/compensation.py b/compensation/models/compensation.py index ea69cefc..3deff50a 100644 --- a/compensation/models/compensation.py +++ b/compensation/models/compensation.py @@ -418,6 +418,18 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin): super().set_status_messages(request) return request + @property + def is_recorded(self): + """ Getter for record status as property + + Since compensations inherit their record status from their intervention, the intervention's status is being + returned + + Returns: + + """ + return self.intervention.is_recorded + class CompensationDocument(AbstractDocument): """ diff --git a/compensation/views/compensation.py b/compensation/views/compensation.py index 4068e6bb..9c82c885 100644 --- a/compensation/views/compensation.py +++ b/compensation/views/compensation.py @@ -22,7 +22,7 @@ from konova.utils.message_templates import FORM_INVALID, IDENTIFIER_REPLACED, DA CHECKED_RECORDED_RESET, COMPENSATION_ADDED_TEMPLATE, COMPENSATION_REMOVED_TEMPLATE, DOCUMENT_ADDED, \ COMPENSATION_STATE_REMOVED, COMPENSATION_STATE_ADDED, COMPENSATION_ACTION_REMOVED, COMPENSATION_ACTION_ADDED, \ DEADLINE_ADDED, DEADLINE_REMOVED, DOCUMENT_EDITED, COMPENSATION_STATE_EDITED, COMPENSATION_ACTION_EDITED, \ - DEADLINE_EDITED + DEADLINE_EDITED, RECORDED_BLOCKS_EDIT from konova.utils.user_checks import in_group @@ -69,6 +69,14 @@ def new_view(request: HttpRequest, intervention_id: str = None): """ template = "compensation/form/view.html" + intervention = get_object_or_404(Intervention, id=intervention_id) + if intervention.is_recorded: + messages.info( + request, + RECORDED_BLOCKS_EDIT + ) + return redirect("intervention:detail", id=intervention_id) + data_form = NewCompensationForm(request.POST or None, intervention_id=intervention_id) geom_form = SimpleGeomForm(request.POST or None, read_only=False) if request.method == "POST": @@ -134,6 +142,13 @@ def edit_view(request: HttpRequest, id: str): template = "compensation/form/view.html" # Get object from db comp = get_object_or_404(Compensation, id=id) + if comp.is_recorded: + messages.info( + request, + RECORDED_BLOCKS_EDIT + ) + return redirect("compensation:detail", id=id) + # Create forms, initialize with values from db/from POST request data_form = EditCompensationForm(request.POST or None, instance=comp) geom_form = SimpleGeomForm(request.POST or None, read_only=False, instance=comp) diff --git a/compensation/views/eco_account.py b/compensation/views/eco_account.py index 68a5536a..ecaccbe6 100644 --- a/compensation/views/eco_account.py +++ b/compensation/views/eco_account.py @@ -35,7 +35,8 @@ from konova.utils.generators import generate_qr_code from konova.utils.message_templates import IDENTIFIER_REPLACED, FORM_INVALID, DATA_UNSHARED, DATA_UNSHARED_EXPLANATION, \ CANCEL_ACC_RECORDED_OR_DEDUCTED, DEDUCTION_REMOVED, DEDUCTION_ADDED, DOCUMENT_ADDED, COMPENSATION_STATE_REMOVED, \ COMPENSATION_STATE_ADDED, COMPENSATION_ACTION_REMOVED, COMPENSATION_ACTION_ADDED, DEADLINE_ADDED, DEADLINE_REMOVED, \ - DEDUCTION_EDITED, DOCUMENT_EDITED, COMPENSATION_STATE_EDITED, COMPENSATION_ACTION_EDITED, DEADLINE_EDITED + DEDUCTION_EDITED, DOCUMENT_EDITED, COMPENSATION_STATE_EDITED, COMPENSATION_ACTION_EDITED, DEADLINE_EDITED, \ + RECORDED_BLOCKS_EDIT from konova.utils.user_checks import in_group @@ -145,6 +146,13 @@ def edit_view(request: HttpRequest, id: str): template = "compensation/form/view.html" # Get object from db acc = get_object_or_404(EcoAccount, id=id) + if acc.is_recorded: + messages.info( + request, + RECORDED_BLOCKS_EDIT + ) + return redirect("compensation:acc:detail", id=id) + # Create forms, initialize with values from db/from POST request data_form = EditEcoAccountForm(request.POST or None, instance=acc) geom_form = SimpleGeomForm(request.POST or None, read_only=False, instance=acc) diff --git a/ema/views.py b/ema/views.py index debd31da..ce0d68f5 100644 --- a/ema/views.py +++ b/ema/views.py @@ -26,7 +26,7 @@ from konova.utils.generators import generate_qr_code from konova.utils.message_templates import IDENTIFIER_REPLACED, FORM_INVALID, DATA_UNSHARED, DATA_UNSHARED_EXPLANATION, \ DOCUMENT_ADDED, COMPENSATION_STATE_REMOVED, COMPENSATION_STATE_ADDED, COMPENSATION_ACTION_REMOVED, \ COMPENSATION_ACTION_ADDED, DEADLINE_ADDED, DEADLINE_REMOVED, DOCUMENT_EDITED, COMPENSATION_STATE_EDITED, \ - COMPENSATION_ACTION_EDITED, DEADLINE_EDITED + COMPENSATION_ACTION_EDITED, DEADLINE_EDITED, RECORDED_BLOCKS_EDIT from konova.utils.user_checks import in_group @@ -213,6 +213,13 @@ def edit_view(request: HttpRequest, id: str): template = "compensation/form/view.html" # Get object from db ema = get_object_or_404(Ema, id=id) + if ema.is_recorded: + messages.info( + request, + RECORDED_BLOCKS_EDIT + ) + return redirect("ema:detail", id=id) + # Create forms, initialize with values from db/from POST request data_form = EditEmaForm(request.POST or None, instance=ema) geom_form = SimpleGeomForm(request.POST or None, read_only=False, instance=ema) diff --git a/intervention/views.py b/intervention/views.py index b2b78eee..f882f214 100644 --- a/intervention/views.py +++ b/intervention/views.py @@ -18,7 +18,8 @@ from konova.utils.documents import remove_document, get_document from konova.utils.generators import generate_qr_code from konova.utils.message_templates import INTERVENTION_INVALID, FORM_INVALID, IDENTIFIER_REPLACED, \ CHECKED_RECORDED_RESET, DEDUCTION_REMOVED, DEDUCTION_ADDED, REVOCATION_ADDED, REVOCATION_REMOVED, \ - COMPENSATION_REMOVED_TEMPLATE, DOCUMENT_ADDED, DEDUCTION_EDITED, REVOCATION_EDITED, DOCUMENT_EDITED + COMPENSATION_REMOVED_TEMPLATE, DOCUMENT_ADDED, DEDUCTION_EDITED, REVOCATION_EDITED, DOCUMENT_EDITED, \ + RECORDED_BLOCKS_EDIT from konova.utils.user_checks import in_group @@ -302,6 +303,13 @@ def edit_view(request: HttpRequest, id: str): template = "intervention/form/view.html" # Get object from db intervention = get_object_or_404(Intervention, id=id) + if intervention.is_recorded: + messages.info( + request, + RECORDED_BLOCKS_EDIT + ) + return redirect("intervention:detail", id=id) + # Create forms, initialize with values from db/from POST request data_form = EditInterventionForm(request.POST or None, instance=intervention) geom_form = SimpleGeomForm(request.POST or None, read_only=False, instance=intervention) diff --git a/konova/forms.py b/konova/forms.py index fd359cb8..cde31294 100644 --- a/konova/forms.py +++ b/konova/forms.py @@ -57,6 +57,8 @@ class BaseForm(forms.Form): self.has_required_fields = True break + self.check_for_recorded_instance() + @abstractmethod def save(self): # To be implemented in subclasses! @@ -136,6 +138,22 @@ class BaseForm(forms.Form): set_class = set_class.replace(cls, "") self.fields[field].widget.attrs["class"] = set_class + def check_for_recorded_instance(self): + """ Checks if the instance is recorded and runs some special logic if yes + + If the instance is recorded, the form shall not display any possibility to + edit any data. Instead, the users should get some information about why they can not edit anything + + Returns: + + """ + if self.instance is None or not isinstance(self.instance, BaseObject): + # Do nothing + return + + if self.instance.is_recorded: + self.template = "form/recorded_no_edit.html" + class RemoveForm(BaseForm): check = forms.BooleanField( @@ -410,7 +428,6 @@ class NewDocumentModalForm(BaseModalForm): super().__init__(*args, **kwargs) self.form_title = _("Add new document") self.form_caption = _("") - self.template = "modal/modal_form.html" self.form_attrs = { "enctype": "multipart/form-data", # important for file upload } @@ -597,4 +614,12 @@ class RecordModalForm(BaseModalForm): self.instance.set_unrecorded(self.user) else: self.instance.set_recorded(self.user) - return self.instance \ No newline at end of file + return self.instance + + def check_for_recorded_instance(self): + """ Overwrite the check method for doing nothing on the RecordModalForm + + Returns: + + """ + pass diff --git a/konova/models/object.py b/konova/models/object.py index 59c68860..a1cff71b 100644 --- a/konova/models/object.py +++ b/konova/models/object.py @@ -337,6 +337,15 @@ class RecordableObjectMixin(models.Model): """ raise NotImplementedError("Implement this in the subclass!") + @property + def is_recorded(self): + """ Getter for record status as property + + Returns: + + """ + return self.recorded is not None + class CheckableObjectMixin(models.Model): # Checks - Refers to "Genehmigen" but optional diff --git a/konova/utils/message_templates.py b/konova/utils/message_templates.py index 64b7eab1..e062005a 100644 --- a/konova/utils/message_templates.py +++ b/konova/utils/message_templates.py @@ -17,6 +17,7 @@ IDENTIFIER_REPLACED = _("The identifier '{}' had to be changed to '{}' since ano ENTRY_REMOVE_MISSING_PERMISSION = _("Only conservation or registration office users are allowed to remove entries.") MISSING_GROUP_PERMISSION = _("You need to be part of another user group.") CHECKED_RECORDED_RESET = _("Status of Checked and Recorded reseted") +RECORDED_BLOCKS_EDIT = _("Entry is recorded. To edit data, the entry first needs to be unrecorded.") # SHARE DATA_UNSHARED = _("This data is not shared with you") diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 68305e78437c38918613b70d5d18bddc67804d89..b8d66ac2c09709318888f9b08576695960a98706 100644 GIT binary patch delta 12332 zcmZA737k#!|Htt&Gnlc=Fk=`q2G<_OWN7T!8nT4!vd@@1OUxb3+_4Ng(qboM-i708;=J$Hv?{~`oe;$22Ki}^;=X<`}IhWt#H=`){*(1U3xu_CL z91c&gnicyZ^I=_*GQ&F~Apu&m8Qj`<0EH<AtB zz>C%&QTGMk!YsgVC{{J)ER;G@F6UT%Q2DXJ8MaF!*LA3v&if^7f>@%fqC18F{q9m zLUrgQY6iZ*%J@CTU}y`+DUCId)pQ!5+G&HjuamVmx@D*sW-Br=hO*z5=b~<0fh@nX z9~Lo@Oqg8+MkPB`&FoRceG;u<46utQ3KD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18,15 +18,15 @@ #: konova/filters/mixins.py:277 konova/filters/mixins.py:323 #: konova/filters/mixins.py:361 konova/filters/mixins.py:362 #: konova/filters/mixins.py:393 konova/filters/mixins.py:394 -#: konova/forms.py:143 konova/forms.py:244 konova/forms.py:315 -#: konova/forms.py:359 konova/forms.py:369 konova/forms.py:382 -#: konova/forms.py:394 konova/forms.py:412 user/forms.py:42 +#: konova/forms.py:163 konova/forms.py:264 konova/forms.py:335 +#: konova/forms.py:379 konova/forms.py:389 konova/forms.py:402 +#: konova/forms.py:414 konova/forms.py:432 user/forms.py:42 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-13 15:13+0200\n" +"POT-Creation-Date: 2022-04-19 09:31+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,7 +77,7 @@ msgstr "Bericht generieren" msgid "Select a timespan and the desired conservation office" msgstr "Wählen Sie die Zeitspanne und die gewünschte Eintragungsstelle" -#: analysis/forms.py:69 konova/forms.py:191 +#: analysis/forms.py:69 konova/forms.py:211 msgid "Continue" msgstr "Weiter" @@ -342,7 +342,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:358 +#: konova/forms.py:378 msgid "Title" msgstr "Bezeichnung" @@ -369,7 +369,7 @@ msgstr "Kompensation XY; Flur ABC" #: intervention/templates/intervention/detail/includes/documents.html:34 #: intervention/templates/intervention/detail/includes/payments.html:34 #: intervention/templates/intervention/detail/includes/revocation.html:38 -#: konova/forms.py:393 konova/templates/konova/includes/comment_card.html:16 +#: konova/forms.py:413 konova/templates/konova/includes/comment_card.html:16 msgid "Comment" msgstr "Kommentar" @@ -493,7 +493,7 @@ msgid "Due on which date" msgstr "Zahlung wird an diesem Datum erwartet" #: compensation/forms/modalForms.py:64 compensation/forms/modalForms.py:359 -#: intervention/forms/modalForms.py:177 konova/forms.py:395 +#: intervention/forms/modalForms.py:177 konova/forms.py:415 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" @@ -538,7 +538,7 @@ msgstr "Neuer Zustand" msgid "Insert data for the new state" msgstr "Geben Sie die Daten des neuen Zustandes ein" -#: compensation/forms/modalForms.py:217 konova/forms.py:193 +#: compensation/forms/modalForms.py:217 konova/forms.py:213 msgid "Object removed" msgstr "Objekt entfernt" @@ -871,7 +871,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:411 +#: konova/forms.py:431 msgid "Add new document" msgstr "Neues Dokument hinzufügen" @@ -879,7 +879,7 @@ msgstr "Neues Dokument hinzufügen" #: compensation/templates/compensation/detail/eco_account/includes/documents.html:31 #: ema/templates/ema/detail/includes/documents.html:31 #: intervention/templates/intervention/detail/includes/documents.html:31 -#: konova/forms.py:368 +#: konova/forms.py:388 msgid "Created on" msgstr "Erstellt" @@ -887,7 +887,7 @@ msgstr "Erstellt" #: compensation/templates/compensation/detail/eco_account/includes/documents.html:61 #: ema/templates/ema/detail/includes/documents.html:61 #: intervention/templates/intervention/detail/includes/documents.html:65 -#: konova/forms.py:474 +#: konova/forms.py:493 msgid "Edit document" msgstr "Dokument bearbeiten" @@ -1149,17 +1149,17 @@ msgstr "Kompensationen - Übersicht" msgid "Compensation {} edited" msgstr "Kompensation {} bearbeitet" -#: compensation/views/compensation.py:161 compensation/views/eco_account.py:165 +#: compensation/views/compensation.py:161 compensation/views/eco_account.py:172 #: ema/views.py:233 intervention/views.py:327 msgid "Edit {}" msgstr "Bearbeite {}" -#: compensation/views/compensation.py:240 compensation/views/eco_account.py:351 +#: compensation/views/compensation.py:240 compensation/views/eco_account.py:358 #: ema/views.py:194 intervention/views.py:531 msgid "Log" msgstr "Log" -#: compensation/views/compensation.py:584 compensation/views/eco_account.py:719 +#: compensation/views/compensation.py:584 compensation/views/eco_account.py:726 #: ema/views.py:551 intervention/views.py:677 msgid "Report {}" msgstr "Bericht {}" @@ -1172,40 +1172,46 @@ msgstr "Ökokonten - Übersicht" msgid "Eco-Account {} added" msgstr "Ökokonto {} hinzugefügt" -#: compensation/views/eco_account.py:155 +#: compensation/views/eco_account.py:151 +msgid "" +"Entry is recorded. To edit data, the entry first needs to be unrecorded." +msgstr "" +"Eintrag ist verzeichnet. Um Daten zu bearbeiten, muss der Eintrag erst entzeichnet werden." + +#: compensation/views/eco_account.py:162 msgid "Eco-Account {} edited" msgstr "Ökokonto {} bearbeitet" -#: compensation/views/eco_account.py:268 +#: compensation/views/eco_account.py:275 msgid "Eco-account removed" msgstr "Ökokonto entfernt" -#: compensation/views/eco_account.py:372 ema/views.py:275 +#: compensation/views/eco_account.py:379 ema/views.py:275 #: intervention/views.py:630 msgid "{} unrecorded" msgstr "{} entzeichnet" -#: compensation/views/eco_account.py:372 ema/views.py:275 +#: compensation/views/eco_account.py:379 ema/views.py:275 #: intervention/views.py:630 msgid "{} recorded" msgstr "{} verzeichnet" -#: compensation/views/eco_account.py:796 ema/views.py:621 +#: compensation/views/eco_account.py:803 ema/views.py:621 #: intervention/views.py:428 msgid "{} has already been shared with you" msgstr "{} wurde bereits für Sie freigegeben" -#: compensation/views/eco_account.py:801 ema/views.py:626 +#: compensation/views/eco_account.py:808 ema/views.py:626 #: intervention/views.py:433 msgid "{} has been shared with you" msgstr "{} ist nun für Sie freigegeben" -#: compensation/views/eco_account.py:808 ema/views.py:633 +#: compensation/views/eco_account.py:815 ema/views.py:633 #: intervention/views.py:440 msgid "Share link invalid" msgstr "Freigabelink ungültig" -#: compensation/views/eco_account.py:831 ema/views.py:656 +#: compensation/views/eco_account.py:838 ema/views.py:656 #: intervention/views.py:463 msgid "Share settings updated" msgstr "Freigabe Einstellungen aktualisiert" @@ -1392,7 +1398,7 @@ msgstr "Kompensationen und Zahlungen geprüft" msgid "Run check" msgstr "Prüfung vornehmen" -#: intervention/forms/modalForms.py:264 konova/forms.py:515 +#: intervention/forms/modalForms.py:264 konova/forms.py:534 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -1633,65 +1639,65 @@ msgstr "Nch Eintragungsstelle suchen" msgid "Save" msgstr "Speichern" -#: konova/forms.py:71 +#: konova/forms.py:74 msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms.py:142 konova/forms.py:314 +#: konova/forms.py:162 konova/forms.py:334 msgid "Confirm" msgstr "Bestätige" -#: konova/forms.py:154 konova/forms.py:323 +#: konova/forms.py:174 konova/forms.py:343 msgid "Remove" msgstr "Löschen" -#: konova/forms.py:156 +#: konova/forms.py:176 msgid "You are about to remove {} {}" msgstr "Sie sind dabei {} {} zu löschen" -#: konova/forms.py:243 konova/utils/quality.py:44 konova/utils/quality.py:46 +#: konova/forms.py:263 konova/utils/quality.py:44 konova/utils/quality.py:46 #: templates/form/collapsable/form.html:45 msgid "Geometry" msgstr "Geometrie" -#: konova/forms.py:324 +#: konova/forms.py:344 msgid "Are you sure?" msgstr "Sind Sie sicher?" -#: konova/forms.py:370 +#: konova/forms.py:390 msgid "When has this file been created? Important for photos." msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?" -#: konova/forms.py:381 +#: konova/forms.py:401 #: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231 msgid "File" msgstr "Datei" -#: konova/forms.py:383 +#: konova/forms.py:403 msgid "Allowed formats: pdf, jpg, png. Max size 15 MB." msgstr "Formate: pdf, jpg, png. Maximal 15 MB." -#: konova/forms.py:449 +#: konova/forms.py:468 msgid "Added document" msgstr "Dokument hinzugefügt" -#: konova/forms.py:506 +#: konova/forms.py:525 msgid "Confirm record" msgstr "Verzeichnen bestätigen" -#: konova/forms.py:514 +#: konova/forms.py:533 msgid "Record data" msgstr "Daten verzeichnen" -#: konova/forms.py:521 +#: konova/forms.py:540 msgid "Confirm unrecord" msgstr "Entzeichnen bestätigen" -#: konova/forms.py:522 +#: konova/forms.py:541 msgid "Unrecord data" msgstr "Daten entzeichnen" -#: konova/forms.py:523 +#: konova/forms.py:542 msgid "I, {} {}, confirm that this data must be unrecorded." msgstr "" "Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." @@ -2358,6 +2364,25 @@ msgstr "Allgemeine Daten" msgid "Cancel" msgstr "Abbrechen" +#: templates/form/recorded_no_edit.html:9 +msgid "This data is recorded" +msgstr "Daten sind verzeichnet" + +#: templates/form/recorded_no_edit.html:14 +msgid "" +"\n" +" Whilst recorded the data is published publicly. If you wish to edit " +"any information on this data, the data needs\n" +" to be unrecorded first. Do not forget to record it afterwards, " +"again.\n" +" " +msgstr "" +"\n" +"Verzeichnete Daten sind öffentlich einsehbar. Wenn Sie Informationen " +"überarbeiten möchten muss dieser Datensatz zunächst entzeichnet werden. " +"Vergessen Sie nicht ihn anschließend wieder zu verzeichnen.\n" +" " + #: templates/form/table/generic_table_form_body.html:24 msgid "Fields with * are required." msgstr "* sind Pflichtfelder." @@ -2546,11 +2571,11 @@ msgstr "Administratoren verwalten die Teamdaten und Mitglieder" msgid "Selected admin ({}) needs to be a member of this team." msgstr "Gewählter Administrator ({}) muss ein Mitglied des Teams sein." -#: user/forms.py:291 user/templates/user/team/index.html:51 +#: user/forms.py:291 user/templates/user/team/index.html:54 msgid "Edit team" msgstr "Team bearbeiten" -#: user/forms.py:323 user/templates/user/team/index.html:58 +#: user/forms.py:323 user/templates/user/team/index.html:50 msgid "Leave team" msgstr "Team verlassen" @@ -2640,7 +2665,7 @@ msgstr "Neues Team hinzufügen" msgid "Members" msgstr "Mitglieder" -#: user/templates/user/team/index.html:54 +#: user/templates/user/team/index.html:57 msgid "Remove team" msgstr "Team entfernen" diff --git a/templates/form/recorded_no_edit.html b/templates/form/recorded_no_edit.html new file mode 100644 index 00000000..45fd08df --- /dev/null +++ b/templates/form/recorded_no_edit.html @@ -0,0 +1,19 @@ +{% load i18n fontawesome_5 %} + +
+

+ + {% fa5_icon 'bookmark' %} + + + {% trans 'This data is recorded' %} + +

+
+
+ {% blocktrans %} + Whilst recorded the data is published publicly. If you wish to edit any information on this data, the data needs + to be unrecorded first. Do not forget to record it afterwards, again. + {% endblocktrans %} +
+
\ No newline at end of file