The following patch adds support of login process modified by Modal forms module.
Similar issues:
#832814: Incompatibility with Dialog API
#1061456: Incompatible with ctools modals/dialog api

--- legal.module.orig	2012-07-14 05:40:38.000000000 +0400
+++ legal.module	2012-12-22 15:10:38.000000000 +0400
@@ -420,6 +420,14 @@
     ->fetchAllAssoc('uid');
   $signatory = array_pop($result);
 
+  if ((arg(0) === 'modal_forms') && (arg(1) === 'ajax') && (arg(2) === 'login')) {
+    $dest = '';
+    if (isset($query['destination'])) {
+      $dest = '&destination=' . $query['destination'];
+    }
+    $_GET['destination'] = 'legal_accept/' . $signatory->uid . '/' . md5($signatory->name . $signatory->pass . $signatory->login) . $dest;
+    return;
+  }
   drupal_goto('legal_accept/' . $signatory->uid . '/' . md5($signatory->name . $signatory->pass . $signatory->login), array('query' => $query));
 }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Status: Active » Needs work

Please provide a patch in right format

maximpodorov’s picture

The same patch in a right format.

andypost’s picture

Status: Needs work » Reviewed & tested by the community

Great! very useful!

dercheffe’s picture

I have the Issue this patch should fix (I don't know how to put in patches into my drupal installation, so I couldn't test the patch by myself). It would be great, if this patch could be taken in a normal release or in a dev-release. Thanks :)

richH’s picture

Issue summary: View changes

Hi,

did this patch ever make it into a release? I'm having this problem with Modal forms!

Cheers
Rich

zuernBernhard’s picture

Have the Problem here to. Would love to see this in stable release. Can I help somehow on this ?

zhinio’s picture

I am having issues too. I would like to see the patch on a stable release too plz.

SocialNicheGuru’s picture

This patch no longer applies

andypost’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
ashishdalvi’s picture

Good Novice issue for Drupal Mumbai Code sprint #15.

rasikap’s picture

Assigned: Unassigned » rasikap
rasikap’s picture

I could apply the patch, so no reroll is needed.

rasikap’s picture

Status: Needs work » Needs review
rasikap’s picture

Assigned: rasikap » Unassigned
ronsnow’s picture

Would be great (and appropriate) to have this patch committed to next release. Seems like a lot of time to span not to have incorporated into module.

abarpetia’s picture

Status: Needs review » Reviewed & tested by the community

Given patch in #2, works for me and I can apply it to dev branch so there is no need of reroll.

Robert Castelo’s picture

Status: Reviewed & tested by the community » Needs work

I've added Lightbox2 support in the dev branch.

If anyone still wants modal forms integration take a look at how Lightbox2 is added in the admin form and in the label theme function and provide a patch.

https://www.drupal.org/node/372721#comment-12309650

dtamajon’s picture

@robert-castelo, I think the link you added is for opening Legal link in a popup, while this issue is about support Legal redirection while the login is openend in a popup with Modal Forms. To reproduce the problem, enable links for login on Modal Forms (with Legal already configured).

About patch #2, it stops working after latest Legal release. I have been trying to get it working with no success. Has anyone an updated patch for the latest Legal version?

rpayanm’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
734 bytes

re-rolled.

stopopol’s picture

#19 doesn't work for me
Instead of an Ajax error I now get "Operation timed out. Please try to log in again."