{#- The form part of an old repeating free-text field kept by `ckan actor-registry schema` (ckanext-dcat's contact or publisher). Parameters: field, data, errors, licenses, entity_type, object_type, and notice (the text that asks the editor to move the details to the registry). Shown to edit only while the migration is open, the registry field is empty and the old field holds something (or to correct a stored value that fails validation): with the notice. Otherwise hidden, every stored value sent along unchanged so that saving never clears it (CKAN removes a stored value that a save does not send); a sysadmin can read what it holds under a fold. A dataset without old details gets only the registry's field. -#} {%- if h.actor_registry_legacy_editable(field, data, errors) -%} {%- if not (errors or {}).get(field.field_name) -%}
{{ notice }}
{%- endif -%} {%- snippet 'scheming/form_snippets/repeating_subfields.html', field=field, data=data, errors=errors, licenses=licenses, entity_type=entity_type, object_type=object_type -%} {%- else -%} {%- set flat = h.scheming_flatten_subfield(field, data) -%} {%- for key, value in flat|dictsort -%} {%- if key.startswith(field.field_name ~ '-') and value is mapping -%} {#- A translated subfield (ckanext-fluent, e.g. name_translated): one input per language, as its form sends it. -#} {%- for lang, text in value|dictsort -%} {%- if text is not none -%} {%- endif -%} {%- endfor -%} {%- elif key.startswith(field.field_name ~ '-') and value is not none -%} {%- endif -%} {%- endfor -%} {%- if h.actor_registry_is_sysadmin() and h.actor_registry_legacy_has_value(field, data) -%}
{{ _('Show the old details: %(field)s', field=h.scheming_language_text(field.label)) }}

{{ _('Kept as they were, not shown to visitors or exported. Only sysadmins see them here.') }}

{%- snippet 'scheming/display_snippets/repeating_subfields.html', field=field, data=data, entity_type=entity_type, object_type=object_type -%}
{%- endif -%} {%- endif -%}