Closed (fixed)
Project:
Colorbox Node
Version:
7.x-2.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
23 Jun 2012 at 00:19 UTC
Updated:
25 Nov 2018 at 22:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
iLLin commentedCurrently the only thing I got working was the confirmation message. When I get time I will put in the remaining effort to get it to redirect based on the settings. You can also supply a patch and I will look it over.
Comment #2
Anonymous (not verified) commentedCould you point me to that part of code i should look at improving? how is the node in colorbox different that it prevents the rules module from doing a basic drupal goto function?
Comment #3
iLLin commentedSure, everything is going through AJAX, so a simple drupal goto function will not work. Read the lines 184 on in the .module file. Instead of returning the confirmation message, the idea would be to return a colorbox.close method along with a window.location of the confirmation URL. A check would need to be put in to determine what to return based on the webform settings.
Comment #4
iLLin commentedGive this patch a try, its a start, not sure on the reload current settings option and what the expected behavior should be. This patch should allow you to pass a redirect and auto close the modal and then do a redirect. It will also reload inside the modal if you want a confirmation message.
Comment #5
iLLin commentedComment #6
dalerr commentedI tried #4, and redirect to custom URL working good. (modal window closes and page reloads)
But how to insert confirmation message after page reloads?
Comment #7
iLLin commentedYour custom URL page should have your message? If you just want the confirmation message to be displayed why redirect, you could just display it inside the modal box. I guess I'm trying to understand the use case or the missing expected functionality.
Comment #8
iLLin commentedPatch added to latest release 7.x2.2. Please update this with more information if something else needs to be addressed.
Comment #9
dalerr commentedIts design issue (modal window have static background with buttons and input fields on it xD)
Because of that, I want redirect to confirmation page (custome URL) with message, or just message in the top of /contact page after it refreshes.
PS I'll test the new version.
Comment #10
iLLin commentedHmm, so the page you are redirecting to doesn't have the thank you, you just want a status message? I thought that happened automatically... I will take a look at this some more when I get a change and any more information about this will definitely, help.
Comment #11
merilainen commentedIs it possible to use percentages any more after the type casting which was added in the latest update? I'm writing here, because this issue was mentioned in the notes. Before I was using
<a class="colorbox-node" href="/node/[nid]?width=70%&height=80%">but that doesn't work anymore.Comment #12
iLLin commentedWell I could probably change it instead of type casting, to put it through some regex/validation function. Not sure when I'll have time but I will take patches :)
Comment #13
merilainen commentedAny reference I could use to do this? I'm not sure what would be the secure way to do it, but I have time to write a patch.
Comment #14
iLLin commentedI would search to see if the % exists and then strip it out. Force the rest of the string to be an integer and then put it back together as a percent manually when adding to the colorbox settings. That should be secure enough as you are forcing an integer and manually adding a percent if it existed in the first place.
Comment #15
iLLin commentedPlease see: #1722430 for % in the URL for width and height.
Comment #16
iLLin commentedRedirect works. Any messages please add them to the redirect page. Unless you can give me a use case where thats not possible, Im closing this as fixed.
Comment #17
asolorzano commentedHi iLLin, sorry about my english lol I´m editting a node in a modal window using colorbox but when I submit the form it closes the window and then redirects to node/nid but I need two of this options and I don´t know how to do it!!.. one is to redirect to a custom page after closing the window and the other one is to display a message on the same window after editting the node and manually the user closes the window. Thanks for any help... I´m using this but no luck!! :(
function spqr_form_spqr_node_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'spqr-node-form') {
$form['actions']['submit']['#submit'][] = 'spqr_node_submit';
}
}
function spqr_node_submit($form, &$form_state) {
$form_state['redirect'] = 'administrar/solicitudes';
}
Comment #18
pignaz commentedI find this simple solution. I you want to redirect webform you write destination parameter into colorx call. For example If you have link to colorbox you write into href:
open colorbox window
Comment #19
pignaz commentedops......
<a href="/call-to-page-into-colorbox?width=1020&height=700&destination=[url to destination]" rel="nofollow">open colorbox window</a>
Comment #20
rewerz commented#19 is perfect