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.

77 lines
3.4 KiB

10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div class="container" id="gogs-body">
  4. <form action="/repo/create" method="post" class="form-horizontal gogs-card" id="gogs-repo-create">
  5. {{.CsrfTokenHtml}}
  6. <h3>Create New Repository</h3>
  7. <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
  8. <div class="form-group">
  9. <label class="col-md-2 control-label">Owner<strong class="text-danger">*</strong></label>
  10. <div class="col-md-8">
  11. <p class="form-control-static">{{.SignedUserName}}</p>
  12. <input type="hidden" value="{{.SignedUserId}}" name="userId"/>
  13. </div>
  14. </div>
  15. <div class="form-group {{if .Err_RepoName}}has-error has-feedback{{end}}">
  16. <label class="col-md-2 control-label">Repository<strong class="text-danger">*</strong></label>
  17. <div class="col-md-8">
  18. <input name="repo" type="text" class="form-control" placeholder="Type your repository name" value="{{.repo}}" required="required">
  19. <span class="help-block">Great repository names are short and memorable. </span>
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label class="col-md-2 control-label">Visibility<strong class="text-danger">*</strong></label>
  24. <div class="col-md-8">
  25. <p class="form-control-static">Public</p>
  26. <input type="hidden" value="public" name="visibility"/>
  27. </div>
  28. </div>
  29. <div class="form-group {{if .Err_Description}}has-error has-feedback{{end}}">
  30. <label class="col-md-2 control-label">Description</label>
  31. <div class="col-md-8">
  32. <textarea name="desc" class="form-control" placeholder="Type your repository description">{{.desc}}</textarea>
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label class="col-md-2 control-label">Language</label>
  37. <div class="col-md-8">
  38. <select class="form-control" name="language">
  39. <option value="">Select a language</option>
  40. {{range .LanguageIgns}}<option value="{{.}}">{{.}}</option>{{end}}
  41. </select>
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label class="col-md-2 control-label">License</label>
  46. <div class="col-md-8">
  47. <select class="form-control" name="license">
  48. <option value="">Select a license</option>
  49. {{range .Licenses}}<option value="{{.}}">{{.}}</option>{{end}}
  50. </select>
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <div class="col-md-8 col-md-offset-2">
  55. <div class="checkbox">
  56. <label>
  57. <input type="checkbox" name="initReadme" {{if .initReadme}}checked{{end}}>
  58. <strong>Initialize this repository with a README</strong>
  59. </label>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="form-group">
  64. <div class="col-md-offset-2 col-md-8">
  65. <button type="submit" class="btn btn-lg btn-primary">Create repository</button>
  66. <a href="/" class="text-danger">Cancel</a>
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. {{template "base/footer" .}}