function theme_uc_cart_checkout_buttons in Ubercart 7.3
Themes the cart checkout button(s).
Parameters
$variables: An associative array containing:
- buttons: A render element representing the form buttons.
See also
1 theme call to theme_uc_cart_checkout_buttons()
- uc_cart_view_form in uc_cart/
uc_cart.module - Displays the contents of the customer's cart.
File
- uc_cart/
uc_cart.theme.inc, line 244 - Theme functions for the uc_cart module.
Code
function theme_uc_cart_checkout_buttons($variables) {
$output = '';
if ($buttons = element_children($variables['buttons'])) {
// Render the first button.
$button = array_shift($buttons);
$output = drupal_render($variables['buttons'][$button]);
// Render any remaining buttons inside a separate container.
if ($buttons) {
$output .= '<div class="uc-cart-checkout-button-container clearfix">';
// Render the second button.
$output .= '<div class="uc-cart-checkout-button">';
$output .= '<div class="uc-cart-checkout-button-separator">' . t('- or -') . '</div>';
$button = array_shift($buttons);
$output .= drupal_render($variables['buttons'][$button]);
$output .= '</div>';
// Render any remaining buttons.
foreach ($buttons as $button) {
$output .= '<div class="uc-cart-checkout-button">';
$output .= drupal_render($variables['buttons'][$button]);
$output .= '</div>';
}
$output .= '</div>';
}
}
return $output;
}