{% endblock %} {% block subtitle %} {{ h.dataset_display_name(pkg) }} - {{ h.resource_display_name(res) }} - {{ _('Generate schema') }} {% endblock %} {% block primary_content_inner %} {% if task.error %} {% for err in task.error.values() %}
{{ _('Error:') }} {{ err }}
{% endfor %} {% endif %}
{{ h.csrf_input() if 'csrf_input' in h }} {% if task.last_updated %} {% else %} {% endif %} {% if task.value.schema %} {% endif %}
{{ _('Status') }} {{ task.state or _('Not generated') }}
{{ _('Last updated') }} {{ h.time_ago_from_timestamp(task.last_updated) }} {{ _('Never') }}
{{ _('JSON data schema') }} {{ form.textarea('schema', id='field-schema', value=task.value.schema, error=error, attrs={"disabled": true}) }}
{% if task.value.schema %} {% call form.select('apply_for', id='field-apply_for', label=_('Enable validation of resource/s using this data schema at the following level'), options=h.vsg_get_apply_for_options(), selected=task.value.apply_for) %}

{{ _('Leaving blank will NOT change any pre-existing validation for this dataset or resource.') }}

{{ _('Once applied as the "Dataset default", all dataset resources, when edited or added, will be validated against this data schema.') }}

{{ _('Once applied to only this "Resource", saved edits will be validated against this data schema unless otherwise overwritten (e.g. Dataset default set).') }}

{% endcall %} {% endif %}
{% endblock %}