Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions core/js/login/grant.js
Original file line number Diff line number Diff line change
@@ -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')
})
})
})
3 changes: 1 addition & 2 deletions core/templates/loginflow/grant.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
<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>
Expand Down
3 changes: 2 additions & 1 deletion core/templates/loginflowv2/done.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<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/>
Expand Down
4 changes: 2 additions & 2 deletions core/templates/loginflowv2/grant.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
*/

script('core', 'login/grant');
style('core', 'login/authpicker');

/** @var array $_ */
Expand All @@ -42,8 +43,7 @@
<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>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. https://github.com/nextcloud/server/search?q=submit-icon&unscoped_q=submit-icon .submit-icon is used by grant.js but this script is only loaded for loginflow v1.

<input type="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Grant access')); ?>" />
</div>
</form>
</p>
Expand Down