function uc_cart_cart_panes_form in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_cart/uc_cart.module \uc_cart_cart_panes_form()
Settings for panes on the cart page.
1 string reference to 'uc_cart_cart_panes_form'
- uc_cart_menu in uc_cart/
uc_cart.module - Implements hook_menu().
File
- uc_cart/
uc_cart.admin.inc, line 229 - Cart administration menu items.
Code
function uc_cart_cart_panes_form() {
$panes = uc_cart_cart_pane_list(NULL);
$form['panes'] = array(
'#theme' => 'uc_pane_sort_table',
'#pane_prefix' => 'uc_cap',
'#summary callback' => '_uc_cart_panes_summarize',
'#summary arguments' => array(
$panes,
),
'#draggable' => 'uc-cart-pane-weight',
);
foreach ($panes as $pane) {
$form['panes'][$pane['id']]['uc_cap_' . $pane['id'] . '_enabled'] = array(
'#type' => 'checkbox',
'#title' => $pane['title'],
'#default_value' => variable_get('uc_cap_' . $pane['id'] . '_enabled', $pane['enabled']),
);
$form['panes'][$pane['id']]['uc_cap_' . $pane['id'] . '_weight'] = array(
'#type' => 'weight',
'#delta' => 10,
'#default_value' => variable_get('uc_cap_' . $pane['id'] . '_weight', $pane['weight']),
'#attributes' => array(
'class' => 'uc-cart-pane-weight',
),
);
}
return system_settings_form($form);
}