migrate.tmpl 4.1 KB

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