Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2011 at 23:23 UTC
Updated:
28 Apr 2016 at 16:58 UTC
Jump to comment: Most recent
Comments
Comment #1
Apfel007 commentedanyone?
create the modal with this in a view.views-field..
$output = ctools_modal_text_button(t('DELETE'), 'node/' .$row->nid .'/delete', t('delete'));
But it's empty!
How to load the form into the modal? Need a callback .. but how to call it?
create a menu item?
Comment #2
ha5bro commentedA bit late to the party, but this is really easy using the automodal module. You'll just need to add a class to your delete button using form alter and the rest is automagical.
Comment #3
pfrenssenNo need for the automodal module. This is built in to CTools: #1347578: Allow certain links inside the modal to be able to close the modal.
You need to add the class 'ctools-close-modal' to the links that should close the dialog. An example with a confirm_form():
Comment #5
pringlz commentedModule Modal operaitons do this. https://www.drupal.org/project/modal It is no readme, but here is example. This link was open node view in modal window.
Or this my code for delete node (for Views PHP)
<a href="<?php global $base_url; echo $base_url; ?>/modal/node/<?php echo $row->nid; ?>/delete/nojs" class="ctools-use-modal">Delete</a>