}
});
- $.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);
+ }
});
},
}
},
+ _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');
<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 } ?>
<?php if(!$_['displayNameChangeSupported']) { print_unescaped('disabled="1"'); } ?>
value="<?php p($_['displayName']) ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
- <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 } ?>
<br />
<em><?php p($l->t('For password reset and notifications')); ?></em>
<?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="emailscope" value="<?php p($_['emailScope']) ?>">
<?php } ?>