You are here

function theme_uc_addresses_address_delete_confirm in Ubercart Addresses 5

Same name and namespace in other branches
  1. 5.2 uc_addresses.module \theme_uc_addresses_address_delete_confirm()
  2. 6.2 uc_addresses.pages.inc \theme_uc_addresses_address_delete_confirm()
  3. 6 uc_addresses.module \theme_uc_addresses_address_delete_confirm()
  4. 7 uc_addresses.pages.inc \theme_uc_addresses_address_delete_confirm()

Theme the address deletion confirmation form.

Parameters

$help The help message to display.:

$panes An associative array for each address pane that: has information to add to the delete page. The key is the pane's title and the value is either the data returned for that pane or an array of returned data.

$form The HTML version of the form that by default: includes the 'Back' and 'Delete Address' buttons at the bottom of the confirmation page.

Return value

The themed confirmation form (as a string).

1 theme call to theme_uc_addresses_address_delete_confirm()
uc_addresses_delete_address_confirm in ./uc_addresses.module
Display a confirmation page before deleting an address.

File

./uc_addresses.module, line 1084

Code

function theme_uc_addresses_address_delete_confirm($help, $panes, $form) {
  drupal_add_css(drupal_get_path('module', 'uc_addresses') . '/uc_addresses.css');
  $output .= '<p>' . $help . '</p>';
  $output .= '<div class="list_address"><table class="address-preview-table">';
  foreach ($panes as $title => $data) {
    $output .= '<tr class="pane-title-row"><td colspan="2">' . t('Address') . '</td></tr>';
    if (is_array($data)) {
      foreach ($data as $row) {
        if (is_array($row)) {
          if (isset($row['border'])) {
            $border = ' class="row-border-' . $row['border'] . '"';
          }
          else {
            $border = '';
          }
          $output .= '<tr class="pane-data-row"' . $border . '><td class="title-col" ' . '>' . $row['title'] . ':</td><td class="data-col">' . $row['data'] . '</td></tr>';
        }
        else {
          $output .= '<tr class="pane-data-row"><td colspan="2">' . $row . '</td></tr>';
        }
      }
    }
    else {
      $output .= '<tr class="pane-data-row"><td colspan="2">' . $data . '</td></tr>';
    }
  }
  $output .= '<tr class="preview-button-row"><td colspan="2">' . $form . '</td></tr></table>';
  $output .= '</div>';
  return $output;
}