2017-10-24 01:01:08 +00:00
|
|
|
# frozen_string_literal: true
|
2012-01-26 18:53:16 +00:00
|
|
|
module SimpleForm
|
|
|
|
module Inputs
|
2012-01-27 18:30:19 +00:00
|
|
|
class CollectionCheckBoxesInput < CollectionRadioButtonsInput
|
2012-01-26 19:15:32 +00:00
|
|
|
protected
|
2012-01-26 18:53:16 +00:00
|
|
|
|
2012-01-26 19:15:32 +00:00
|
|
|
# Checkbox components do not use the required html tag.
|
|
|
|
# More info: https://github.com/plataformatec/simple_form/issues/340#issuecomment-2871956
|
2012-01-26 18:53:16 +00:00
|
|
|
def has_required?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2012-02-14 01:50:16 +00:00
|
|
|
def build_nested_boolean_style_item_tag(collection_builder)
|
|
|
|
collection_builder.check_box + collection_builder.text
|
2012-01-27 18:09:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def item_wrapper_class
|
|
|
|
"checkbox"
|
2012-01-26 18:53:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|