diff --git a/response.go b/response.go index 6beb36e..d6202c7 100644 --- a/response.go +++ b/response.go @@ -9,13 +9,10 @@ import ( "bytes" "fmt" "net/http" - "strings" ) // Response represents an HTTP response to be sent to the client, including headers, body, status code, and metadata. type Response struct { - FlashMessage string - MsgType string headers []header body []byte statusCode int @@ -147,23 +144,6 @@ func (rs *Response) Redirect(url string) *Response { }, map[string]interface{}{ "url": "url", }) - - if rs.FlashMessage != "" || rs.MsgType != "" { - if !strings.Contains(url, "?") { - url += "?" - } else { - url += "&" - } - if rs.FlashMessage != "" { - url += "flash_message=" + rs.FlashMessage - } - if rs.MsgType != "" { - if rs.FlashMessage != "" { - url += "&" - } - url += "msg_type=" + rs.MsgType - } - } if v.Failed() { if url[0:1] != "/" { rs.redirectTo = "/" + url diff --git a/template/components/form_color_opacity.go b/template/components/form_color_opacity.go deleted file mode 100644 index 1998386..0000000 --- a/template/components/form_color_opacity.go +++ /dev/null @@ -1,14 +0,0 @@ -package components - -type FormColorOpacity struct { - ColorID string - OpacityID string - Label string - ColorHexValue string - OpacityValue string - Hint string - Error string - IsDisabled bool - IsRequired bool - HasOpacity bool -} diff --git a/template/components/form_color_opacity.html b/template/components/form_color_opacity.html deleted file mode 100644 index b429d55..0000000 --- a/template/components/form_color_opacity.html +++ /dev/null @@ -1,28 +0,0 @@ -{{ define "form_color_opacity"}} -
- -
- - {{if eq .HasOpacity true}} - opacity: - {{if ne .Hint ""}}{{.Hint}}{{end}} - {{if ne .Error ""}}
{{.Error}}
{{end}} - {{end}} -
- -{{end}} - \ No newline at end of file