forked from goffee/core
Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
b87e0113c9 | |||
f07131086a | |||
2a4a092cb2 | |||
789a157571 | |||
b9cd82867b |
3 changed files with 2 additions and 3 deletions
2
core.go
2
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.StatusTemporaryRedirect)
|
||||
http.Redirect(w, r, ctx.Response.redirectTo, http.StatusPermanentRedirect)
|
||||
} else {
|
||||
w.Write(ctx.Response.body)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package components
|
||||
|
||||
type FormButton struct {
|
||||
ID string
|
||||
Text string
|
||||
Icon string
|
||||
IsSubmit bool
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{define "form_button"}}
|
||||
<button class="btn btn-{{.TypeClass}}" {{ if .ID }}id="{{.ID}}"{{end}} {{if eq .IsSubmit true}}type="submit"{{else}}type="button"{{end}} {{if .IsDisabled}}disabled{{end}}>
|
||||
<button class="btn btn-{{.TypeClass}}" {{if eq .IsSubmit true}}type="submit"{{else}}type="button"{{end}} {{if .IsDisabled}}disabled{{end}}>
|
||||
{{.Text}}
|
||||
</button>
|
||||
<!-- tailwind heroicons -->
|
||||
|
|
Loading…
Reference in a new issue