You are here

function javascript_libraries_custom_form_submit in JavaScript Libraries Manager 7

Form submission handler for the custom libraries form.

See also

javascript_libraries_custom_form()

File

./javascript_libraries.admin.inc, line 359
Administrative management forms for JavaScript libraries.

Code

function javascript_libraries_custom_form_submit($form, &$form_state) {
  $custom = variable_get('javascript_libraries_custom_libraries', array());
  foreach ($form_state['values']['libraries'] as $key => $library) {
    $custom[$key]['scope'] = $library['scope'];
    $custom[$key]['weight'] = $library['weight'];
  }
  variable_set('javascript_libraries_custom_libraries', $custom);
  drupal_set_message(t('The JavaScript library settings have been updated.'));
}