diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-04-01 17:36:11 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-04-01 17:36:11 +0300 |
commit | 04bb35a4b562fd57b14c55645bb1848a50cdef56 (patch) | |
tree | 1bd1ac2af6a5c088ac2529cdbccceeca402d3ebe /app/assets/javascripts/mirrors/ssh_mirror.js | |
parent | ade207e575ab846f6d354aaccc1382a6e512dd0d (diff) | |
parent | b8118a65d595040bfce2d83d5e38dd63ebfedb58 (diff) | |
download | gitlab-ce-id-split-self-approval-restrictions.tar.gz |
Merge branch 'master' into id-split-self-approval-restrictionsid-split-self-approval-restrictions
Diffstat (limited to 'app/assets/javascripts/mirrors/ssh_mirror.js')
-rw-r--r-- | app/assets/javascripts/mirrors/ssh_mirror.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/assets/javascripts/mirrors/ssh_mirror.js b/app/assets/javascripts/mirrors/ssh_mirror.js index 5bdf5d6277a..547c078ec55 100644 --- a/app/assets/javascripts/mirrors/ssh_mirror.js +++ b/app/assets/javascripts/mirrors/ssh_mirror.js @@ -20,6 +20,7 @@ export default class SSHMirror { this.$btnDetectHostKeys = this.$form.find('.js-detect-host-keys'); this.$btnSSHHostsShowAdvanced = this.$form.find('.btn-show-advanced'); this.$dropdownAuthType = this.$form.find('.js-mirror-auth-type'); + this.$hiddenAuthType = this.$form.find('.js-hidden-mirror-auth-type'); this.$wellAuthTypeChanging = this.$form.find('.js-well-changing-auth'); this.$wellPasswordAuth = this.$form.find('.js-well-password-auth'); @@ -167,6 +168,7 @@ export default class SSHMirror { this.$wellPasswordAuth.collapse('hide'); this.$wellSSHAuth.collapse('hide'); + this.updateHiddenAuthType(selectedAuthType); // This request should happen only if selected Auth type was SSH // and SSH Public key was not present on page load @@ -234,6 +236,12 @@ export default class SSHMirror { toggleAuthWell(authType) { this.$wellPasswordAuth.collapse(authType === AUTH_METHOD.PASSWORD ? 'show' : 'hide'); this.$wellSSHAuth.collapse(authType === AUTH_METHOD.SSH ? 'show' : 'hide'); + this.updateHiddenAuthType(authType); + } + + updateHiddenAuthType(authType) { + this.$hiddenAuthType.val(authType); + this.$hiddenAuthType.prop('disabled', authType === AUTH_METHOD.SSH); } /** |