From cfd37b537403f9c745fe6efbc364eeb99783082c Mon Sep 17 00:00:00 2001
From: Kanezoh <asfaltmanta114@gmail.com>
Date: Wed, 30 Jun 2021 14:03:35 +0900
Subject: [PATCH] add image buton

---
 src/mechanize/form.cr              | 2 ++
 src/mechanize/form/button.cr       | 1 +
 src/mechanize/form/image_button.cr | 2 ++
 3 files changed, 5 insertions(+)
 create mode 100644 src/mechanize/form/image_button.cr

diff --git a/src/mechanize/form.cr b/src/mechanize/form.cr
index 447a72f..db0e030 100644
--- a/src/mechanize/form.cr
+++ b/src/mechanize/form.cr
@@ -72,6 +72,8 @@ class MechanizeCr::Form
         buttons << FormContent::SubmitButton.new(html_node, @node)
       when"reset"
         buttons << FormContent::ResetButton.new(html_node, @node)
+      when "image"
+        buttons << FormContent::ImageButton.new(html_node, @node)
       when "text"
         fields << FormContent::Text.new(html_node)
       when "hidden"
diff --git a/src/mechanize/form/button.cr b/src/mechanize/form/button.cr
index 5a52bbe..7012455 100644
--- a/src/mechanize/form/button.cr
+++ b/src/mechanize/form/button.cr
@@ -7,3 +7,4 @@ class MechanizeCr::FormContent::Button < MechanizeCr::FormContent::Field
 end
 require "./reset_button"
 require "./submit_button"
+require "./image_button"
diff --git a/src/mechanize/form/image_button.cr b/src/mechanize/form/image_button.cr
new file mode 100644
index 0000000..49e2d9f
--- /dev/null
+++ b/src/mechanize/form/image_button.cr
@@ -0,0 +1,2 @@
+class MechanizeCr::FormContent::ImageButton < MechanizeCr::FormContent::Button
+end