function uc_termsofservice_checkout_pane_callback in Ubercart Terms of Service 7
Same name and namespace in other branches
- 6 uc_termsofservice.module \uc_termsofservice_checkout_pane_callback()
Callback form for checkout pane.
1 string reference to 'uc_termsofservice_checkout_pane_callback'
- uc_termsofservice_uc_checkout_pane in ./
uc_termsofservice.module - Implements hook_uc_checkout_pane().
File
- ./
uc_termsofservice.module, line 175 - Ubercart Terms of Service.
Code
function uc_termsofservice_checkout_pane_callback($op) {
switch ($op) {
case 'view':
if (module_exists('modalframe') && variable_get('uc_termsofservice_checkout_popup', 0)) {
// If the modalframe module is enabled and the config for popups is
// then the ToS is shown in a popup.
modalframe_parent_js();
drupal_add_js(drupal_get_path('module', 'uc_termsofservice') . '/uc_termsofservice.js');
$node = uc_termsofservice_get_node('checkout');
$width = variable_get('uc_termsofservice_checkout_popup_width', 500);
$height = variable_get('uc_termsofservice_checkout_popup_height', 300);
$form = uc_termsofservice_get_item('checkout', $node->title, 'uc_termsofservice/show/' . $node->nid, "{$width},{$height}");
}
else {
$form = uc_termsofservice_general_form(array(), 'checkout');
}
return array(
'contents' => $form,
);
case 'settings':
$form = uc_termsofservice_admin_form('checkout');
return $form;
break;
}
}