diff options
author | Unknwon <u@gogs.io> | 2017-02-23 11:39:09 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-27 22:45:35 -0500 |
commit | 4f9c5981a923687a803a3711fe33cd211584f36b (patch) | |
tree | 1ebef38e15be164ea34415211cd764c222d8cfee /modules/context | |
parent | b3757e424ffc47f7ae07d8fecd9f2ecf98f20679 (diff) |
refactoring: modules/auth/*_form.go -> modules/form
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/context.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/context/context.go b/modules/context/context.go index f6f2756a..e3cc6f6b 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -22,6 +22,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/auth" "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/modules/form" "github.com/gogits/gogs/modules/setting" ) @@ -78,9 +79,9 @@ func (ctx *Context) HTML(status int, name base.TplName) { } // RenderWithErr used for page has form validation but need to prompt error to users. -func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, form interface{}) { - if form != nil { - auth.AssignForm(form, ctx.Data) +func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, f interface{}) { + if f != nil { + form.Assign(f, ctx.Data) } ctx.Flash.ErrorMsg = msg ctx.Data["Flash"] = ctx.Flash |