FIX: displayErrors is undefined in flags.js controller
This commit is contained in:
parent
68747c8d2d
commit
7061f6a570
|
@ -90,8 +90,12 @@ export default Discourse.ObjectController.extend(Discourse.ModalFunctionality, {
|
||||||
postAction.act(params).then(function() {
|
postAction.act(params).then(function() {
|
||||||
self.send('closeModal');
|
self.send('closeModal');
|
||||||
}, function(errors) {
|
}, function(errors) {
|
||||||
self.send('showModal');
|
self.send('closeModal');
|
||||||
self.displayErrors(errors);
|
if (errors && errors.responseText) {
|
||||||
|
bootbox.alert($.parseJSON(errors.responseText).errors);
|
||||||
|
} else {
|
||||||
|
bootbox.alert(I18n.t('generic_error'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue