Skip to content

Commit

Permalink
Allow committing / adding empty files from the web ui (go-gitea#8420)
Browse files Browse the repository at this point in the history
Signed-off-by: LukBukkit <[email protected]>
  • Loading branch information
lukbukkit committed Oct 16, 2019
1 parent d4cd4ed commit 1f2ec0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/auth/repo_form.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ func (f *NewWikiForm) Validate(ctx *macaron.Context, errs binding.Errors) bindin
// EditRepoFileForm form for changing repository file
type EditRepoFileForm struct {
TreePath string `binding:"Required;MaxSize(500)"`
Content string `binding:"Required"`
Content string
CommitSummary string `binding:"MaxSize(100)"`
CommitMessage string
CommitChoice string `binding:"Required;MaxSize(50)"`
Expand Down
3 changes: 1 addition & 2 deletions templates/repo/editor/edit.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
data-url="{{.Repository.APIURL}}/markdown"
data-context="{{.RepoLink}}"
data-markdown-file-exts="{{.MarkdownFileExts}}"
data-line-wrap-extensions="{{.LineWrapExtensions}}"
required>
data-line-wrap-extensions="{{.LineWrapExtensions}}">
{{.FileContent}}</textarea>
</div>
<div class="ui bottom attached tab segment markdown" data-tab="preview">
Expand Down

0 comments on commit 1f2ec0b

Please sign in to comment.