From 0cdc3ffb7bccc3af6ab286d2fa18c0d4a41e712f Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 29 Jul 2019 13:46:50 +0200 Subject: [PATCH] Fixed bug #2675: Follow up to 9503ff20cefcfc39cb451562d7ec4fd440198564 - Linking auth provider account from profile fails. --- .../app/controllers/_profile/linked_accounts.coffee | 6 ++++++ .../app/views/profile/linked_accounts.jst.eco | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_profile/linked_accounts.coffee b/app/assets/javascripts/app/controllers/_profile/linked_accounts.coffee index 7e3a8b14c..a5c431bbd 100644 --- a/app/assets/javascripts/app/controllers/_profile/linked_accounts.coffee +++ b/app/assets/javascripts/app/controllers/_profile/linked_accounts.coffee @@ -2,6 +2,7 @@ class Index extends App.ControllerSubContent requiredPermission: 'user_preferences.linked_accounts' header: 'Linked Accounts' events: + 'click .js-add': 'add' 'click .js-remove': 'remove' constructor: -> @@ -20,6 +21,11 @@ class Index extends App.ControllerSubContent auth_providers: auth_providers ) + add: (e) => + e.preventDefault() + key = $(e.target).data('key') + @el.find(".js-addForm-#{key}").submit() + remove: (e) => e.preventDefault() provider = $(e.target).data('provider') diff --git a/app/assets/javascripts/app/views/profile/linked_accounts.jst.eco b/app/assets/javascripts/app/views/profile/linked_accounts.jst.eco index 4f184ad97..e57bd683b 100644 --- a/app/assets/javascripts/app/views/profile/linked_accounts.jst.eco +++ b/app/assets/javascripts/app/views/profile/linked_accounts.jst.eco @@ -7,12 +7,16 @@ - \ No newline at end of file +