error out early when saving widgets

v1.18.x
psychobunny 11 years ago
parent 61478caa3d
commit c5cae312d7

@ -238,12 +238,16 @@ define(['forum/admin/settings'], function(Settings) {
}, function(err) { }, function(err) {
total--; total--;
if (err) {
app.alertError(err.message);
}
if (total === 0) { if (total === 0) {
app.alert({ app.alert({
alert_id: 'admin:widgets', alert_id: 'admin:widgets',
type: err ? 'danger' : 'success', type: 'success',
title: err ? 'Error' : 'Widgets Updated', title: 'Widgets Updated',
message: err ? err.message : 'Successfully updated widgets', message: 'Successfully updated widgets',
timeout: 2500 timeout: 2500
}); });
} }

Loading…
Cancel
Save