53,58d52 < < $tmp_node = node_load($args[1]); < if ($tmp_node !== FALSE) { < $GLOBALS['colorbox_node_webform'] = $tmp_node->type; < unset($_GET['destination']); < } 147,157c141 < < if (is_numeric($GLOBALS['colorbox_node_webform'])) { < $webform_id = 'webform_client_form_'. $GLOBALS['colorbox_node_webform']; < } < else { < $webform_id = $GLOBALS['colorbox_node_webform'] . '_node_form'; < < // < array_unshift($form['#validate'], "colorbox_js_node_form_validate"); < } < --- > $webform_id = 'webform_client_form_'. $GLOBALS['colorbox_node_webform']; 175,188d158 < < < /* < * Validation function that must called first when using colorbox_node with a node. < * --> If this is NOT called at first when validation, the following error will occur: < * node_form_validate function not found!!!! < */ < function colorbox_js_node_form_validate($form, &$form_state) { < $file = drupal_get_path('module', 'node') . '/node.pages.inc'; < require_once DRUPAL_ROOT . '/' . $file; < } < < < 193d162 < 220,243c189,197 < if ($node !== FALSE) { < // Find out what we should be doing for the webform. < if($node->webform['redirect_url'] == '') { < // Display a confirmation message. < $markup = check_markup($node->webform['confirmation'], $node->webform['confirmation_format'], '', TRUE) . $javascript; < } < elseif($node->webform['redirect_url'] == '') { < // Not sure what to do here? < // Display confirmation? < $markup = ''; < } < else { < // We are doing a redirect so we need to close the colorbox < // and then force a window.location on the passed in URL. < $markup = ' < '; < } --- > // Find out what we should be doing for the webform. > if($node->webform['redirect_url'] == '') { > // Display a confirmation message. > $markup = check_markup($node->webform['confirmation'], $node->webform['confirmation_format'], '', TRUE) . $javascript; > } > elseif($node->webform['redirect_url'] == '') { > // Not sure what to do here? > // Display confirmation? > $markup = ''; 247,248c201 < // and then DO NOT force a window.location. The location will be determined by < // the redirect attribute in the form... --- > // and then force a window.location on the passed in URL. 253a207 > window.location = "'. drupal_lookup_path('alias', $node->webform['redirect_url']) .'"; 258d211 <