Permalink
Browse files

fix(reportedcontent): forward to address if not submitted in lightbox

  • Loading branch information...
jdalsem committed Jun 2, 2016
1 parent d1657d3 commit ee63b1d8ea94cdd26f43591cc01fd00747efb9d9
Showing with 9 additions and 3 deletions.
  1. +9 −3 mod/reportedcontent/views/default/elgg/reportedcontent.js
@@ -16,9 +16,15 @@ define(function (require) {
data: $form.serialize(),
success: function (data) {
if (data.status == 0) {
- require(['elgg/lightbox'], function(lightbox) {
- lightbox.close();
- });
+ if ($form.is('#colorbox *')) {
+ require(['elgg/lightbox'], function(lightbox) {
+ lightbox.close();
+ });
+ } else {
+ // redirect to address if not reported from a lightbox
+ // can not use history as it may not exist
+ location.href = $form.find('input[name="address"]').val();
+ }
}
}
});

0 comments on commit ee63b1d

Please sign in to comment.