| 1234567891011121314151617181920212223242526 |
- package templatehelpers
- import (
- "github.com/kataras/iris"
- )
- type PageUserParams struct{
- NotificationType string
- Notification string
- ReqDir string
- Username string
- Admin string
- Custom []string
- } // TODO outsource
- // TODO error handler
- func ShowError(notification string, ctx *iris.Context, location string) { // TODO: check if backend exploiteable, TODO: implement forwarding form values ?
- ctx.Render(location + "_box.html", PageUserParams{"1", notification, location, "", "0", []string{}})
- return
- }
- func ShowNotification(notification string, ctx *iris.Context, location string) { // TODO: check if backend exploiteable, TODO: implement forwarding form values ?
- ctx.Render(location + "_box.html", PageUserParams{"2", notification, location, "", "0", []string{}})
- return
- }
|