From 6233298feb7356d122f202ed57843d4a79056333 Mon Sep 17 00:00:00 2001 From: Diana Date: Sat, 2 Nov 2024 20:23:48 -0500 Subject: [PATCH] id form button, redirect --- core.go | 2 +- template/components/form_button.go | 1 + template/components/form_button.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core.go b/core.go index d449635..df6254a 100644 --- a/core.go +++ b/core.go @@ -245,7 +245,7 @@ func (app *App) makeHTTPRouterHandlerFunc(h Controller, ms []Hook) httprouter.Ha w.WriteHeader(ctx.Response.statusCode) } if ctx.Response.redirectTo != "" { - http.Redirect(w, r, ctx.Response.redirectTo, http.StatusPermanentRedirect) + http.Redirect(w, r, ctx.Response.redirectTo, http.StatusTemporaryRedirect) } else { w.Write(ctx.Response.body) } diff --git a/template/components/form_button.go b/template/components/form_button.go index 658306e..388f7da 100644 --- a/template/components/form_button.go +++ b/template/components/form_button.go @@ -1,6 +1,7 @@ package components type FormButton struct { + ID string Text string Icon string IsSubmit bool diff --git a/template/components/form_button.html b/template/components/form_button.html index 7594613..769c9d4 100644 --- a/template/components/form_button.html +++ b/template/components/form_button.html @@ -1,5 +1,5 @@ {{define "form_button"}} - -- 2.39.2