You are here

function scald_atom_add_form_source_submit in Scald: Media Management made easy 7

Handles the source step form submission.

File

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

Code

function scald_atom_add_form_source_submit(&$form, &$form_state) {
  $source = $form_state['scald']['source'] = $form_state['values']['source'];
  $type = $form_state['scald']['type']->type;
  $providers = scald_atom_providers_opt();
  $provider = $providers[$type][$source];
  $form_state['scald']['provider'] = $provider;
  if (isset($form_state['scald']['provider']['starting_step']) && $form_state['scald']['provider']['starting_step'] == 'options') {
    $form_state['clicked_button']['#next'] = 'options';
  }
}