Feat: show and hide form
This commit is contained in:
		| @@ -6,10 +6,21 @@ import ( | ||||
| ) | ||||
|  | ||||
| func HandleShowCreateForm(w http.ResponseWriter, r *http.Request) { | ||||
| 	show := true | ||||
| 	tmpl, err := template.ParseGlob("components/*.html") | ||||
| 	if err != nil { | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	tmpl.ExecuteTemplate(w, "createform", nil) | ||||
| 	tmpl.ExecuteTemplate(w, "createform", show) | ||||
| } | ||||
|  | ||||
| func HandleHideCreateForm(w http.ResponseWriter, r *http.Request) { | ||||
| 	show := false | ||||
| 	tmpl, err := template.ParseGlob("components/*.html") | ||||
| 	if err != nil { | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	tmpl.ExecuteTemplate(w, "createform", show) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder