diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-26 10:03:21 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-28 23:41:36 -0300 |
commit | 06265fe77028c9d04f00e411d1a43bf2718052e4 (patch) | |
tree | 754dbe633f5657d8d322fce1da7876dad720b991 /settings | |
parent | 2a07ec8e2198985f25641289f0b4d8b2bb76ed28 (diff) | |
download | nextcloud-server-06265fe77028c9d04f00e411d1a43bf2718052e4.tar.gz nextcloud-server-06265fe77028c9d04f00e411d1a43bf2718052e4.zip |
make use of verification buttons
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/css/settings.css | 2 | ||||
-rw-r--r-- | settings/js/personal.js | 11 | ||||
-rw-r--r-- | settings/templates/personal.php | 38 |
3 files changed, 26 insertions, 25 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index 29bcc8a37c3..597b5f4490b 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -144,7 +144,7 @@ input#openid, input#webdav { width:20em; } padding-top: 10px; } -#personal-settings-container .verify:hover { +#personal-settings-container .verify-action { cursor: pointer; } diff --git a/settings/js/personal.js b/settings/js/personal.js index d5b9b7911a0..41051d9e25f 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -208,15 +208,16 @@ $(document).ready(function () { dialog.style.display = "block"; }; - $(".verify").click(function () { - var account = $(this).attr('id'); - - // Add: make call to get content for verify dialog + $(".verify-action").click(function () { + var account = $(this); + var accountId = $(this).attr('id'); $.ajax( - OC.generateUrl('/settings/users/{account}/verify', {account: account}), + OC.generateUrl('/settings/users/{account}/verify', {account: accountId}), {method: 'GET'} ).done(function(data) { + account.attr('title', 'Verifying...'); + account.attr('src', OC.imagePath('core', 'actions/verifying.svg')); showVerifyDialog(data.msg, data.code); }); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index fade96f026e..cc30acfa025 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -111,19 +111,20 @@ <label for="email"><?php p($l->t('Email')); ?></label> <span class="icon-password"/> </h2> - <span class="verify" id="verify-email"><?php + <span class="verify"> + <img id="verify-email" <?php switch($_['emailVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - p('verification in progress'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="Verifying..."'); break; case \OC\Accounts\AccountManager::VERIFIED: - p('verified'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '" title="Verified"'); break; default: - p('click to verify'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="Verify"'); } - ?> - </span> + ?>> + </span> <input type="email" name="email" id="email" value="<?php p($_['email']); ?>" <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> placeholder="<?php p($l->t('Your email address')); ?>" @@ -176,19 +177,19 @@ <label for="website"><?php p($l->t('Website')); ?></label> <span class="icon-password"/> </h2> - <span class="verify" id="verify-website"> - <?php + <span class="verify"> + <img id="verify-website" <?php switch($_['websiteVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - p('verification in progress'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="Verifying..."'); break; case \OC\Accounts\AccountManager::VERIFIED: - p('verified'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '" title="Verified"'); break; default: - p('click to verify'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="Verify" class="verify-action"'); } - ?> + ?>> </span> <input type="text" name="website" id="website" value="<?php p($_['website']); ?>" placeholder="<?php p($l->t('Your website')); ?>" @@ -203,20 +204,19 @@ <label for="twitter"><?php p($l->t('Twitter')); ?></label> <span class="icon-password"/> </h2> - <span class="verify" id="verify-twitter"> - <?php + <span class="verify"> + <img id="verify-twitter" <?php switch($_['twitterVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - p('verification in progress'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="Verifying..."'); break; case \OC\Accounts\AccountManager::VERIFIED: - p('verified'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '" title="Verified"'); break; default: - p('click to verify'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="Verify" class="verify-action"'); } - ?> - </span> + ?>> <input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>" placeholder="<?php p($l->t('Your Twitter handle')); ?>" autocomplete="on" autocapitalize="none" autocorrect="off" /> |