1

When I delete a node (any type of node, presumably), I'd like to have the confirmation happen through a jQuery-like yes/no dialog popping up over the page, rather than being redirected to a separate page with the "This action cannot be undone" message. This being the 21st century and all...

http://bootboxjs.com/ would seem to be a good candidate for handling the dialogs, but the question is how to tie it into the form and node deletion processes, ideally without hacking core and/or patching everything in site. Has anybody thought this through?

1 Answer 1

2

You might be able to do that with:

https://drupal.org/project/ctools_automodal_admin

Provides automatic modal support for any hook_menu() paths that have 'modal' => TRUE defined. This makes it easy to add optional modal support in any contrib module and helps reduce the burden on module developers to support modals.

If you added the node delete path, perhaps node/%node/delete to the modal paths, it may just work.

2
  • Excellent pointer; thanks! Sadly, though, the module has some problems. It started by throwing some errors that I was able to get fixed (drupal.org/node/1614984), and could at least get a "create a node" form coming up in a modal. But node/%/edit and node/%/delete both did something with node permissions that blocked any editing attempts. I might look into this some more, but there's also the matter that the project seems to have been inactive for more than a year, so I'm not sure what its future is. It was definitely on the right track (thanks again!), but I fear the search continues.
    – Jim Miller
    Commented Jul 24, 2013 at 3:49
  • Regarding add/edit: it also didn't play nicely with some jQuery validation I was doing on the form, which I suppose I shouldn't be too surprised by.
    – Jim Miller
    Commented Jul 24, 2013 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.