{% import "_includes/forms" as forms %} {% block fieldSettings %} {% block sourcesField %} {% if sources %} {% if allowMultipleSources %} {{ forms.checkboxSelectField({ label: "Sources"|t, instructions: "Which sources do you want to select {type} from?"|t({ type: type|lower }), id: 'sources', name: 'sources', options: sources, values: settings.sources })}} {% else %} {{ forms.selectField({ label: "Source"|t, instructions: "Which source do you want to select {type} from?"|t({ type: type|lower }), id: 'source', name: 'source', options: sources, value: settings.source }) }} {% endif %} {% else %} {{ forms.field({ label: (allowMultipleSources ? "Sources"|t : "Source"|t) }, '
' ~ "No sources exist yet."|t ~ '
') }} {% endif %} {% endblock %} {% block targetLocaleField %} {{ targetLocaleFieldHtml|raw }} {% endblock %} {% block limitField %} {% if allowLimit %} {{ forms.textField({ label: "Limit"|t, instructions: "Limit the number of selectable {type}."|t({ type: type|lower }), id: 'limit', name: 'limit', value: settings.limit, size: 2, errors: settings.getErrors('limit') }) }} {% endif %} {% endblock %} {% block viewModeField %} {{ viewModeFieldHtml|raw }} {% endblock %} {% block selectionLabelField %} {{ forms.textField({ label: "Selection Label"|t, instructions: "Enter the text you want to appear on the {type} selection input."|t({ type: type|lower }), id: 'selectionLabel', name: 'selectionLabel', value: settings.selectionLabel, placeholder: defaultSelectionLabel, errors: settings.getErrors('selectionLabel') }) }} {% endblock %} {% endblock %}