From: Maxence Lange Date: Mon, 31 Jul 2017 13:22:25 +0000 (+0200) Subject: display error icon on non-success X-Git-Tag: v12.0.3RC1~89^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e62363275d70b8bf639fc3e004cbfd1361f5f0ff;p=nextcloud-server.git display error icon on non-success Signed-off-by: Maxence Lange --- diff --git a/settings/css/settings.css b/settings/css/settings.css index 83e037d53f5..f8d5d24f3d9 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -175,6 +175,13 @@ input#openid, input#webdav { pointer-events: none; } +#personal-settings-container > div > form span[class^="icon-error"] { + position: absolute; + left: 228px; + top: 82px; + pointer-events: none; +} + /* verify accounts */ #personal-settings-container .verify { position: absolute; diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index 1a0a3dcb4d1..8edce271f2f 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'); $icon.removeClass('icon-password'); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 9bb96ba22ce..07356979e37 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -66,7 +66,7 @@
t('Choose as profile picture')); ?>
-