From 58a68afd321cfd69d00b70c9f8180c03ddc7fe1b Mon Sep 17 00:00:00 2001 From: anonymous <anonymous> Date: Wed, 9 Jan 2019 14:21:59 +0100 Subject: [PATCH] ODPSH-127: change requiered attributes for resource fields --- ckanext/odsh/templates/package/snippets/resource_form.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckanext/odsh/templates/package/snippets/resource_form.html b/ckanext/odsh/templates/package/snippets/resource_form.html index 151321c0..dd736974 100644 --- a/ckanext/odsh/templates/package/snippets/resource_form.html +++ b/ckanext/odsh/templates/package/snippets/resource_form.html @@ -35,14 +35,14 @@ {% block basic_fields_name %} {% set error_string = _('odsh_resource_name_error_label') if errors.name %} {{ form.input('name', id='field-name', label=_('Name'), placeholder=_('Enter name of the dataset'), - value=data.name, error=error_string, classes=['control-full'], is_required=true) }} + value=data.name, error=error_string, classes=['control-full'], is_required=false) }} {% endblock %} {% block basic_fields_description %} {% set error_string = _('odsh_resource_description_error_label') if errors.description %} {{ form.markdown('description', id='field-description', label=_('Description'), placeholder=_('Enter description of the dataset'), value=data.description, error=error_string, - is_required=true) }} + is_required=false) }} {% endblock %} {% endblock basic_fields %} @@ -73,7 +73,7 @@ {% set format_attrs = {'data-module': 'odsh_guessformat', 'data-module-formats':h.odsh_upload_known_formats()} %} {% set error_string = _('odsh_resource_format_error_label') if errors.format %} - {% call form.input('format', id='field-format', label=_('Format'), placeholder=_('eg. CSV, XML or JSON'), value=data.format, error=error_string, classes=['control-medium'],attrs=format_attrs) %} + {% call form.input('format', id='field-format', label=_('Format'), placeholder=_('eg. CSV, XML or JSON'), value=data.format, error=error_string, is_required=true, classes=['control-medium'],attrs=format_attrs) %} {% endcall %} {% endblock %} {% endblock %} -- GitLab