ckanext-scheming
ckanext-scheming copied to clipboard
Resource name not prefilled
In regular CKAN forms, the name of a resource is based on the URL/filename of the resource, while on ckanext-scheming that is missing.
Hi,
In ckanext-scheming/ckanext/scheming/templates/scheming/form_snippets/upload.html add this: field_name='name'
{% import 'macros/form.html' as form %}
{%- set is_upload = (data.url_type == 'upload') -%}
{{ form.image_upload(
data,
errors,
field_url=field.field_name,
field_upload=field.upload_field,
field_clear=field.upload_clear,
is_upload_enabled=h.uploads_enabled(),
is_url=data[field.field_name] and not is_upload,
is_upload=is_upload,
upload_label=h.scheming_language_text(field.upload_label),
url_label=h.scheming_language_text(field.label),
placeholder=field.form_placeholder,
field_name='name'
)
}}
{# image_upload macro doesn't support call #}
{%- snippet 'scheming/form_snippets/help_text.html', field=field -%}
Hi! Have you opened a PR already?