diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-09 13:44:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 13:44:34 +0200 |
commit | c2f7396d6b0a1371355e21fd635763e1aae410fd (patch) | |
tree | 801c239ef7011b9a52d667e627fc29391888f01b | |
parent | bcfaaf5294f963f8b043d1b952ba8425feae12d4 (diff) | |
parent | 09d77b8973e221ffd65eb30ab37d6ab2d08ebf88 (diff) | |
download | nextcloud-server-c2f7396d6b0a1371355e21fd635763e1aae410fd.tar.gz nextcloud-server-c2f7396d6b0a1371355e21fd635763e1aae410fd.zip |
Merge pull request #6031 from nextcloud/master-5937
display error icon on non-success
-rw-r--r-- | settings/css/settings.css | 9 | ||||
-rw-r--r-- | settings/js/federationsettingsview.js | 17 | ||||
-rw-r--r-- | settings/templates/settings/personal/personal.info.php | 20 |
3 files changed, 30 insertions, 16 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index cf9e7efbc88..9202a28899b 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -163,12 +163,13 @@ input#passwordbutton { width: 100%; } -.personal-settings-container > div > form span[class^="icon-checkmark"] { +.personal-settings-container > div > form span[class^="icon-checkmark"], +.personal-settings-container > div > form span[class^="icon-error"] { position: relative; - left: 90%; - top: -44px; + right: 8px; + top: -28px; pointer-events: none; - width: 44px; + float: right; } /* verify accounts */ diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index d5537d19404..b9722520f6d 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -108,9 +108,12 @@ } }); - $.when(savingData).done(function() { - //OC.msg.finishedSaving('#personal-settings-container .msg', result) - self._showInputChangeSuccess(field); + $.when(savingData).done(function(data) { + if (data.status === "success") { + self._showInputChangeSuccess(field); + } else { + self._showInputChangeFail(field); + } }); }, @@ -178,6 +181,14 @@ } }, + _showInputChangeFail: function(field) { + var $icon = this.$('#' + field + 'form > .icon-error'); + $icon.fadeIn(200); + setTimeout(function() { + $icon.fadeOut(300); + }, 2000); + }, + _setFieldScopeIcon: function(field, scope) { var $icon = this.$('#' + field + 'form > h2 > span'); diff --git a/settings/templates/settings/personal/personal.info.php b/settings/templates/settings/personal/personal.info.php index 27c5915d5be..7ed617a939e 100644 --- a/settings/templates/settings/personal/personal.info.php +++ b/settings/templates/settings/personal/personal.info.php @@ -78,7 +78,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); <div class="inlineblock button primary" id="sendcropperbutton"><?php p($l->t('Choose as profile picture')); ?></div> </div> </div> - <span class="icon-checkmark hidden"/> + <span class="icon-checkmark hidden"></span> <?php if($_['lookupServerUploadEnabled']) { ?> <input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>"> <?php } ?> @@ -99,7 +99,8 @@ vendor_style('jcrop/css/jquery.Jcrop'); <?php if(!$_['displayNameChangeSupported']) { ?> <span><?php if(isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span> <?php } ?> - <span class="icon-checkmark hidden"/> + <span class="icon-checkmark hidden"></span> + <span class="icon-error hidden" ></span> <?php if($_['lookupServerUploadEnabled']) { ?> <input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>"> <?php } ?> @@ -130,15 +131,16 @@ vendor_style('jcrop/css/jquery.Jcrop'); <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> placeholder="<?php p($l->t('Your email address')); ?>" autocomplete="on" autocapitalize="none" autocorrect="off" /> + <span class="icon-checkmark hidden"></span> + <span class="icon-error hidden" ></span> <?php if(!$_['displayNameChangeSupported']) { ?> <span><?php if(isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span> <?php } ?> <?php if($_['displayNameChangeSupported']) { ?> <em><?php p($l->t('For password reset and notifications')); ?></em> <?php } ?> - <span class="icon-checkmark hidden"/> <?php if($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="emailscope" value="<?php p($_['emailScope']) ?>"> + <input type="hidden" id="emailscope" value="<?php p($_['emailScope']) ?>"> <?php } ?> </form> </div> @@ -153,7 +155,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); value="<?php p($_['phone']) ?>" placeholder="<?php p($l->t('Your phone number')); ?>" autocomplete="on" autocapitalize="none" autocorrect="off" /> - <span class="icon-checkmark hidden"/> + <span class="icon-checkmark hidden"></span> <?php if($_['lookupServerUploadEnabled']) { ?> <input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>"> <?php } ?> @@ -171,7 +173,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); placeholder="<?php p($l->t('Your postal address')); ?>" value="<?php p($_['address']) ?>" autocomplete="on" autocapitalize="none" autocorrect="off" /> - <span class="icon-checkmark hidden"/> + <span class="icon-checkmark hidden"></span> <?php if($_['lookupServerUploadEnabled']) { ?> <input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>"> <?php } ?> @@ -216,7 +218,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); autocomplete="on" autocapitalize="none" autocorrect="off" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> /> - <span class="icon-checkmark hidden"/> + <span class="icon-checkmark hidden"></span> <?php if($_['lookupServerUploadEnabled']) { ?> <input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>"> <?php } ?> @@ -261,7 +263,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); autocomplete="on" autocapitalize="none" autocorrect="off" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> /> - <span class="icon-checkmark hidden"/> + <span class="icon-checkmark hidden"></span> <?php if($_['lookupServerUploadEnabled']) { ?> <input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>"> <?php } ?> @@ -283,7 +285,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); </div> </div> </div> - + <div class="profile-settings-container"> <div class="personal-settings-setting-box personal-settings-language-box"> <?php if (isset($_['activelanguage'])) { ?> |