summaryrefslogtreecommitdiff
path: root/internal/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers')
-rw-r--r--internal/handlers/elements.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/handlers/elements.go b/internal/handlers/elements.go
new file mode 100644
index 0000000..c0da7f0
--- /dev/null
+++ b/internal/handlers/elements.go
@@ -0,0 +1,22 @@
+package handlers
+
+import (
+ "html/template"
+ "net/http"
+)
+
+func (h *Handlers) ServeShowForm(w http.ResponseWriter, r *http.Request) {
+ tmpl, err := template.ParseGlob("components/*.html")
+ if err != nil {
+ panic(err)
+ }
+ tmpl.ExecuteTemplate(w, "actionform", nil)
+}
+
+func (h *Handlers) ServeHideForm(w http.ResponseWriter, r *http.Request) {
+ tmpl, err := template.ParseGlob("components/*.html")
+ if err != nil {
+ panic(err)
+ }
+ tmpl.ExecuteTemplate(w, "showformbtn", nil)
+}