diff options
-rw-r--r-- | modules/auth/repo_form.go | 7 | ||||
-rw-r--r-- | templates/repo/wiki/new.tmpl | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index bb917a9114..f066fc630f 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -362,10 +362,9 @@ func (f *EditReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) bi // NewWikiForm form for creating wiki type NewWikiForm struct { - OldTitle string - Title string `binding:"Required"` - Content string `binding:"Required"` - Message string + Title string `binding:"Required"` + Content string `binding:"Required"` + Message string } // Validate validates the fields diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index cb928b2830..302e5210ec 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -13,12 +13,11 @@ </div> <form class="ui form" action="{{.Link}}" method="post"> {{.CsrfTokenHtml}} - <input type="hidden" name="old_title" value="{{.old_title}}"> <div class="field {{if .Err_Title}}error{{end}}"> <input name="title" value="{{.title}}" autofocus required> </div> <div class="field"> - <textarea id="edit_area" name="content" data-id="wiki-{{.old_title}}" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}/wiki">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea required> + <textarea id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}/wiki">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea required> </div> <div class="field"> <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}"> |