support code emailing

This commit is contained in:
soukainna
2022-10-31 10:39:43 +01:00
parent 6abeb1bed4
commit d557ffe6b3
4 changed files with 92 additions and 0 deletions

19
renderer/support.go Normal file
View File

@@ -0,0 +1,19 @@
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.search.files")
state := NewState(r, renderer.ThemeConfig, commentMenu)
state.ViewState = map[string]any{
"comment": comment,
"admins": admins,
}
renderer.Render("comment", w, r, files, state)
}