File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ const (
2525func NewDiffPatch (ctx * context.Context ) {
2626 canCommit := renderCommitRights (ctx )
2727
28+ ctx .Data ["PageIsPatch" ] = true
29+
2830 ctx .Data ["TreePath" ] = ""
2931
3032 ctx .Data ["commit_summary" ] = ""
@@ -51,6 +53,7 @@ func NewDiffPatchPost(ctx *context.Context) {
5153 if form .CommitChoice == frmCommitChoiceNewBranch {
5254 branchName = form .NewBranchName
5355 }
56+ ctx .Data ["PageIsPatch" ] = true
5457 ctx .Data ["TreePath" ] = ""
5558 ctx .Data ["BranchLink" ] = ctx .Repo .RepoLink + "/src/" + ctx .Repo .BranchNameSubURL ()
5659 ctx .Data ["FileContent" ] = form .Content
Original file line number Diff line number Diff line change 99 {{.locale.Tr "repo.editor.commit_changes"}}
1010 {{- end}}</h3>
1111 <div class="field">
12- <input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else}}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
12+ <input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else if .PageIsPatch}}{{.locale.Tr "repo.editor.patch"}}{{else }}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
1313 </div>
1414 <div class="field">
1515 <textarea name="commit_message" placeholder="{{.locale.Tr "repo.editor.commit_message_desc"}}" rows="5">{{.commit_message}}</textarea>
You can’t perform that action at this time.
0 commit comments