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'];