You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
2.4 KiB

  1. <div class="commit-form-wrapper">
  2. <img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.AvatarLink}}">
  3. <div class="commit-form">
  4. <h3>{{.i18n.Tr "repo.editor.commit_changes"}}</h3>
  5. <div class="field">
  6. <input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.i18n.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.i18n.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.i18n.Tr "repo.editor.add_tmpl" .TreePath}}{{else}}{{.i18n.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
  7. </div>
  8. <div class="field">
  9. <textarea name="commit_message" placeholder="{{.i18n.Tr "repo.editor.commit_message_desc"}}" rows="5">{{.commit_message}}</textarea>
  10. </div>
  11. <div class="quick-pull-choice js-quick-pull-choice">
  12. <div class="field">
  13. <div class="ui radio checkbox">
  14. <input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="direct" {{if eq .commit_choice "direct"}}checked{{end}}>
  15. <label>
  16. <i class="octicon octicon-git-commit" height="16" width="14"></i>
  17. {{.i18n.Tr "repo.editor.commit_directly_to_this_branch" .BranchName | Safe}}
  18. </label>
  19. </div>
  20. </div>
  21. <div class="field">
  22. <div class="ui radio checkbox">
  23. <input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="commit-to-new-branch" {{if eq .commit_choice "commit-to-new-branch"}}checked{{end}}>
  24. <label>
  25. <i class="octicon octicon-git-pull-request" height="16" width="12"></i>
  26. {{.i18n.Tr "repo.editor.create_new_branch" | Safe}}
  27. </label>
  28. </div>
  29. </div>
  30. <div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}hide{{end}}">
  31. <div class="new-branch-name-input field {{if .Err_NewBranchName}}error{{end}}">
  32. <i class="octicon octicon-git-branch" height="16" width="10"></i>
  33. <input type="text" name="new_branch_name" value="{{.new_branch_name}}" class="input-contrast mr-2 js-quick-pull-new-branch-name" placeholder="{{.i18n.Tr "repo.editor.new_branch_name_desc"}}" {{if eq .commit_choice "commit-to-new-branch"}}required{{end}}>
  34. <span class="text-muted js-quick-pull-normalization-info"></span>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <button type="submit" class="ui green button">
  40. {{.i18n.Tr "repo.editor.commit_changes"}}
  41. </button>
  42. <a class="ui button red" href="{{EscapePound $.BranchLink}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.editor.cancel"}}</a>
  43. </div>