2023-01-05 12:18:27 +01:00
|
|
|
class Champs::YesNoChamp < Champs::BooleanChamp
|
2023-07-03 11:16:49 +02:00
|
|
|
def legend_label?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
def html_label?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2023-02-27 15:33:25 +01:00
|
|
|
def yes_input_id
|
|
|
|
"#{input_id}-yes"
|
|
|
|
end
|
|
|
|
|
|
|
|
def no_input_id
|
|
|
|
"#{input_id}-no"
|
|
|
|
end
|
|
|
|
|
|
|
|
def focusable_input_id
|
|
|
|
yes_input_id
|
|
|
|
end
|
2023-10-04 14:57:28 +02:00
|
|
|
|
|
|
|
def self.options
|
|
|
|
[[I18n.t('activerecord.attributes.type_de_champ.type_champs.yes_no_true'), true], [I18n.t('activerecord.attributes.type_de_champ.type_champs.yes_no_false'), false]]
|
|
|
|
end
|
2018-02-13 18:18:20 +01:00
|
|
|
end
|