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.

81 lines
3.4 KiB

10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div class="container" id="body">
  4. <form action="/repo/create" method="post" class="form-horizontal card" id="repo-create">
  5. {{.CsrfTokenHtml}}
  6. <h3>Create New Repository</h3>
  7. {{template "base/alert" .}}
  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</label>
  24. <div class="col-md-8">
  25. <div class="checkbox">
  26. <label>
  27. <input type="checkbox" name="private" {{if .private}}checked{{end}}>
  28. <strong>This repository is private</strong>
  29. </label>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="form-group {{if .Err_Description}}has-error has-feedback{{end}}">
  34. <label class="col-md-2 control-label">Description</label>
  35. <div class="col-md-8">
  36. <textarea name="desc" class="form-control" placeholder="Type your repository description">{{.desc}}</textarea>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <label class="col-md-2 control-label">Language</label>
  41. <div class="col-md-8">
  42. <select class="form-control" name="language">
  43. <option value="">Select a language</option>
  44. {{range .LanguageIgns}}<option value="{{.}}">{{.}}</option>{{end}}
  45. </select>
  46. </div>
  47. </div>
  48. <div class="form-group">
  49. <label class="col-md-2 control-label">License</label>
  50. <div class="col-md-8">
  51. <select class="form-control" name="license">
  52. <option value="">Select a license</option>
  53. {{range .Licenses}}<option value="{{.}}">{{.}}</option>{{end}}
  54. </select>
  55. </div>
  56. </div>
  57. <div class="form-group">
  58. <div class="col-md-8 col-md-offset-2">
  59. <div class="checkbox">
  60. <label>
  61. <input type="checkbox" name="initReadme" {{if .initReadme}}checked{{end}}>
  62. <strong>Initialize this repository with a README</strong>
  63. </label>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="form-group">
  68. <div class="col-md-offset-2 col-md-8">
  69. <button type="submit" class="btn btn-lg btn-primary">Create repository</button>
  70. <a href="/" class="text-danger">Cancel</a>
  71. </div>
  72. </div>
  73. </form>
  74. </div>
  75. {{template "base/footer" .}}