diff options
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/federationsettingsview.js | 2 | ||||
-rw-r--r-- | settings/js/personal.js | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index e8c6a84e1ec..f89aad2afd4 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -167,10 +167,12 @@ var verifyStatus = this.$('#' + field + 'form > .verify > #verify-' + field); verifyStatus.attr('title', t('core', 'Verify')); verifyStatus.attr('src', OC.imagePath('core', 'actions/verify.svg')); + verifyStatus.data('status', '0'); verifyStatus.addClass('verify-action'); } else if (field === 'email') { var verifyStatus = this.$('#' + field + 'form > .verify > #verify-' + field); verifyStatus.attr('title', t('core', 'Verifying …')); + verifyStatus.data('status', '1'); verifyStatus.attr('src', OC.imagePath('core', 'actions/verifying.svg')); } } diff --git a/settings/js/personal.js b/settings/js/personal.js index 3249382a88c..cd9fd3498b8 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -215,18 +215,26 @@ $(document).ready(function () { var verify = $(this); var indicator = $(this).children('img'); var accountId = indicator.attr('id'); + var status = indicator.data('status'); + + var onlyVerificationCode = false; + if (parseInt(status) === 1) { + onlyVerificationCode = true; + } if (indicator.hasClass('verify-action')) { $.ajax( OC.generateUrl('/settings/users/{account}/verify', {account: accountId}), - {method: 'GET'} + { + method: 'GET', + data: {onlyVerificationCode: onlyVerificationCode} + } ).done(function (data) { var dialog = verify.children('.verification-dialog'); showVerifyDialog($(dialog), data.msg, data.code); indicator.attr('title', t('core', 'Verifying …')); indicator.attr('src', OC.imagePath('core', 'actions/verifying.svg')); - indicator.removeClass('verify-action'); - + indicator.data('status', '1'); }); } |