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