{% import 'macros/form.html' as form %} {% import 'macros/kata_form.html' as kata_form %}

{{ _('Relations') }} {{ kata_form.optional() }}

{% if data.groups and 'title' in data.groups.0 %}
{% for group in data.groups %} {% endif %} {% endfor %}
{% endif %} {# {% set group_name = 'groups__%s__name' % data.groups|length %} {% set group_attrs = {'data-module': 'autocomplete', 'data-module-source': '/api/2/util/group/autocomplete?q=?', 'class': "kata-medium-input"} %} {% call form.input(group_name, label=_('Dataset belongs to collection/series'), id="field-group", value=data[group_name], classes=['control-medium'], label_classes=['kata-input-comp'], attrs=group_attrs) %} {{ kata_form.tooltip(tooltip=_('You can add your dataset to an existing group in this service by typing the group name and accepting it with the enter key. When you start typing the group, the service will search existing groups and will give suggestions of existing ones. Pick a group of your choice by clicking it or selecting it and then pressing the enter key.')) }} {% endcall %} #} {# Autocomplete for discipline/branch of science #}

{{ _('Discipline/branch of science') }}

{{ _('Search words from') }} {{ _('okm-tieteenala') }} {{ _('ontology, select keywords with enter or mouse click.') }}

{% set tag_attrs = {'data-module': 'autocomplete', 'data-module-tags': 'true', 'data-module-source': '/api/2/util/discipline_autocomplete?incomplete=?'} %} {{ form.input('discipline', id='discipline_field', label=_('Disciplines'), placeholder=_('eg. Matematiikka'), value=data.discipline, error=errors.discipline, classes=['control-medium'], attrs=tag_attrs) }}