templatehelpers.go 474 B

12345678910111213141516171819
  1. package templatehelpers
  2. import (
  3. "github.com/kataras/iris"
  4. )
  5. type PageUserParams struct{
  6. HasError string
  7. Error string
  8. ReqDir string
  9. Username string
  10. Admin string
  11. Custom []string
  12. } // TODO outsource
  13. func ShowError(error string, ctx *iris.Context, location string) { // TODO: check if backend exploiteable, TODO: implement forwarding form values ?
  14. ctx.Render(location + "_box.html", PageUserParams{"1", error, location, "", "0", []string{}})
  15. return
  16. }