You are here

function scald_atom_add_form_source in Scald: Media Management made easy 7

Source form.

1 string reference to 'scald_atom_add_form_source'
scald_atom_add_page in includes/scald.pages.inc
Atom add page callback.

File

includes/scald.pages.inc, line 172
This file contains the various callbacks related to Scald defined pages.

Code

function scald_atom_add_form_source($form, &$form_state) {
  $providers = scald_atom_providers();
  $sources = $providers[$form_state['scald']['type']->type];

  // Localize the source names. Note that all the strings
  // have been marked for extraction in their corresponding
  // modules, so this call is safe.
  $sources = array_map('t', $sources);
  $form_state['title'] = t('Source');
  $form['source'] = array(
    '#title' => t('Source'),
    '#type' => 'select',
    '#options' => $sources,
    '#description' => t('Please choose the source of your new atom'),
  );
  return $form;
}