You are here

function image_import_admin_settings in Image 7

Same name and namespace in other branches
  1. 5.2 contrib/image_import/image_import.module \image_import_admin_settings()
  2. 5 contrib/image_import/image_import.module \image_import_admin_settings()
  3. 6 contrib/image_import/image_import.admin.inc \image_import_admin_settings()

Form builder function for Image Import settings form.

1 string reference to 'image_import_admin_settings'
image_import_menu in contrib/image_import/image_import.module
Implementation of hook_menu().

File

contrib/image_import/image_import.admin.inc, line 6

Code

function image_import_admin_settings() {
  $form['image_import_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Import path'),
    '#default_value' => variable_get('image_import_path', file_directory_temp() . '/image'),
    '#description' => t("The directory to import image nodes from. Drupal will need to have write access to this directory so we can move the file.") . '<br />' . t("<strong>Note:</strong> a path begining with a <kbd>/</kbd> indicates the path is relative to the server's root, one starting without specifies a path relative to Drupal's root. I.e. <kbd>/tmp/image</kbd> would be the temp directory off the root while <kbd>tmp/image</kbd> would be inside Drupal's directory."),
    '#required' => TRUE,
  );
  $form = system_settings_form($form);

  // Apply our validation and submit handlers to the submit button.
  $form['buttons']['submit']['#validate'][] = 'image_import_admin_settings_submit_validate';
  $form['buttons']['submit']['#submit'][] = 'image_import_admin_settings_submit_submit';
  $form['buttons']['submit']['#submit'][] = 'system_settings_form_submit';
  return $form;
}