You are here

function patterns_import_file in Patterns 5

Same name and namespace in other branches
  1. 6.2 patterns.module \patterns_import_file()
  2. 6 patterns.module \patterns_import_file()
  3. 7.2 includes/forms/import.inc \patterns_import_file()
  4. 7 includes/forms/import.inc \patterns_import_file()

Display the import pattern file form

1 string reference to 'patterns_import_file'
patterns_menu in ./patterns.module
Implementation of hook_menu().

File

./patterns.module, line 182
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function patterns_import_file() {
  $form['#attributes']['enctype'] = 'multipart/form-data';
  $form['xmlfile'] = array(
    '#type' => 'file',
    '#title' => t('Upload XML Pattern File'),
    '#description' => t('Imported patterns are not executed until you run them manually.'),
    '#size' => 48,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  $form['#base'] = 'patterns_import';
  return $form;
}