Hide flag modal while flag is submitted

This commit is contained in:
Neil Lalonde 2013-09-05 15:14:07 -04:00
parent 38fb727c00
commit 66d1cacdbd
1 changed files with 2 additions and 0 deletions

View File

@ -58,9 +58,11 @@ Discourse.FlagController = Discourse.ObjectController.extend(Discourse.ModalFunc
if (opts) params = $.extend(params, opts);
$('#discourse-modal').modal('hide');
postAction.act(params).then(function() {
flagController.send('closeModal');
}, function(errors) {
$('#discourse-modal').modal('show');
flagController.displayErrors(errors);
});
},