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

{{ _('Usage information') }}

{{ _('Dataset is available for use:') }}{{ kata_form.tooltip(tooltip=_("Usage and license information fields are compulsory.

Choose how the data can be accessed. Type the URL information asked for depending on your choice. If the data is downloadable, choose the first or second option and provide the url. If the data is accessible after a person accepts terms and conditions in an external service, choose the third option. If the data can be accessed only by directly contacting the distributor, choose the last option. In this case data requests are sent by email to the address you provided in distributor section.

Choose a license from the selection.")) }}

{# Somewhat dirty solution. The resource error is *somewhere* in array as some indices may be for metadata documents #}
{% if errors.resources and data.availability == 'direct_download' %} {{ form.input('direct_download_URL', label=_('Web address for downloading the dataset'), id="direct_download_URL", placeholder=_('http://mydata.com'), value=data.direct_download_URL, error=[_('Missing value')], classes=['control-medium'], control_classes=["kata-label-pluspad"], label_classes=['kata-input-comp']) }} {% else %} {{ form.input('direct_download_URL', label=_('Web address for downloading the dataset'), id="direct_download_URL", placeholder=_('http://mydata.com'), value=data.direct_download_URL, error='', classes=['control-medium'], control_classes=["kata-label-pluspad"], label_classes=['kata-input-comp']) }} {% endif %}
{{ form.input('access_request_URL', label=_('Web address for downloading the dataset'), id="access_request_URL", placeholder=_('http://mydata.com'), value=data.access_request_URL, error=errors.access_request_URL, classes=['control-medium'], control_classes=["kata-label-pluspad"], label_classes=['kata-input-comp']) }}
{% if data.access_application_new_form and data.access_application_new_form != 'False' and not errors.access_application_URL %} {% set new_form_chk = true %} {% endif %}
{% if data.availability == 'through_provider' %}
{{ form.input('through_provider_URL', label=_('Data provider\'s web address'), id="through_provider_URL", placeholder=_('http://mydata.com'), value=data.through_provider_URL, error=errors.through_provider_URL, classes=['control-medium'], control_classes=["kata-label-pluspad"], label_classes=['kata-input-comp']) }}
{% endif%} {% if errors.availability %} {{ errors.availability[0] }} {% endif %}
{% set error = errors.license_id %}
{% if error %}{{ error }}{% endif %}
{{ _('Information about licenses') }}
{% if data.license_URL %} {{ form.input('license_URL', id='license_URL', label=_('License URL'), placeholder=_('eg. http://www.gnu.org/licenses/gpl.html or freeform'), value=data.license_URL, error=errors.license_URL, classes=['control-medium']) }} {% endif %}