summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-12-01 15:15:51 +0100
committerJoas Schilling <coding@schilljs.com>2020-12-07 14:19:37 +0100
commit570c1bf7c48779e00c38ebf3ac46ab75718adcc9 (patch)
tree69757b15ca75ee073f4ec44b5a0c8fd7765d2cd4 /apps
parente17cd8acb45cf69288dffccc14d903ab39c9c1b8 (diff)
downloadnextcloud-server-570c1bf7c48779e00c38ebf3ac46ab75718adcc9.tar.gz
nextcloud-server-570c1bf7c48779e00c38ebf3ac46ab75718adcc9.zip
Display errors that happen on saving
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/js/usersettings.js7
-rw-r--r--apps/settings/templates/settings/personal/personal.info.php7
2 files changed, 12 insertions, 2 deletions
diff --git a/apps/settings/js/usersettings.js b/apps/settings/js/usersettings.js
index fcfe556b1d9..a02aae6fb6a 100644
--- a/apps/settings/js/usersettings.js
+++ b/apps/settings/js/usersettings.js
@@ -24,6 +24,11 @@
if (_.isUndefined(data)) {
return null;
}
+
+ if (data.status && data.status === 'error') {
+ OC.Notification.show(data.data.message, { type: 'error' });
+ }
+
if (_.isUndefined(data.data)) {
return null;
}
@@ -47,4 +52,4 @@
OC.Settings = OC.Settings || {};
OC.Settings.UserSettings = UserSettings;
-})(); \ No newline at end of file
+})();
diff --git a/apps/settings/templates/settings/personal/personal.info.php b/apps/settings/templates/settings/personal/personal.info.php
index b78c162c6c9..84198b3c0c4 100644
--- a/apps/settings/templates/settings/personal/personal.info.php
+++ b/apps/settings/templates/settings/personal/personal.info.php
@@ -67,6 +67,7 @@ script('settings', [
</div>
</div>
<span class="icon-checkmark hidden"></span>
+ <span class="icon-error hidden" ></span>
<?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>">
<?php } ?>
@@ -161,7 +162,7 @@ script('settings', [
} ?>
placeholder="<?php p($l->t('Your email address')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
- <span class="icon-checkmark hidden"></span>
+ <span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
<?php if (!$_['displayNameChangeSupported']) { ?>
<span><?php if (isset($_['email']) && !empty($_['email'])) {
@@ -196,6 +197,7 @@ script('settings', [
placeholder="<?php p($l->t('Your phone number')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
<span class="icon-checkmark hidden"></span>
+ <span class="icon-error hidden" ></span>
<?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>">
<?php } ?>
@@ -220,6 +222,7 @@ script('settings', [
value="<?php p($_['address']) ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
<span class="icon-checkmark hidden"></span>
+ <span class="icon-error hidden" ></span>
<?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>">
<?php } ?>
@@ -275,6 +278,7 @@ script('settings', [
} ?>
/>
<span class="icon-checkmark hidden"></span>
+ <span class="icon-error hidden" ></span>
<?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>">
<?php } ?>
@@ -330,6 +334,7 @@ script('settings', [
} ?>
/>
<span class="icon-checkmark hidden"></span>
+ <span class="icon-error hidden" ></span>
<?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>">
<?php } ?>