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.

104 lines
4.1 KiB

  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">
  16. {{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}}
  17. {{if .LFSActive}}<br/>{{.i18n.Tr "repo.migrate.lfs_mirror_unsupported"}}{{end}}
  18. </span>
  19. </div>
  20. <div class="ui accordion optional field">
  21. <div class="title {{if .Err_Auth}}text red active{{end}}">
  22. <i class="icon dropdown"></i>
  23. {{.i18n.Tr "repo.need_auth"}}
  24. </div>
  25. <div class="content {{if .Err_Auth}}active{{end}}">
  26. <div class="inline field {{if .Err_Auth}}error{{end}}">
  27. <label for="auth_username">{{.i18n.Tr "username"}}</label>
  28. <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
  29. </div>
  30. <input class="fake" type="password">
  31. <div class="inline field {{if .Err_Auth}}error{{end}}">
  32. <label for="auth_password">{{.i18n.Tr "password"}}</label>
  33. <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
  34. </div>
  35. </div>
  36. </div>
  37. <div class="ui divider"></div>
  38. <div class="inline required field {{if .Err_Owner}}error{{end}}">
  39. <label>{{.i18n.Tr "repo.owner"}}</label>
  40. <div class="ui selection owner dropdown">
  41. <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
  42. <span class="text">
  43. <img class="ui mini image" src="{{.ContextUser.RelAvatarLink}}">
  44. {{.ContextUser.ShortName 20}}
  45. </span>
  46. <i class="dropdown icon"></i>
  47. <div class="menu">
  48. <div class="item" data-value="{{.SignedUser.ID}}">
  49. <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}">
  50. {{.SignedUser.ShortName 20}}
  51. </div>
  52. {{range .Orgs}}
  53. <div class="item" data-value="{{.ID}}">
  54. <img class="ui mini image" src="{{.RelAvatarLink}}">
  55. {{.ShortName 20}}
  56. </div>
  57. {{end}}
  58. </div>
  59. </div>
  60. </div>
  61. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  62. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  63. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
  64. </div>
  65. <div class="inline field">
  66. <label>{{.i18n.Tr "repo.visibility"}}</label>
  67. <div class="ui checkbox">
  68. {{if .IsForcedPrivate}}
  69. <input name="private" type="checkbox" checked readonly>
  70. <label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
  71. {{else}}
  72. <input name="private" type="checkbox" {{if .private}}checked{{end}}>
  73. <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
  74. {{end}}
  75. </div>
  76. </div>
  77. <div class="inline field">
  78. <label>{{.i18n.Tr "repo.migrate_type"}}</label>
  79. <div class="ui checkbox">
  80. <input name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
  81. <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
  82. </div>
  83. </div>
  84. <div class="inline field {{if .Err_Description}}error{{end}}">
  85. <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
  86. <textarea id="description" name="description">{{.description}}</textarea>
  87. </div>
  88. <div class="inline field">
  89. <label></label>
  90. <button class="ui green button">
  91. {{.i18n.Tr "repo.migrate_repo"}}
  92. </button>
  93. <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
  94. </div>
  95. </div>
  96. </form>
  97. </div>
  98. </div>
  99. </div>
  100. {{template "base/footer" .}}