diff --git a/src/mechanize/form.cr b/src/mechanize/form.cr index cc0315a..baa1cec 100644 --- a/src/mechanize/form.cr +++ b/src/mechanize/form.cr @@ -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 diff --git a/src/mechanize/form/check_box.cr b/src/mechanize/form/check_box.cr index 98c0251..3e9c13c 100644 --- a/src/mechanize/form/check_box.cr +++ b/src/mechanize/form/check_box.cr @@ -1,4 +1,3 @@ -require "./radio_button" class MechanizeCr::FormContent::CheckBox < MechanizeCr::FormContent::RadioButton def check @checked = true diff --git a/src/mechanize/form/text.cr b/src/mechanize/form/text.cr new file mode 100644 index 0000000..6ed9f1f --- /dev/null +++ b/src/mechanize/form/text.cr @@ -0,0 +1,2 @@ +class MechanizeCr::FormContent::Text < MechanizeCr::FormContent::Field +end