Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-02 20:34:31 +0300
committerPhil Hughes <me@iamphill.com>2016-03-11 12:51:07 +0300
commitc4baf2417fec7b8a65b6cafe515f73ea1a3474f4 (patch)
treecfbd398b96b6691d8b484b29d77d11c5bfa96415 /app/views/profiles
parent4d4573268e055606c90dfe1c433b1a331e696378 (diff)
Fixed issue with 2fa not enabling
Added in disable button for 2fa
Diffstat (limited to 'app/views/profiles')
-rw-r--r--app/views/profiles/accounts/show.html.haml8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml
index 9fe064e5883..a5417655001 100644
--- a/app/views/profiles/accounts/show.html.haml
+++ b/app/views/profiles/accounts/show.html.haml
@@ -57,12 +57,18 @@
= current_user.otp_secret.scan(/.{4}/).join(' ')
%p.two-factor-new-manual-content
Time based: Yes
- = form_for @user, url: "", method: :put do |f|
+ = form_for @user, url: profile_two_factor_auth_path, method: :post do |f|
+ - if flash[:error]
+ .alert.alert-danger
+ = flash[:error]
.form-group
= label_tag :pin_code, nil, class: "label-light"
= text_field_tag :pin_code, nil, class: "form-control", required: true
.prepend-top-default
= submit_tag 'Enable two-factor authentication', class: 'btn btn-success'
+ - else
+ = link_to 'Disable Two-factor Authentication', profile_two_factor_auth_path, method: :delete, class: 'btn btn-danger',
+ data: { confirm: 'Are you sure?' }
%hr
- if button_based_providers.any?
.row.prepend-top-default