You are here

function flag_import_form in Flag 7.2

Same name and namespace in other branches
  1. 6.2 includes/flag.export.inc \flag_import_form()
  2. 7.3 includes/flag.export.inc \flag_import_form()

Form to import a flag.

1 string reference to 'flag_import_form'
flag_menu in ./flag.module
Implements hook_menu().

File

includes/flag.export.inc, line 70
Import/Export functionality provided by Flag module.

Code

function flag_import_form() {
  $form = array();
  $form['import'] = array(
    '#title' => t('Flag import code'),
    '#type' => 'textarea',
    '#default_value' => '',
    '#rows' => 15,
    '#required' => TRUE,
    '#description' => t('Paste the code from a <a href="@export-url">flag export</a> here to import it into you site. Flags imported with the same name will update existing flags. Flags with a new name will be created.', array(
      '@export-url' => url(FLAG_ADMIN_PATH . '/export'),
    )),
  );
  $form['submit'] = array(
    '#value' => t('Import'),
    '#type' => 'submit',
  );
  return $form;
}