diff --git a/CHANGELOG.md b/CHANGELOG.md index acca600cf9d9422edbdef8fed1c88f3d2dfa8e1c..6d803f4c4114265c485cb9b6c1e7c36fccae3d73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Added an alert in the dataset edit form if a GUID was detected in the dataset, advising users to avoid manual editing and to contact the publisher for any data change requests. + ### Fixed - Fix search input behavior to remember the last entered value. diff --git a/ckanext/odsh/templates/package/snippets/package_form.html b/ckanext/odsh/templates/package/snippets/package_form.html index 2cb0e5ccc7cf23900bfab39177361d0b5bae822c..9ee68b9549218083a76c6b110e506d0b730c010e 100644 --- a/ckanext/odsh/templates/package/snippets/package_form.html +++ b/ckanext/odsh/templates/package/snippets/package_form.html @@ -2,6 +2,15 @@ {% set action = g.form_action or '' %} {% set form_style = g.form_style or g.action %} + +{% if h.odsh_extract_value_from_extras(data.extras, 'guid') %} +<div class="alert alert-warning" role="alert"> + <h4 class="alert-heading">{{ _('GUID detected') }}</h4> + <p>{{ _('A GUID was detected in the dataset\'s extras, suggesting it was likely generated by a harvester. Manual editing is not recommended.') }}</p> + <p class="mb-0">{{ _('Please contact the publisher if you would like to request any changes to the metadata.') }}</p> +</div> +{% endif %} + <form id="dataset-edit" class="dataset-form {% if(form_style=='edit') %} dataset-edit-form {%endif%} " method="post" action="{{ action }}" data-module="basic-form" novalidate> {{ h.csrf_input() }}