2022-08-11 15:26:55 +00:00
|
|
|
package renderer
|
|
|
|
|
|
|
|
import "net/http"
|
|
|
|
|
|
|
|
func (renderer *Renderer) AuthGroups(w http.ResponseWriter, r *http.Request, groups []any) {
|
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.auth.groups.files")
|
|
|
|
state := NewState(r, renderer.ThemeConfig, "")
|
|
|
|
state.ViewState = map[string]any{
|
|
|
|
"groups": groups,
|
|
|
|
}
|
|
|
|
|
|
|
|
renderer.RenderNoLayout("groups switch", w, r, files, state)
|
|
|
|
}
|
2022-10-17 03:02:19 +00:00
|
|
|
|
|
|
|
func (renderer *Renderer) AuthOnboarding(w http.ResponseWriter, r *http.Request, key string, onboarding any) {
|
2022-10-30 19:11:36 +00:00
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.auth.onboarding.form.files")
|
2022-10-17 03:02:19 +00:00
|
|
|
state := NewState(r, renderer.ThemeConfig, "")
|
|
|
|
state.ViewState = map[string]any{
|
|
|
|
"key": key,
|
|
|
|
"onboarding": onboarding,
|
|
|
|
}
|
|
|
|
|
|
|
|
renderer.RenderNoLayout("onboarding", w, r, files, state)
|
|
|
|
}
|
2022-10-30 19:11:36 +00:00
|
|
|
|
|
|
|
func (renderer *Renderer) AuthOnboardingKO(w http.ResponseWriter, r *http.Request, key string) {
|
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.auth.onboarding.ko.files")
|
|
|
|
state := NewState(r, renderer.ThemeConfig, "")
|
|
|
|
state.ViewState = map[string]any{
|
|
|
|
"key": key,
|
|
|
|
}
|
|
|
|
|
|
|
|
renderer.RenderNoLayout("onboarding", w, r, files, state)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (renderer *Renderer) LostPasswordInit(w http.ResponseWriter, r *http.Request) {
|
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.auth.lost_password.init.files")
|
|
|
|
state := NewState(r, renderer.ThemeConfig, "")
|
|
|
|
state.ViewState = map[string]any{}
|
|
|
|
|
|
|
|
renderer.RenderNoLayout("lost_password_init", w, r, files, state)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (renderer *Renderer) LostPasswordRecover(w http.ResponseWriter, r *http.Request, recover any) {
|
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.auth.lost_password.recover.form.files")
|
|
|
|
state := NewState(r, renderer.ThemeConfig, "")
|
|
|
|
state.ViewState = map[string]any{
|
|
|
|
"recover": recover,
|
|
|
|
}
|
|
|
|
|
|
|
|
renderer.RenderNoLayout("lost_password_recover", w, r, files, state)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (renderer *Renderer) LostPasswordRecoverKO(w http.ResponseWriter, r *http.Request, key string) {
|
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.auth.lost_password.recover.ko.files")
|
|
|
|
state := NewState(r, renderer.ThemeConfig, "")
|
|
|
|
state.ViewState = map[string]any{
|
|
|
|
"key": key,
|
|
|
|
}
|
|
|
|
|
|
|
|
renderer.RenderNoLayout("lost_password_recover_ko", w, r, files, state)
|
|
|
|
}
|