From 2108e8b4aac5b6dbd116be5dc006af81a506ba89 Mon Sep 17 00:00:00 2001
From: Daniel Kesselberg
Date: Fri, 25 Oct 2019 21:26:19 +0200
Subject: [PATCH 1/3] Add icon-confirm-white to submit button
Signed-off-by: Daniel Kesselberg
---
core/templates/loginflowv2/grant.php | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php
index e5991d11a2..6164fab6bc 100644
--- a/core/templates/loginflowv2/grant.php
+++ b/core/templates/loginflowv2/grant.php
@@ -42,8 +42,7 @@ $urlGenerator = $_['urlGenerator'];
-
-
+
From 1d82bb55dbf9a8f12603570a7203ce80b818f443 Mon Sep 17 00:00:00 2001
From: Daniel Kesselberg
Date: Fri, 25 Oct 2019 21:26:41 +0200
Subject: [PATCH 2/3] Move "you can close this window" to newline
Signed-off-by: Daniel Kesselberg
---
core/templates/loginflowv2/done.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/templates/loginflowv2/done.php b/core/templates/loginflowv2/done.php
index f86f11ee14..8b9dc3649e 100644
--- a/core/templates/loginflowv2/done.php
+++ b/core/templates/loginflowv2/done.php
@@ -30,7 +30,8 @@ style('core', 'login/authpicker');
t('Account connected')) ?>
- t('Your client should now be connected! You can close this window.')) ?>
+ t('Your client should now be connected!')) ?>
+ t('You can close this window.')) ?>
From 71c74427907a8ce3372127c38d7568bc813c0f3e Mon Sep 17 00:00:00 2001
From: Daniel Kesselberg
Date: Sat, 26 Oct 2019 23:08:52 +0200
Subject: [PATCH 3/3] The loading animation is back
Refactor grant.js to Vanilla JS
Remove id="submit" because of side effects: https://stackoverflow.com/questions/22982741/form-submit-jquery-does-not-work
Fix arrow for login flow v1
Signed-off-by: Daniel Kesselberg
---
core/js/login/grant.js | 17 +++++++++--------
core/templates/loginflow/grant.php | 3 +--
core/templates/loginflowv2/grant.php | 3 ++-
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/core/js/login/grant.js b/core/js/login/grant.js
index c3c3371b17..c8913f937b 100644
--- a/core/js/login/grant.js
+++ b/core/js/login/grant.js
@@ -1,9 +1,10 @@
-jQuery(document).ready(function() {
- $('#submit').click(function (e) {
- $('#submit + .submit-icon')
- .removeClass('icon-confirm-white')
- .addClass(OCA.Theming && OCA.Theming.inverted
- ? 'icon-loading-small'
- : 'icon-loading-small-dark');
+document.querySelector('form').addEventListener('submit', function(e) {
+ const wrapper = document.getElementById('submit-wrapper')
+ if (wrapper === null) {
+ return
+ }
+ wrapper.getElementsByClassName('icon-confirm-white').forEach(function(el) {
+ el.classList.remove('icon-confirm-white')
+ el.classList.add(OCA.Theming && OCA.Theming.inverted ? 'icon-loading-small' : 'icon-loading-small-dark')
})
-})
\ No newline at end of file
+})
diff --git a/core/templates/loginflow/grant.php b/core/templates/loginflow/grant.php
index 017bb1f23c..2321d3714f 100644
--- a/core/templates/loginflow/grant.php
+++ b/core/templates/loginflow/grant.php
@@ -45,8 +45,7 @@ $urlGenerator = $_['urlGenerator'];