{% import '_includes/forms' as forms %} {{ forms.selectField({ label: 'UI Mode'|t('app'), instructions: 'How the field should be presented in the control panel.'|t('app'), id: 'ui-mode', name: 'uiMode', options: [ { label: 'Normal'|t('app'), value: 'normal' }, { label: 'Enlarged'|t('app'), value: 'enlarged' }, ], value: field.uiMode, }) }} {% set configInput %}
{{ forms.select({ name: 'configSelectionMode', options: [ { label: 'Choose a config file'|t('redactor'), value: 'choose' }, { label: 'Enter a custom config'|t('redactor'), value: 'manual' } ], value: field.configSelectionMode, toggle: true, targetPrefix: '.csm-' }) }} {{ forms.select({ id: 'redactorConfig', name: 'redactorConfig', class: ['csm-choose', field.configSelectionMode == 'manual' ? 'hidden']|filter, options: redactorConfigOptions, value: field.redactorConfig }) }}
{% endset %} {{ forms.field({ label: "Redactor Config"|t('redactor'), id: 'config', instructions: "You can save custom Redactor configs as `.json` files in `config/redactor/`, or you can enter a custom config."|t('redactor') ~ ' '~"View available settings"|t('redactor')~'', required: true, }, configInput) }} {{ forms.textareaField({ label: "Custom Redactor Config"|t('redactor'), instructions: 'The config must be entered as valid JSON.'|t('redactor'), fieldClass: ['csm-manual', field.configSelectionMode == 'choose' ? 'hidden']|filter, class: ['code', 'ltr'], name: 'manualConfig', value: field.manualConfig, rows: 10, cols: 50, errors: field.getErrors('manualConfig'), }) }} {{ forms.checkboxField({ label: 'Show the “HTML” button for non-admin users'|t('redactor'), instructions: 'Whether the “HTML” button should be visible for non-admin users.'|t('redactor'), id: 'showHtmlButtonForNonAdmins', name: 'showHtmlButtonForNonAdmins', checked: field.showHtmlButtonForNonAdmins, }) }} {{ forms.checkboxField({ label: 'Show unpermitted volumes'|t('app'), instructions: 'Whether to show volumes that the user doesn’t have permission to view.'|t('app'), id: 'showUnpermittedVolumes', name: 'showUnpermittedVolumes', checked: field.showUnpermittedVolumes, }) }} {{ forms.checkboxField({ label: 'Show unpermitted files'|t('app'), instructions: 'Whether to show files that the user doesn’t have permission to view, per the “View files uploaded by other users” permission.'|t('app'), id: 'showUnpermittedFiles', name: 'showUnpermittedFiles', checked: field.showUnpermittedFiles, }) }} {{ forms.checkboxSelectField({ id: 'availableVolumes', name: 'availableVolumes', label: 'Available Volumes'|t('redactor'), instructions: 'The volumes that should be available when selecting assets (if the selected config has an Image or File button).'|t('redactor'), options: volumeOptions, values: field.availableVolumes, showAllOption: volumeOptions|length ? true : false }) }} {{ forms.checkboxSelectField({ id: 'availableTransforms', name: 'availableTransforms', label: 'Available Transforms'|t('redactor'), instructions: 'The transforms that should be available when inserting images.'|t('redactor'), options: transformOptions, values: field.availableTransforms, showAllOption: transformOptions|length ? true : false }) }} {{ forms.selectField({ id: 'defaultTransform', name: 'defaultTransform', label: 'Default Transform'|t('redactor'), instructions: 'The default transform that should be applied when inserting images.'|t('redactor'), options: defaultTransformOptions, value: field.defaultTransform, }) }}
{{ "Advanced"|t('redactor') }}