You are here

function bundle_copy_import in Bundle Copy 7.2

Same name and namespace in other branches
  1. 7 bundle_copy.module \bundle_copy_import()

Menu callback: present the import page.

1 string reference to 'bundle_copy_import'
bundle_copy_menu in ./bundle_copy.module
Implements hook_menu().

File

./bundle_copy.module, line 278
Bundle copy.

Code

function bundle_copy_import($form, $form_state, $entity_type = 'node') {
  $form['entity_type'] = array(
    '#type' => 'value',
    '#value' => $entity_type,
  );
  $form['info'] = array(
    '#markup' => t('This form will import bundle and field definitions.'),
  );

  // $form['type_name'] = array(
  //  '#title' => t('Bundle'),
  //  '#description' => t('Select the bundle to import these fields into.<br/>Select &lt;Create&gt; to create a new bundle to contain the fields.'),
  //  '#type' => 'select',
  //  '#options' => array('<create>' => t('<Create>')) + _bundle_copy_bundle_info($entity_type),
  // );
  $form['macro'] = array(
    '#type' => 'textarea',
    '#rows' => 10,
    '#title' => t('Import data'),
    '#required' => TRUE,
    '#description' => t('Paste the text created by a bundle export into this field.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
  );
  return $form;
}