{% extends "_components/fieldtypes/elementfieldsettings" %} {% import "_includes/forms" as forms %} {% set folderOptions = field.getFolderOptions() %} {% set fileKindOptions = field.getFileKindOptions() %} {% set isMatrix = craft.app.view.getNamespace()[0:26] == 'types[Matrix][blockTypes][' %} {% macro uploadLocationInput(name, field, sourceOptions) %} {% from "_includes/forms" import select, text %}
{slug} or {author.username}."|t('app') %}
{% if isMatrix %}
{% set uploadLocationNote = uploadLocationNote|replace({
'{slug}': '{owner.slug}',
'{author.username}': '{owner.author.username}'
}) %}
{% endif %}
' ~ "No sources exist yet."|t('app') ~ '
') }} {% endif %} {{ forms.field({ label: "Default Upload Location"|t('app'), instructions: "Where should files be uploaded when they are dragged directly onto the field, or uploaded from the front end?"|t('app') ~' '~ uploadLocationNote, errors: field.getErrors('defaultUploadLocationSubpath') }, uploadLocationInput('defaultUploadLocation', field, sourceOptions)) }}