diff options
author | Michael Kuhn <suraia@ikkoku.de> | 2017-11-21 04:49:33 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-21 11:49:33 +0800 |
commit | 420fc8efc24d7a77598307557e5b38077d0efafc (patch) | |
tree | 9e94b3b70771e2ab053fab8ace2dd19f6f882d5b /templates | |
parent | 1f7aab6e1976a58fef4c0f328d7ed30a30d3b476 (diff) | |
download | gitea-420fc8efc24d7a77598307557e5b38077d0efafc.tar.gz gitea-420fc8efc24d7a77598307557e5b38077d0efafc.zip |
Disable add key button if SSH is disabled (#2873)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/settings/deploy_keys.tmpl | 4 | ||||
-rw-r--r-- | templates/user/settings/keys_ssh.tmpl | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index f082fde86b..caf9f29ce5 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -7,7 +7,11 @@ <h4 class="ui top attached header"> {{.i18n.Tr "repo.settings.deploy_keys"}} <div class="ui right"> + {{if not .DisableSSH}} <div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div> + {{else}} + <div class="ui blue tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div> + {{end}} </div> </h4> <div class="ui attached segment"> diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index 1bdf0b15b1..18fd918012 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -1,7 +1,11 @@ <h4 class="ui top attached header"> {{.i18n.Tr "settings.manage_ssh_keys"}} <div class="ui right"> + {{if not .DisableSSH}} <div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div> + {{else}} + <div class="ui blue tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div> + {{end}} </div> </h4> <div class="ui attached segment"> |