function uc_termsofservice_get_item in Ubercart Terms of Service 6
Same name and namespace in other branches
- 7 uc_termsofservice.module \uc_termsofservice_get_item()
 
Helper function for ModalFrame to build links to popup page.
2 calls to uc_termsofservice_get_item()
- uc_termsofservice_agreement_cart_callback in ./
uc_termsofservice.module  - Callback form for cart pane.
 - uc_termsofservice_checkout_pane_callback in ./
uc_termsofservice.module  - Callback form for checkout pane.
 
File
- ./
uc_termsofservice.module, line 248  - Ubercart Terms of Service.
 
Code
function uc_termsofservice_get_item($type = NULL, $title, $path, $size = NULL) {
  $options = array(
    'attributes' => array(
      'class' => 'uc_termsofservice-child' . (!empty($size) ? ' uc_termsofservice-size[' . $size . ']' : ''),
    ),
  );
  $form['tos_agree_popup'] = array(
    '#type' => 'checkboxes',
    '#options' => array(
      'agreed' => t('I agree with the !tos', array(
        '!tos' => l($title, $path . '/' . $type, $options),
      )),
    ),
  );
  return $form;
}