You are here

function commerce_multicurrency_selector_form in Commerce Multicurrency 7

Form for the currency selector block.

1 string reference to 'commerce_multicurrency_selector_form'
commerce_multicurrency_block_view in ./commerce_multicurrency.module
Implements hook_block_view().

File

./commerce_multicurrency.module, line 382
Enhancements for the commerce currency support.

Code

function commerce_multicurrency_selector_form($form, &$form_state) {
  $form['#attached']['js'] = array(
    drupal_get_path('module', 'commerce_multicurrency') . '/commerce_multicurrency.js',
  );
  $form['selected_currency'] = array(
    '#type' => 'select',
    '#options' => commerce_currency_code_options_list(),
    '#default_value' => commerce_multicurrency_get_user_currency_code(),
  );
  $form['save_selected_currency'] = array(
    '#value' => t('Save'),
    '#type' => 'submit',
  );
  return $form;
}