You are here

function videojs_settings_form_submit in Video.js (HTML5 Video Player) 7.3

Same name and namespace in other branches
  1. 6.2 includes/videojs.admin.inc \videojs_settings_form_submit()
  2. 6 includes/videojs.admin.inc \videojs_settings_form_submit()
  3. 7 includes/videojs.admin.inc \videojs_settings_form_submit()
  4. 7.2 includes/videojs.admin.inc \videojs_settings_form_submit()

Submit handler for the videojs_settings_form() form.

1 string reference to 'videojs_settings_form_submit'
videojs_settings_form in includes/videojs.admin.inc
Menu callback; Provides the Video.js settings form.

File

includes/videojs.admin.inc, line 129
Administrative pages for the Video.js module.

Code

function videojs_settings_form_submit($form, &$form_state) {
  $options = videojs_utility::getDisplaySettingsFormResults($form_state['values']['options']);
  unset($form_state['values']['options']);

  // Add the results to the form state so they will be saved by the system
  // settings form submit handler.
  foreach ($options as $k => $v) {
    if (!empty($v)) {
      $form_state['values']['videojs_' . $k] = $v;
    }
    else {
      variable_del('videojs_' . $k);
    }
  }
  drupal_set_message(t('The Video.js library (version @version) was successfully found at %directory.', array(
    '@version' => $form_state['videojs_version'],
    '%directory' => $form_state['videojs_directory'],
  )));
}