{% import '_includes/forms' as forms %} {% if configOptions|length > 1 %} {% set configInput %} {{ forms.select({ id: 'configFle', name: 'configFile', options: configOptions, value: settings.configFile }) }} {% endset %} {% else %} {% set configInput %}

{{ 'You don’t have any Redactor configs yet.'|t|raw }}

{% endset %} {% endif %} {% set columnType %} {{ forms.select({ id: 'columnType', name: 'columnType', options: columns, value: settings.columnType }) }} {% endset %} {{ forms.field({ label: "Config"|t, instructions: "You can save custom Redactor configs as .json files in craft/config/redactor/."|t~' '~"View available settings"|t~'.', id: 'configFile' }, configInput) }} {{ forms.checkboxSelectField({ id: 'availableAssetSources', name: 'availableAssetSources', label: 'Available Asset Sources'|t, instructions: 'The asset sources that should be available when selecting assets (if the selected config has an Image or File button).'|t, options: assetSourceOptions, values: settings.availableAssetSources, }) }} {{ forms.checkboxSelectField({ id: 'availableTransforms', name: 'availableTransforms', label: 'Available Image Transforms'|t, instructions: 'The image transforms that should be available when selecting images (if the selected config has an Image button).'|t, options: transformOptions, values: settings.availableTransforms, }) }} {{ forms.checkboxField({ label: "Clean up HTML?"|t, instructions: "Removes <span>’s, empty tags, and most style attributes on save."|t, id: 'cleanupHtml', name: 'cleanupHtml', checked: settings.cleanupHtml }) }} {{ forms.checkboxField({ label: "Purify HTML?"|t, instructions: 'Removes any potentially-malicious code on save, by running the submitted data through HTML Purifier.'|t, warning: 'Disable this at your own risk!'|t, id: 'purifyHtml', name: 'purifyHtml', checked: settings.purifyHtml }) }} {{ forms.field({ label: "Column Type"|t, instructions: "The underlying database column type to use when saving content."|t, id: 'columnType', warning: (existing ? "Changing this may result in data loss."|t), }, columnType) }}