forked from forgejo/forgejo
Improve delete SSH key
This commit is contained in:
parent
7cb5a15c9b
commit
8ca14e2109
14 changed files with 49 additions and 101 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
"github.com/go-martini/martini"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/middleware/binding"
|
||||
)
|
||||
|
||||
|
@ -31,20 +30,6 @@ func (f *CreateIssueForm) Name(field string) string {
|
|||
}
|
||||
|
||||
func (f *CreateIssueForm) Validate(errors *binding.BindingErrors, req *http.Request, context martini.Context) {
|
||||
if req.Method == "GET" || errors.Count() == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
data := context.Get(reflect.TypeOf(base.TmplData{})).Interface().(base.TmplData)
|
||||
data["HasError"] = true
|
||||
AssignForm(f, data)
|
||||
|
||||
if len(errors.Overall) > 0 {
|
||||
for _, err := range errors.Overall {
|
||||
log.Error("CreateIssueForm.Validate: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
validate(errors, data, f)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue