2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-09-08 11:25:39 +02:00
|
|
|
class EditableChamp::EditableChampBaseComponent < ApplicationComponent
|
2023-05-05 09:13:05 +02:00
|
|
|
include Dsfr::InputErrorable
|
|
|
|
|
2024-10-07 18:10:37 +02:00
|
|
|
attr_reader :attribute
|
|
|
|
|
|
|
|
def initialize(form:, champ:, seen_at: nil, opts: {})
|
|
|
|
@form, @champ, @seen_at, @opts = form, champ, seen_at, opts
|
|
|
|
@attribute = :value
|
|
|
|
end
|
|
|
|
|
2023-08-21 16:18:31 +02:00
|
|
|
def dsfr_champ_container
|
|
|
|
:div
|
|
|
|
end
|
|
|
|
|
|
|
|
def dsfr_input_classname
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def describedby_id
|
|
|
|
@champ.describedby_id
|
|
|
|
end
|
2022-09-08 11:25:39 +02:00
|
|
|
end
|