function theme_uc_addresses_get_address_form in Ubercart Addresses 5.2
Same name and namespace in other branches
- 5 uc_addresses.module \theme_uc_addresses_get_address_form()
- 6.2 uc_addresses.pages.inc \theme_uc_addresses_get_address_form()
- 6 uc_addresses.module \theme_uc_addresses_get_address_form()
- 7 uc_addresses.pages.inc \theme_uc_addresses_get_address_form()
Theme the add or edit address form.
Parameters
$form The form array to theme.:
Return value
The themed form (as a string).
File
- ./
uc_addresses.module, line 950
Code
function theme_uc_addresses_get_address_form($form) {
drupal_add_css(drupal_get_path('module', 'uc_addresses') . '/uc_addresses.css');
$output = '<p>';
foreach (element_children($form['panes']) as $pane_id) {
// TODO: (Tony) Not sure what's going on here.
if (function_exists($func = _address_pane_data($pane_id, 'callback'))) {
$result = $func('theme', $form['panes'][$pane_id], NULL);
if (!empty($result)) {
$output .= $result;
$form['panes'][$pane_id] = array();
}
else {
$output .= drupal_render($form['panes'][$pane_id]);
}
}
else {
$output .= drupal_render($form['panes'][$pane_id]);
}
}
$output .= '<div id="checkout-form-bottom">' . drupal_render($form) . '</div>';
return $output;
}