{# The title with ckanext-fluent: one box per language, like fluent's fluent_text.html, and the FIRST language's box drives the dataset's URL (`slug-preview-target`), as CKAN's own title field does. Without it the URL is not filled in from the title. Only one box, so a translation never rewrites the URL. Use it with `form_snippet: ai_translation_title.html`. #} {% import 'macros/form.html' as form %} {%- for lang in h.fluent_form_languages(field, entity_type, object_type, schema) -%} {%- set attrs = {"class": "form-control"} -%} {%- if loop.first -%} {%- do attrs.update({"data-module": "slug-preview-target"}) -%} {%- endif -%} {% call form.input( field.field_name + '-' + lang, id='field-' + field.field_name + '-' + lang, label=h.fluent_form_label(field, lang), placeholder=h.scheming_language_text(field.form_placeholder, lang), value=data[field.field_name + '-' + lang] or (data.get(field.field_name) or {})[lang], error=errors[field.field_name + '-' + lang], classes=['control-full', 'control-large'] if loop.first else ['control-full'], attrs=attrs, is_required=(lang == field.fluent_required_language) ) %} {%- snippet 'scheming/form_snippets/fluent_help_text.html', field=field, lang=lang -%} {% endcall %} {%- endfor -%}