{% import 'macros/form.html' as form %} {% set title = data.get('title', '') %} {% set description = data.get('description', '') %} {% set organization_id = data.get('organization_id', h.get_request_param('organization')) %} {% set organizations_available = h.organizations_available('read') %} {# This provides a full page that renders a form for publishing a dataset. It can then itself be extended to add/remove blocks of functionality. #}
{% block errors %}{{ form.errors(errors_summary) }}{% endblock %} {% block offering_title %} {{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. Data Request Name'), value=title, error=errors['Title'], classes=['control-full', 'control-large'], is_required=true) }} {% endblock %} {% block offering_description %} {{ form.markdown('description', id='field-description', label=_('Description'), placeholder=_('eg. Data Request description'), value=description, error=errors['Description']) }} {% endblock %}
{% block form_actions %}
{% block delete_button %} {% if h.check_access('datarequest_delete', {'id': data.get('id', '')}) and not data.state == 'deleted' %} {% set locale = h.dump_json({'content': _('Are you sure you want to delete this data request?')}) %} {% block delete_button_text %}{{ _('Delete') }}{% endblock %} {% endif %} {% endblock %}
{% endblock %}