{% import 'macros/form.html' as form %}
{% import 'macros/kata_form.html' as kata_form %}
{% set pids = h.get_pids_by_type('data', data, primary=True) %}
{% if not pids %}
{% do pids.append(dict(type='data', primary='True')) %}
{% endif %}
{% for pid_type in h.get_pid_types() %}
{% do pids.extend( h.get_pids_by_type(pid_type, data, primary=False)) %}
{% endfor %}
{% if pids | length == 1 %}
{% do pids.append(dict(type='data')) %}
{% endif %}
{{ _('Identification information of data') }}
{# #}
{% for pid in pids %}
{% set index = loop.index0 %}
{% if h.asbool(pid.get('primary')) %}
{% else %}
{% endif %}
{# #}
{% if pid.id and not h.asbool(pid.get('primary')) %}
{% endif %}
{% if index == (pids | length) - 1 %}
{{ kata_form.tooltip(tooltip=_('PIDs are compulsory. An automatically generated primary data PID is provided if left empty.
PID is a permanent identifier, preferably an HTTP URI. Note that the first PID is used as primary data PID.
The automatically generated PID is a URN identifier provided by the national library of Finland, of form \"urn:nbn:fi:csc-kata[unique number]\". Visit http://www.nationallibrary.fi/ for more information.')) }}
{{ kata_form.plusbutton(id='pids_add', onclick="$(\'#pid_btn__" ~ index ~ "__value_id\').change();") }}
{% endif %}
{% endfor %}
{% set pid_errors = h.get_dict_errors(errors, '__extras', 'pids') %}
{% if pid_errors and pid_errors is iterable %}{{ pid_errors|join('. ') }}{% endif %}
{{ kata_form.tooltip(tooltip=_('Generate a new permanent identifier (PID) for a version of the data.
PID is a permanent, unique, identifier, preferably a URI. This specific PID is for the current data version. You can add your own identifier or use one generated by the service by leaving the text field empty and checking the checkbox next to the field.
The automatically generated PID is a URN identifier from the national library of Finland, of form \"urn:nbn:fi:csc-kata[unique number]\". Visit http://www.nationallibrary.fi for more information.')) }}
{# kata_form.warning_tooltip(tooltip=_('Note that the version identifier can NOT be edited after saving the dataset, but you can add new version identifiers.')) #}
{{ kata_form.tooltip(tooltip=_('Field is compulsory but an automatically generated date is provided.
The modification date tells when the data has last been modified. Click the field to open a calendar tool to choose the modification date and time for this dataset. Accept and insert the date to the field by pressing the Done button. By default, the time zone is Z (Zulu Time Zone), which corresponds to the UTC time zone.
Note that this tool requires JavaScript to be enabled in the browser.')) }}