Sha256: 1f6d5526e199e62e43e56c8d7f48b84587033f31af03d5f945e724e9aa2c8c4d
Contents?: true
Size: 663 Bytes
Versions: 52
Compression:
Stored size: 663 Bytes
Contents
# frozen_string_literal: true module UiBibzInputs class UiCheckboxFieldInput < BaseInput include UiBibz::Ui::Core::Forms::Choices def label(_wrapper_options) false end def input(_wrapper_options) UiBibz::Ui::Core::Forms::Choices::CheckboxField.new(input_attribute_name, new_options, new_input_html_options).render end def new_input_html_options input_html_options.merge({ checked: value.nil? ? false : value }) end def value @value ||= @builder.object.send(attribute_name) end def new_options options.merge({ label: options[:label] || attribute_name.to_s.titleize }) end end end
Version data entries
52 entries across 52 versions & 1 rubygems