factoring out some of the special case "amsterdam_" page variables

This commit is contained in:
2026-02-10 21:19:50 -07:00
parent f2b8b829aa
commit be5255b4e7
4 changed files with 24 additions and 24 deletions
+4 -4
View File
@@ -316,8 +316,8 @@ func (d *Dialog) Render(ctxt AmContext) (string, any) {
if d.MenuSelector != "" && d.MenuSelector != "nochange" {
ctxt.SetLeftMenu(d.MenuSelector)
}
ctxt.VarMap().Set("amsterdam_required", required)
ctxt.VarMap().Set("amsterdam_dialog", d)
ctxt.VarMap().Set("__required", required)
ctxt.VarMap().Set("__dialog", d)
ctxt.SetFrameTitle(d.Title)
if strings.Contains(d.Options, "suppresslogin") {
ctxt.VarMap().Set("amsterdam_suppressLogin", true)
@@ -334,7 +334,7 @@ func (d *Dialog) Render(ctxt AmContext) (string, any) {
* Data as a parameter for the command string.
*/
func (d *Dialog) RenderError(ctxt AmContext, errormessage string) (string, any) {
ctxt.VarMap().Set("amsterdam_errorMessage", errormessage)
ctxt.VarMap().Set("__errorMessage", errormessage)
return d.Render(ctxt)
}
@@ -347,7 +347,7 @@ func (d *Dialog) RenderError(ctxt AmContext, errormessage string) (string, any)
* Data as a parameter for the command string.
*/
func (d *Dialog) RenderInfo(ctxt AmContext, infoMessage string) (string, any) {
ctxt.VarMap().Set("amsterdam_infoMessage", infoMessage)
ctxt.VarMap().Set("__infoMessage", infoMessage)
return d.Render(ctxt)
}