Integrate support

This commit is contained in:
2022-11-01 11:54:59 +01:00
11 changed files with 191 additions and 11 deletions

20
renderer/support.go Normal file
View File

@@ -0,0 +1,20 @@
package renderer
import (
"net/http"
)
const commentMenu = "comment"
//const commentsend = "sendComment"
func (renderer *Renderer) SupportSend(w http.ResponseWriter, r *http.Request, comment any, admins any) {
files := renderer.ThemeConfig.GetStringSlice("views.support.request.files")
state := NewState(r, renderer.ThemeConfig, commentMenu)
state.ViewState = map[string]any{
"comment": comment,
"admins": admins,
}
renderer.Render("comment", w, r, files, state)
}