You are here

function biblio_admin_field_mapper_form_submit in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio.admin.inc \biblio_admin_field_mapper_form_submit()
  2. 6 biblio.admin.inc \biblio_admin_field_mapper_form_submit()
  3. 7.2 includes/biblio.admin.inc \biblio_admin_field_mapper_form_submit()

_state

Parameters

$form:

1 string reference to 'biblio_admin_field_mapper_form_submit'
biblio_admin_field_mapper_form in includes/biblio.admin.inc

File

includes/biblio.admin.inc, line 1484
biblio.admin.inc

Code

function biblio_admin_field_mapper_form_submit($form, $form_state) {
  foreach ($form_state['values']['fieldmap']['type'] as $key => $value) {
    if (is_array($value)) {
      $map[$key] = $value['biblio'];
      if ($form_state['values']['fileformat_export']) {
        $export_map[$value['biblio']] = $value['export'];
      }
    }
  }
  biblio_set_map('field_map', $form_state['values']['fileformat'], $map);
  if ($form_state['values']['fileformat_export']) {
    biblio_set_map('export_map', $form_state['values']['fileformat'], $export_map);
  }

  // @code
  // elseif ($form_state['values']['op'] == t('Add')) {
  //   $names = biblio_get_map('type_names', $form_state['values']['fileformat']);
  //   $names[$form_state['values']['type_name']] = $form_state['values']['type_desc'];
  //   variable_set('biblio_'.$form_state['values']['fileformat'] .'_type_names', $names);
  // }
  // @endcode
}