summaryrefslogtreecommitdiff
path: root/internal/handlers/elements.go
blob: 62c632b83ee531fbef32bc99e6724675ceecac6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 {
		abortWithError(w, err.Error())
		return
	}
	tmpl.ExecuteTemplate(w, "actionform", nil)
}

func (h *Handlers) ServeHideForm(w http.ResponseWriter, r *http.Request) {
	tmpl, err := template.ParseGlob("components/*.html")
	if err != nil {
		abortWithError(w, err.Error())
		return
	}
	tmpl.ExecuteTemplate(w, "showformbtn", nil)
}