You are here

function biblio_admin_io_mapper_add_form in Bibliography Module 7

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

Parameters

$format:

$type:

Return value

multitype:string NULL multitype:string

1 string reference to 'biblio_admin_io_mapper_add_form'
biblio_menu in ./biblio.module
Implements hook_menu().

File

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

Code

function biblio_admin_io_mapper_add_form($form, &$form_state, $format, $type) {
  $formats = module_invoke_all('biblio_mapper_options');
  if ($type == 'pubtype') {
    $title = 'Publication Type';
    $desc = t('This is the name of the type identifier, exactly as it appears in the file');
    $submit = array(
      'biblio_admin_io_mapper_add_form_pubtype_submit',
    );
  }
  if ($type == 'field') {
    $title = 'Field name';
    $desc = t('This is the name of the field identifier, exactly as it appears in the file');
    $submit = array(
      'biblio_admin_io_mapper_add_form_field_submit',
    );
  }
  $form['fileformat'] = array(
    '#type' => 'hidden',
    '#value' => $format,
  );
  $form['fileformat_title'] = array(
    '#type' => 'hidden',
    '#value' => $formats[$format]['title'],
  );
  $form['type_name'] = array(
    '#type' => 'textfield',
    '#title' => 'Publication Type',
    '#required' => TRUE,
    '#description' => t('This is the name of the type identifier, exactly as it appears in the file'),
  );
  $form['type_desc'] = array(
    '#type' => 'textfield',
    '#title' => 'Description',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add'),
    '#submit' => $submit,
  );
  return $form;
}