{# @var craft \craft\web\twig\variables\CraftVariable #} {# /** * color-swatches plugin for Craft CMS * * ColourSwatches Field Settings * * @author Percipio Global Ltd. * @copyright Copyright (c) 2020 Percipio Global Ltd. * @link https://percipio.london * @package Colour Swatches * @since 1.0.0 */ #} {% import "_includes/forms" as forms %} {{ forms.lightswitchField({ label: 'Use config options'|t('colour-swatches'), instructions: 'Use CMS based config options or your colour palettes defined in `colour-swatches.php`.'|t('colour-swatches'), name: 'useConfigFile', on: field.useConfigFile, toggle: 'preview', reverseToggle: 'settings', }) }} {{ forms.lightswitchField({ label: 'Set random on save'|t('colour-swatches'), instructions: 'When no color is selected by the user and no default defined in the config, the system will pick a random color from the list.'|t('colour-swatches'), name: 'setRandom', on: field.setRandom, }) }}