% stimulus_controller = 'fields--color-picker' form ||= current_fields_form if defined?(options) && options.is_a?(Array) color_picker_field_options = options options = defined?(html_options) ? html_options : {} ActiveSupport::Deprecation.new.warn( "`options` will be replaced with `color_picker_field_options` in a later version. " \ "Please pass all of the colors you want as strings to `color_picker_field_options`." ) end options ||= {} color_picker_field_options ||= options_for(form, method) options.delete(:color_picker_options) if defined?(html_options) ActiveSupport::Deprecation.new.warn( "The `html_options` attribute for color pickers will be removed in a later version. " \ "Pass all of your html options like `class` to `options` instead." ) end other_options ||= {} options[:id] ||= form.field_id(method) # TODO: I don't think multiple is even used for this attribute, # we should probably delete this altogether. options[:multiple] ||= false if defined?(multiple) options[:multiple] = multiple ActiveSupport::Deprecation.new.warn( "The `multiple` attribute will be removed in a later version. " \ "Please pass `options: {multiple: true}` to `render` instead." ) end value = form.object.send(method) color_selected_classes = "ring-2 ring-offset-2" %> <% content = render 'shared/fields/field', form: form, method: method, options: options, other_options: other_options do %> <% content_for :field do %>