diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-06-02 20:21:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 21:21:38 -0400 |
commit | a6fd2f23f7e6bdc60c092207ac43af3a9a291f8f (patch) | |
tree | e9abecb2896bcb688235d8aba3a76281cde64873 /templates | |
parent | d0a18a12704360c06cf48b586956148a17a4505a (diff) | |
download | gitea-a6fd2f23f7e6bdc60c092207ac43af3a9a291f8f.tar.gz gitea-a6fd2f23f7e6bdc60c092207ac43af3a9a291f8f.zip |
Allow site admin to disable mirrors (#11740)
* Allow site admin to disable mirrors
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* No need to run through Safe
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Clarify only disabling NEW mirrors
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Apply suggestions from @guillep2k
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/migrate.tmpl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/templates/repo/migrate.tmpl b/templates/repo/migrate.tmpl index f30b59df3f..60b432beaa 100644 --- a/templates/repo/migrate.tmpl +++ b/templates/repo/migrate.tmpl @@ -81,8 +81,13 @@ <div class="inline field"> <label>{{.i18n.Tr "repo.migrate_type"}}</label> <div class="ui checkbox"> - <input id="mirror" name="mirror" type="checkbox" {{if .mirror}}checked{{end}}> - <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label> + {{if .DisableMirrors}} + <input id="mirror" name="mirror" type="checkbox" readonly> + <label>{{.i18n.Tr "repo.migrate_type_helper_disabled"}}</label> + {{else}} + <input id="mirror" name="mirror" type="checkbox" {{if .mirror}}checked{{end}}> + <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label> + {{end}} </div> </div> <div id="migrate_items" class="ui field"> |