migrate.tmpl 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. {{if .IsOwnedBy $.SignedUser.Id}}
  51. <div class="item" data-value="{{.Id}}">
  52. <img class="ui mini image" src="{{.AvatarLink}}">
  53. {{.Name}}
  54. </div>
  55. {{end}}
  56. {{end}}
  57. </div>
  58. </div>
  59. </div>
  60. <div class="inline required field {{if .Err_RepoName}}error{{end}}">
  61. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  62. <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
  63. </div>
  64. <div class="inline field">
  65. <label>{{.i18n.Tr "repo.visibility"}}</label>
  66. <div class="ui toggle checkbox">
  67. <input name="private" type="checkbox" {{if .private}}checked{{end}}>
  68. <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
  69. </div>
  70. </div>
  71. <div class="inline field">
  72. <label>{{.i18n.Tr "repo.migrate_type"}}</label>
  73. <div class="ui toggle checkbox">
  74. <input name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
  75. <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
  76. </div>
  77. </div>
  78. <div class="inline field {{if .Err_Description}}error{{end}}">
  79. <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
  80. <textarea id="description" name="description">{{.description}}</textarea>
  81. </div>
  82. <div class="inline field">
  83. <label></label>
  84. <button class="ui green button">
  85. {{.i18n.Tr "repo.migrate_repo"}}
  86. </button>
  87. <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
  88. </div>
  89. </div>
  90. </form>
  91. </div>
  92. </div>
  93. </div>
  94. {{template "base/footer" .}}