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.

98 lines
4.4 KiB

10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div class="container" id="body">
  4. <form action="/repo/migrate" method="post" class="form-horizontal card" id="repo-create">
  5. {{.CsrfTokenHtml}}
  6. <h3>Repository Migration</h3>
  7. {{template "base/alert" .}}
  8. <!-- <div class="form-group">
  9. <label class="col-md-2 control-label">From<strong class="text-danger">*</strong></label>
  10. <div class="col-md-8">
  11. <select class="form-control" name="from">
  12. <option value="github">GitHub</option>
  13. </select>
  14. </div>
  15. </div> -->
  16. <div class="form-group">
  17. <label class="col-md-2 control-label">HTTPS URL<strong class="text-danger">*</strong></label>
  18. <div class="col-md-8">
  19. <input name="url" type="text" class="form-control" placeholder="Type your migration repository HTTPS URL" value="{{.url}}" required="required" >
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <div class="col-md-offset-2 col-md-8">
  24. <a class="btn btn-default" data-toggle="collapse" data-target="#repo-import-auth">Need Authorization</a>
  25. </div>
  26. <div id="repo-import-auth" class="collapse">
  27. <div class="form-group">
  28. <label class="col-md-2 control-label">Username</label>
  29. <div class="col-md-8">
  30. <input name="auth_username" type="text" class="form-control" placeholder="Type your user name" value="{{.auth_username}}" >
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-md-2 control-label">Password</label>
  35. <div class="col-md-8">
  36. <input name="auth_password" type="password" class="form-control" placeholder="Type your password" value="{{.auth_password}}" >
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <hr/>
  42. <div class="form-group">
  43. <label class="col-md-2 control-label">Owner<strong class="text-danger">*</strong></label>
  44. <div class="col-md-8">
  45. <p class="form-control-static">{{.SignedUserName}}</p>
  46. <input type="hidden" value="{{.SignedUserId}}" name="userId"/>
  47. </div>
  48. </div>
  49. <div class="form-group {{if .Err_RepoName}}has-error has-feedback{{end}}">
  50. <label class="col-md-2 control-label">Repository<strong class="text-danger">*</strong></label>
  51. <div class="col-md-8">
  52. <input name="repo" type="text" class="form-control" placeholder="Type your repository name" value="{{.repo}}" required="required">
  53. <span class="help-block">Great repository names are short and memorable. </span>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="col-md-2 control-label">Migration Type</label>
  58. <div class="col-md-8">
  59. <div class="checkbox">
  60. <label>
  61. <input type="checkbox" name="mirror" {{if .mirror}}checked{{end}}>
  62. <strong>This repository is a mirror</strong>
  63. </label>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="form-group">
  68. <label class="col-md-2 control-label">Visibility</label>
  69. <div class="col-md-8">
  70. <div class="checkbox">
  71. <label>
  72. <input type="checkbox" name="private" {{if .private}}checked{{end}}>
  73. <strong>This repository is private</strong>
  74. </label>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="form-group {{if .Err_Description}}has-error has-feedback{{end}}">
  79. <label class="col-md-2 control-label">Description</label>
  80. <div class="col-md-8">
  81. <textarea name="desc" class="form-control" placeholder="Type your repository description">{{.desc}}</textarea>
  82. </div>
  83. </div>
  84. <div class="form-group">
  85. <div class="col-md-offset-2 col-md-8">
  86. <button type="submit" class="btn btn-lg btn-primary">Migrate repository</button>
  87. <a href="/" class="text-danger">Cancel</a>
  88. </div>
  89. </div>
  90. </form>
  91. </div>
  92. {{template "base/footer" .}}