Active
Project:
Rules Link
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2012 at 07:53 UTC
Updated:
20 Jan 2016 at 04:43 UTC
Jump to comment: Most recent
Comments
Comment #1
nicolas bouteille commentedI managed to do so using Colorbox Node module. You only need to add the colorbox-node class in hook_preprocess_rules_link and also some data-inner-width data-inner-height if need be...
NB : if you're using 2.0, don't use drupal_attributes()
#2534618: Fatal error when switching from 1.1 to 2.0 when using drupal_attributes in custom code
unfortunately, I just noticed it only worked for rules links attached to Comments. For rules links attached to nodes, after I confirm the deletion inside the colorbox, instead of being redirected to the same page, I arrive at the regular Deletion Confirmation page :(EDIT : this actually works fine. My redirect problem was because I was using rules_link_render() function without mentioning the destination parameter.
Careful though, the destination parameter is actually the "query" parameter which needs to be an array with 'destination' inside like that:
The second option you have is to handle the confirmation yourself by displaying the rules link inside a tooltip that opens on click of a custom link, using Tooltipser. In that case the rules link needs to be normal again...
Comment #2
nicolas bouteille commentedfor the tooltip I recommend the great tooltipster plugin
Comment #3
lionguard commentedYou can also check out this sandbox module - it allows the triggering of modal boxes to confirm rules action executions:
https://www.drupal.org/sandbox/cmcintosh/2644004
Comment #4
jweirather commentedThanks for the contribution lionguard! I'll have to check that out.