diff --git a/conference.go b/conference.go index 5a6a6e6..b4c7236 100644 --- a/conference.go +++ b/conference.go @@ -290,7 +290,7 @@ func NewTopic(ctxt ui.AmContext) (string, any) { ctxt.VarMap().Set("target", urlStem) ctxt.VarMap().Set("post", post.PostId) ctxt.VarMap().Set("amsterdam_pageTitle", "Upload Attachment") - return "framed_template", "attachment_upload.jet" + return "framed", "attachment_upload.jet" } return "error", "invalid button clicked on form" diff --git a/errors.go b/errors.go index 325ae07..49949f3 100644 --- a/errors.go +++ b/errors.go @@ -59,7 +59,7 @@ func AmErrorHandler(err error, c echo.Context) { amctxt.VarMap().Set("error", err.Error()) // TODO: come up with a way to shift templates and titles for different error codes amctxt.VarMap().Set("amsterdam_pageTitle", "Amsterdam Internal Server Error") - cerr := ui.AmSendPageData(c, amctxt, "framed_template", "error.jet") + cerr := ui.AmSendPageData(c, amctxt, "framed", "error.jet") if cerr != nil { log.Errorf("Error rendering error %d (%v): %v", errCode, err, cerr) } diff --git a/login.go b/login.go index 7288be0..807525c 100644 --- a/login.go +++ b/login.go @@ -439,7 +439,7 @@ func PasswordRecovery(ctxt ui.AmContext) (string, any) { msg.Send() ctxt.SetLeftMenu("top") ctxt.VarMap().Set("amsterdam_pageTitle", "Your Password Has Been Changed") - return "framed_template", "password_changed.jet" + return "framed", "password_changed.jet" } } } diff --git a/ui/messagebox.go b/ui/messagebox.go index f641fb0..fd8305f 100644 --- a/ui/messagebox.go +++ b/ui/messagebox.go @@ -133,7 +133,7 @@ func (mb *MessageBox) Render(ctxt AmContext) (string, any) { ctxt.VarMap().Set("warningLines", mb.def.WarningLines) ctxt.VarMap().Set("buttons", mb.def.Buttons) ctxt.VarMap().Set("buttonLinks", blinks) - return "framed_template", "messagebox.jet" + return "framed", "messagebox.jet" } // Validate validates that the correct button was clicked by verifying the confirmation parameter. diff --git a/ui/middleware.go b/ui/middleware.go index c8b4c0d..932de04 100644 --- a/ui/middleware.go +++ b/ui/middleware.go @@ -42,7 +42,7 @@ func IPBanTest(next echo.HandlerFunc) echo.HandlerFunc { amctxt.VarMap().Set("amsterdam_pageTitle", "IP Address Banned") amctxt.VarMap().Set("message", banmsg) amctxt.SetRC(http.StatusForbidden) - return AmSendPageData(c, amctxt, "framed_template", "ipban.jet") + return AmSendPageData(c, amctxt, "framed", "ipban.jet") } return next(c) } diff --git a/ui/render_wrap.go b/ui/render_wrap.go index da3a17f..3b58957 100644 --- a/ui/render_wrap.go +++ b/ui/render_wrap.go @@ -29,7 +29,7 @@ import ( * "redirect" - Treat "data" as a URL to be redirected to and send a 302 Redirect. * "string" - Output "data" as a string. * "template" - Treat "data" as a template name, and output that template. - * "framed_template" - Treat "data" as an inner template name, and output that template rendered + * "framed" - Treat "data" as an inner template name, and output that template rendered * within the outer "frame.jet" template. * data - The data to be output, as determined by the command. * Returns: @@ -84,7 +84,7 @@ func AmSendPageData(ctxt echo.Context, amctxt AmContext, command string, data an err = ctxt.String(amctxt.RC(), data.(string)) case "template": err = ctxt.Render(amctxt.RC(), data.(string), amctxt) - case "framed", "framed_template": + case "framed": amctxt.VarMap().Set("amsterdam_innerPage", data) menus := make([]*MenuDefinition, 2) switch amctxt.LeftMenu() { @@ -126,7 +126,7 @@ func ErrorPage(ctxt AmContext, input_err error) (string, any, error) { } ctxt.VarMap().Set("amsterdam_pageTitle", "Internal Server Error") ctxt.VarMap().Set("error", input_err.Error()) - return "framed_template", "error.jet", nil + return "framed", "error.jet", nil } // expireTime is the expiration time sent in the dynamic headers.