diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-02 20:34:31 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-11 12:51:07 +0300 |
commit | c4baf2417fec7b8a65b6cafe515f73ea1a3474f4 (patch) | |
tree | cfbd398b96b6691d8b484b29d77d11c5bfa96415 /app/views/profiles | |
parent | 4d4573268e055606c90dfe1c433b1a331e696378 (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.haml | 8 |
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 |