add form text
parent
23b2748e0f
commit
c7f361a698
|
@ -1,6 +1,7 @@
|
||||||
require "./form/field"
|
require "./form/field"
|
||||||
require "./form/check_box"
|
|
||||||
require "./form/radio_button"
|
require "./form/radio_button"
|
||||||
|
require "./form/check_box"
|
||||||
|
require "./form/text"
|
||||||
|
|
||||||
class MechanizeCr::Form
|
class MechanizeCr::Form
|
||||||
getter fields : Array(FormContent::Field)
|
getter fields : Array(FormContent::Field)
|
||||||
|
@ -78,6 +79,8 @@ class MechanizeCr::Form
|
||||||
checkboxes << FormContent::CheckBox.new(html_node, self)
|
checkboxes << FormContent::CheckBox.new(html_node, self)
|
||||||
when "radio"
|
when "radio"
|
||||||
radiobuttons << FormContent::RadioButton.new(html_node, self)
|
radiobuttons << FormContent::RadioButton.new(html_node, self)
|
||||||
|
when "text"
|
||||||
|
fields << FormContent::Text.new(html_node)
|
||||||
else
|
else
|
||||||
fields << FormContent::Field.new(html_node)
|
fields << FormContent::Field.new(html_node)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
require "./radio_button"
|
|
||||||
class MechanizeCr::FormContent::CheckBox < MechanizeCr::FormContent::RadioButton
|
class MechanizeCr::FormContent::CheckBox < MechanizeCr::FormContent::RadioButton
|
||||||
def check
|
def check
|
||||||
@checked = true
|
@checked = true
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
class MechanizeCr::FormContent::Text < MechanizeCr::FormContent::Field
|
||||||
|
end
|
Loading…
Reference in New Issue