{% ckan_extends %} {% block basic_fields %} {{ super() }}
{{ _('Resource grouping') }}:
{{ _('This section is optional and will not be relevant in most cases.') }}
{% endblock %} {% block basic_fields_name %} {{ form.input('name', id='field-name', label=_('Name'), placeholder=_('e.g. Specimens'), value=data.name, error=errors.name, classes=['control-full'], is_required=True) }} {% endblock %} {% block metadata_fields %} {% set datastore_fields = h.form_select_datastore_field_options(data, allow_empty=True) %} {# We allow empty to has to be greater than 1 for there to be fields #} {% if datastore_fields.__len__() > 1 %} {% call form.select('_title_field', label=_('Title field'), options=datastore_fields, selected=data._title_field, error=errors._title_field) %} {{ form.info(_('Please select the field to use for the record title.'), inline=True) }} {% endcall %} {% call form.select('_subtitle_field', label=_('Subtitle field'), options=datastore_fields, selected=data._subtitle_field, error=errors._subtitle_field) %} {{ form.info(_('Please select the field to use for subtitles, e.g. on the LIV.'), inline=True) }} {% endcall %} {% call form.select('_image_field', label=_('Image field'), options=datastore_fields, selected=data._image_field, error=errors._image_field, attrs={'data-module': 'toggle-select', 'data-module-target': '#image-options'}) %} {{ form.info(_('Does your dataset contain images? If so, please select the field here.'), inline=True) }} {% endcall %} {# If there's an image field in this dataset #}
{% call form.select('_image_licence', label=_('Image licence'), options=h.get_image_licence_options(), selected=data._image_licence, error=errors._image_licence) %} {{ form.info(_('Please select a licence for images in this dataset. This licence will be displayed next to the image.'), inline=True) }} {% endcall %} {% call form.input('_image_delimiter', label=_('Image list delimiter'), value=data._image_delimiter, error=errors._image_delimiter) %} {{ form.info(_('If your image field contains a series of delimited image URLs instead of just a single one enter it here'), inline=True) }} {% endcall %}
{% asset 'ckanext-nhm/toggle-select' %} {% call form.select('_latitude_field', label=_('Decimal latitude field'), options=datastore_fields, selected=data._latitude_field, error=errors._latitude_field) %} {{ form.info(_("Please select the field to use for the record's decimal latitude."), inline=True) }} {% endcall %} {% call form.select('_longitude_field', label=_('Decimal longitude field'), options=datastore_fields, selected=data._longitude_field, error=errors._longitude_field) %} {{ form.info(_("Please select the field to use for the record's decimal longitude."), inline=True) }} {% endcall %} {% endif %} {% endblock %} {% block again_button %} {% endblock %}