diff --git a/templates/components/form/basic_inputs_macros.html.twig b/templates/components/form/basic_inputs_macros.html.twig index 46a2554c802..65048e42b50 100644 --- a/templates/components/form/basic_inputs_macros.html.twig +++ b/templates/components/form/basic_inputs_macros.html.twig @@ -149,37 +149,45 @@ {{ _self.input(name, value, options|merge({'type': 'number'})) }} {% endmacro %} - {% macro color(name, value, options = {}) %} {% set options = { - id: name ~ '_' ~ (options.rand ?? random()), + id: '%id%', }|merge(options) %} {{ _self.input(name, value, options|merge({ 'type': 'text', - 'input_addclass': 'rounded-0', + 'input_addclass': 'rounded-0 js-spectrum-field', })) }} + {% endmacro %} - {% macro password(name, value, options = {}) %} {{ _self.input(name, value, options|merge({'type': 'password'})) }} {% endmacro %}