You are here

function flag_import_form in Flag 6.2

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

Form to import a flag.

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

File

includes/flag.export.inc, line 65
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('admin/build/flags/export'),
    )),
  );
  $form['submit'] = array(
    '#value' => t('Import'),
    '#type' => 'submit',
  );
  return $form;
}