Compare commits

..

No commits in common. "8b9728c3d20140b2b3d260d6e499eaf18ea1f696" and "b87e0113c98a507aaef22ed6ec281f556148e18e" have entirely different histories.

7 changed files with 11 additions and 29 deletions

View file

@ -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)
}

View file

@ -27,17 +27,6 @@ type header struct {
val string
}
// TODO add doc
func (rs *Response) BufferPDF(name string, b bytes.Buffer) *Response {
if rs.isTerminated == false {
rs.HttpResponseWriter.Header().Add("Content-Type", "application/pdf")
rs.HttpResponseWriter.Header().Add("Content-Disposition", "attachment; filename="+name)
b.WriteTo(rs.HttpResponseWriter)
}
return rs
}
// TODO add doc
func (rs *Response) Any(body any) *Response {
if rs.isTerminated == false {

View file

@ -1,7 +1,6 @@
package components
type ContentDropdown struct {
ID string
Label string
TypeClass string // type primary, secondary, success, danger, warning, info, light, dark, link, outline-primary
IsDisabled bool

View file

@ -1,8 +1,6 @@
package components
type FormButton struct {
ID string
Value string
Text string
Icon string
IsSubmit bool

View file

@ -1,5 +1,5 @@
{{define "form_button"}}
<button {{if .ID }}id="{{.ID}}" name="{{.ID}}"{{end}} {{if .Value }}value="{{.Value}}" name="{{.ID}}"{{end}} class="btn btn-{{.TypeClass}}" {{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 -->

View file

@ -9,6 +9,5 @@ type FormInput struct {
Hint string
Error string
IsDisabled bool
Autocomplete bool
IsRequired bool
}

View file

@ -8,9 +8,6 @@
{{if eq .IsRequired true}}
required
{{end}}
{{if eq .Autocomplete false}}
autocomplete="off"
{{end}}
{{if ne .Value ""}}
value="{{.Value}}"
{{end}}