aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-04-27 12:27:36 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-04-28 23:41:38 -0300
commit806ca43b527809e6b37573b6995535638102039c (patch)
tree6fa63aa1c0db8207295645d06a37cd31cce6fa32 /settings/js
parent9480b29413daba34432885642b575065ed5f5d6d (diff)
downloadnextcloud-server-806ca43b527809e6b37573b6995535638102039c.tar.gz
nextcloud-server-806ca43b527809e6b37573b6995535638102039c.zip
allow to display the verification code also while verification is already running
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/federationsettingsview.js2
-rw-r--r--settings/js/personal.js14
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');
});
}