diff options
author | 6543 <6543@obermui.de> | 2021-03-01 01:47:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 01:47:30 +0100 |
commit | a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8 (patch) | |
tree | 92edf61ff2447e067a676832844a129050b4ec0f /templates/repo/settings/options.tmpl | |
parent | e0900310c4354311362ef69d15c302c215eaa2a2 (diff) | |
download | gitea-a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8.tar.gz gitea-a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8.zip |
Repository transfer has to be confirmed, if user can not create repo for new owner (#14792)
* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination
* if new pending transfer ocured, create UI & Mail notifications
Diffstat (limited to 'templates/repo/settings/options.tmpl')
-rw-r--r-- | templates/repo/settings/options.tmpl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index e85451ac39..b69f90f9c5 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -444,11 +444,23 @@ {{end}} <div class="item"> <div class="ui right"> - <button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button> + {{if .RepoTransfer}} + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="action" value="cancel_transfer"> + <button class="ui red button">{{.i18n.Tr "repo.settings.transfer_abort"}}</button> + </form> + {{ else }} + <button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button> + {{ end }} </div> <div> <h5>{{.i18n.Tr "repo.settings.transfer"}}</h5> - <p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p> + {{if .RepoTransfer}} + <p>{{.i18n.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}}</p> + {{else}} + <p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p> + {{end}} </div> </div> @@ -599,7 +611,7 @@ <div class="text right actions"> <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div> - <button class="ui red button">{{.i18n.Tr "repo.settings.make_transfer"}}</button> + <button class="ui red button">{{.i18n.Tr "repo.settings.transfer_perform"}}</button> </div> </form> </div> |