migrate.tmpl 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {{template "base/head" .}}
  2. <div class="repository new migrate">
  3. <div class="ui middle very relaxed page grid">
  4. <div class="column">
  5. <form class="ui form" action="{{.Link}}" method="post">
  6. {{.CsrfTokenHtml}}
  7. <h3 class="ui top attached header">
  8. {{.i18n.Tr "new_migrate"}}
  9. </h3>
  10. <div class="ui attached segment">
  11. {{template "base/alert" .}}
  12. <div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
  13. <label for="clone_addr">{{.i18n.Tr "repo.migrate.clone_address"}}</label>
  14. <input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
  15. <span class="help">{{.i18n.Tr "repo.migrate.clone_address_desc"}}</span>
  16. </div>
  17. <div class="ui accordion optional field">
  18. <div class="title {{if .Err_Auth}}text red active{{end}}">
  19. <i class="icon dropdown"></i>
  20. {{.i18n.Tr "repo.need_auth"}}
  21. </div>
  22. <div class="content {{if .Err_Auth}}active{{end}}">
  23. <div class="inline field {{if .Err_Auth}}error{{end}}">
  24. <label for="auth_username">{{.i18n.Tr "username"}}</label>
  25. <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
  26. </div>
  27. <input class="fake" type="password">
  28. <div class="inline field {{if .Err_Auth}}error{{end}}">
  29. <label for="auth_password">{{.i18n.Tr "password"}}</label>
  30. <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
  31. </div>
  32. </div>
  33. </div>
  34. <div class="ui divider"></div>
  35. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  36. <label>{{.i18n.Tr "repo.owner"}}</label>
  37. <div class="ui selection dropdown">
  38. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
  39. <span class="text">
  40. <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
  41. {{.ContextUser.Name}}
  42. </span>
  43. <i class="dropdown icon"></i>
  44. <div class="menu">
  45. <div class="item" data-value="{{.SignedUser.Id}}">
  46. <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
  47. {{.SignedUser.Name}}
  48. </div>
  49. {{range .Orgs}}
  50. <div class="item" data-value="{{.Id}}">
  51. <img class="ui mini image" src="{{.AvatarLink}}">
  52. {{.Name}}
  53. </div>
  54. {{end}}
  55. </div>
  56. </div>
  57. </div>
  58. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  59. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  60. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
  61. </div>
  62. <div class="inline field">
  63. <label>{{.i18n.Tr "repo.visibility"}}</label>
  64. <div class="ui checkbox">
  65. <input name="private" type="checkbox" {{if .private}}checked{{end}}>
  66. <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
  67. </div>
  68. </div>
  69. <div class="inline field">
  70. <label>{{.i18n.Tr "repo.migrate_type"}}</label>
  71. <div class="ui checkbox">
  72. <input name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
  73. <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
  74. </div>
  75. </div>
  76. <div class="inline field {{if .Err_Description}}error{{end}}">
  77. <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
  78. <textarea id="description" name="description">{{.description}}</textarea>
  79. </div>
  80. <div class="inline field">
  81. <label></label>
  82. <button class="ui green button">
  83. {{.i18n.Tr "repo.migrate_repo"}}
  84. </button>
  85. <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
  86. </div>
  87. </div>
  88. </form>
  89. </div>
  90. </div>
  91. </div>
  92. {{template "base/footer" .}}