You are here

function theme_money_field_settings_currency_list in Money field 5

Format the list of currencies that is displayed in the money field settings form.

Parameters

$currencies: An array of currencies, where the keys are the currency codes and the values are the full names, with bracketed currency codes appended. (An array returned by currency_api_get_list()).

Return value

A rendered list of currencies.

1 theme call to theme_money_field_settings_currency_list()
money_field_settings in ./money.module
Implementation of hook_field_settings().

File

./money.module, line 555
This module defines the "money" CCK field. It uses the Currency API, which is included in the Currency module, to get a list of valid currencies.

Code

function theme_money_field_settings_currency_list($currencies) {
  $output = '';
  $cols = 2;
  $width = 100 / $cols;
  $chunks = array_chunk(array_values($currencies), 2);
  $output .= '<div id="money-field-settings-currency-list" class="clear-block">';
  $output .= '<h3>' . t('Available currencies') . '</h3>';
  foreach ($chunks as $chunk) {
    $output .= '<div style="float: left; width:' . $width . '%">';
    $output .= theme('item_list', $chunk);
    $output .= '</div>';
  }
  $output .= '</div>';
  return $output;
}