Files
gitea/templates/repo/migrate/codecommit.tmpl
T
wxiaoguang cc623c5f2f refactor: clean up git migration forms (#39672)
Only extracted shared code, removed unnecessary code, and use
form-fetch-action to replace RenderWithErrDeprecated, slightly
refactored JS to use data-global-init

Nothing else is changed, although there are still many problems.

Written by AI

Diff with hiding spaces:
https://github.com/go-gitea/gitea/pull/39672/changes?w=1
2026-10-08 10:36:08 +02:00

65 lines
2.4 KiB
Handlebars

{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content repository new migrate">
<div class="ui container medium-width">
<h3 class="ui top attached header">
{{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<form class="ui form left-right-form form-fetch-action" action="{{.Link}}" method="post">
{{template "repo/migrate/common-init" (dict "ServiceType" .service)}}
<div class="inline required field">
<label>{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input name="clone_addr" autofocus required>
<span class="help">
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline required field">
<label>{{ctx.Locale.Tr "repo.migrate.codecommit.aws_access_key_id"}}</label>
<input name="aws_access_key_id" required>
</div>
<div class="inline required field">
<label>{{ctx.Locale.Tr "repo.migrate.codecommit.aws_secret_access_key"}}</label>
<input name="aws_secret_access_key" type="password" required>
</div>
<div class="inline required field">
<label>{{ctx.Locale.Tr "repo.migrate.codecommit.https_git_credentials_username"}}</label>
<input name="auth_username" required>
</div>
<div class="inline required field">
<label>{{ctx.Locale.Tr "repo.migrate.codecommit.https_git_credentials_password"}}</label>
<input name="auth_password" type="password" required>
</div>
{{if not .DisableNewPullMirrors}}
<div class="inline field">
<label>{{ctx.Locale.Tr "repo.migrate_options"}}</label>
<div class="ui checkbox">
<input name="mirror" type="checkbox" {{if .mirror}} checked{{end}}>
<label>{{ctx.Locale.Tr "repo.migrate_options_mirror_helper"}}</label>
</div>
</div>
{{end}}
<div id="migrate_items">
<div class="inline field">
<label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox">
<label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests"}}</label>
</div>
</div>
</div>
<div class="divider"></div>
{{template "repo/migrate/common-migrated-repo"}}
</form>
</div>
</div>
</div>
{{template "base/footer" .}}