{% import "_includes/forms" as forms %} {% block fieldSettings %} {% block sourcesField %} {% if sources %} {% if allowMultipleSources %} {{ forms.checkboxSelectField({ label: "Sources"|t('app'), instructions: "Which sources do you want to select {type} from?"|t('app', { type: displayName|lower }), id: 'sources', name: 'sources', options: sources, values: field.sources }) }} {% else %} {{ forms.selectField({ label: "Source"|t('app'), instructions: "Which source do you want to select {type} from?"|t('app', { type: displayName|lower }), id: 'source', name: 'source', options: sources, value: field.source }) }} {% endif %} {% else %} {{ forms.field({ label: (allowMultipleSources ? "Sources"|t('app') : "Source"|t('app')) }, '

' ~ "No sources exist yet."|t('app') ~ '

') }} {% endif %} {% endblock %} {% block targetSiteField %} {{ targetSiteFieldHtml|raw }} {% endblock %} {% block limitField %} {% if allowLimit %} {{ forms.textField({ label: "Limit"|t('app'), instructions: "Limit the number of selectable {type}."|t('app', { type: displayName|lower }), id: 'limit', name: 'limit', value: field.limit, size: 2, errors: field.getErrors('limit') }) }} {% endif %} {% endblock %} {% block viewModeField %} {{ viewModeFieldHtml|raw }} {% endblock %} {% block selectionLabelField %} {{ forms.textField({ label: "Selection Label"|t('app'), instructions: "Enter the text you want to appear on the {type} selection input."|t('app', { type: displayName|lower }), id: 'selectionLabel', name: 'selectionLabel', value: field.selectionLabel, placeholder: defaultSelectionLabel, errors: field.getErrors('selectionLabel') }) }} {% endblock %} {% block localizeRelationsField %} {% if craft.app.getIsMultiSite() %} {{ forms.checkboxField({ label: "Manage relations on a per-site basis"|t('app'), id: 'localize-relations', name: 'localizeRelations', checked: field.localizeRelations }) }} {% endif %} {% endblock %} {% endblock %}