fix(Champ.carte): add missing label to search input instead of placeholder
Co-authored-by: Corinne Durrmeyer <corinne@inseo.fr>
This commit is contained in:
parent
d8a8fb53ce
commit
1989c3e75b
7 changed files with 35 additions and 21 deletions
|
@ -113,7 +113,11 @@ module Dsfr
|
|||
end
|
||||
|
||||
def default_hint
|
||||
I18n.t("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}")
|
||||
if I18n.exists?("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}")
|
||||
I18n.t("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}")
|
||||
elsif I18n.exists?("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}_html")
|
||||
I18n.t("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}_html").html_safe
|
||||
end
|
||||
end
|
||||
|
||||
def password?
|
||||
|
@ -131,7 +135,10 @@ module Dsfr
|
|||
def hint?
|
||||
return true if get_slot(:hint).present?
|
||||
|
||||
I18n.exists?("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}")
|
||||
maybe_hint = I18n.exists?("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}")
|
||||
maybe_hint_html = I18n.exists?("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}_html")
|
||||
|
||||
maybe_hint || maybe_hint_html
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue