12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/stimulus_plumbers/form/fields/inputs/password.rb', line 12
def password_field(attribute, floating: nil, revealable: false, **options)
html_options = merge_html_options(
theme.resolve(:form_field_input, floating: floating),
options,
{ autocomplete: options.delete(:autocomplete) || DEFAULT_AUTOCOMPLETE }
)
if revealable
render_revealable_password(false) do
super(attribute, merge_html_options(html_options, { data: { input_revealable_target: "input" } }))
end
else
super(attribute, html_options)
end
end
|