<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>

<?php if($this->success) { ?>
  <script type="text/javascript">
    en4.core.runonce.add(function() {
      if(parent.scriptJquery('#photo_next').length)
        parent.document.getElementById('photo_next').click();
      else if(parent.scriptJquery('#photo_prev').length)
        parent.document.getElementById('photo_prev').click();
      else {
        if(parent.scriptJquery('.media_lightbox_close').length == 0) {
          parent.loadAjaxContentApp(en4.core.baseUrl, false);
          parent.Smoothbox.close();
          return;
        }
        parent.parent.scriptJquery('.activity_filter_tabs').find('li.active').find('a').trigger('click');
        parent.parent.Smoothbox.close();
        return;
      }
      parent.parent.scriptJquery('.activity_filter_tabs').find('li.active').find('a').trigger('click');
      parent.Smoothbox.close();
    });
  </script>
  <?php return; ?>
<?php } ?>
<?php echo $this->form->render($this) ?>