summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-10-31 19:30:28 +0100
committerGitHub <noreply@github.com>2019-10-31 19:30:28 +0100
commit4326b03b13f858a38a4b0703aaaecf839fc0c03a (patch)
tree71e874047d32239b1de6a0e434de3cfc3f4425d1
parentfd475d421232e3d83103304002bce23a0b267a60 (diff)
parent71c74427907a8ce3372127c38d7568bc813c0f3e (diff)
downloadnextcloud-server-4326b03b13f858a38a4b0703aaaecf839fc0c03a.tar.gz
nextcloud-server-4326b03b13f858a38a4b0703aaaecf839fc0c03a.zip
Merge pull request #17683 from nextcloud/enh/login-flow-v2-polish
Polish login flow v2
-rw-r--r--core/js/login/grant.js17
-rw-r--r--core/templates/loginflow/grant.php3
-rw-r--r--core/templates/loginflowv2/done.php3
-rw-r--r--core/templates/loginflowv2/grant.php4
4 files changed, 14 insertions, 13 deletions
diff --git a/core/js/login/grant.js b/core/js/login/grant.js
index c3c3371b17e..c8913f937bb 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 017bb1f23cf..2321d3714f3 100644
--- a/core/templates/loginflow/grant.php
+++ b/core/templates/loginflow/grant.php
@@ -45,8 +45,7 @@ $urlGenerator = $_['urlGenerator'];
<input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
<input type="hidden" name="oauthState" value="<?php p($_['oauthState']) ?>" />
<div id="submit-wrapper">
- <input type="submit" id="submit" class="login primary" title="" value="<?php p($l->t('Grant access')); ?>" />
- <div class="submit-icon icon-confirm-white"></div>
+ <input type="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Grant access')); ?>" />
</div>
</form>
</p>
diff --git a/core/templates/loginflowv2/done.php b/core/templates/loginflowv2/done.php
index f86f11ee14c..8b9dc3649e1 100644
--- a/core/templates/loginflowv2/done.php
+++ b/core/templates/loginflowv2/done.php
@@ -30,7 +30,8 @@ style('core', 'login/authpicker');
<div class="picker-window">
<h2><?php p($l->t('Account connected')) ?></h2>
<p class="info">
- <?php print_unescaped($l->t('Your client should now be connected! You can close this window.')) ?>
+ <?php p($l->t('Your client should now be connected!')) ?><br/>
+ <?php p($l->t('You can close this window.')) ?>
</p>
<br/>
diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php
index e5991d11a25..c8ea22dca8b 100644
--- a/core/templates/loginflowv2/grant.php
+++ b/core/templates/loginflowv2/grant.php
@@ -19,6 +19,7 @@
*
*/
+script('core', 'login/grant');
style('core', 'login/authpicker');
/** @var array $_ */
@@ -42,8 +43,7 @@ $urlGenerator = $_['urlGenerator'];
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
<input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
<div id="submit-wrapper">
- <input type="submit" id="submit" class="login primary" title="" value="<?php p($l->t('Grant access')); ?>" />
- <div class="submit-icon icon-confirm-white"></div>
+ <input type="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Grant access')); ?>" />
</div>
</form>
</p>