You are here

function imce_directory_form in IMCE 6

Same name and namespace in other branches
  1. 6.2 inc/imce.admin.inc \imce_directory_form()
  2. 7 inc/imce.admin.inc \imce_directory_form()

directory settings form

1 call to imce_directory_form()
imce_profile_form in inc/admin.inc
Profile form.

File

inc/admin.inc, line 299

Code

function imce_directory_form($directory = array()) {
  if (empty($directory)) {
    $directory = array(
      'name' => '',
      'subnav' => 0,
      'browse' => 0,
      'upload' => 0,
      'thumb' => 0,
      'delete' => 0,
      'resize' => 0,
    );
  }
  $form['name'] = array(
    '#type' => 'textfield',
    '#default_value' => $directory['name'],
    '#size' => 24,
    '#maxlength' => NULL,
  );
  $form['subnav'] = array(
    '#type' => 'checkbox',
    '#title' => t('Including subdirectories'),
    '#default_value' => $directory['subnav'],
  );
  $form['browse'] = array(
    '#type' => 'checkbox',
    '#title' => t('Browse'),
    '#default_value' => $directory['browse'],
  );
  $form['upload'] = array(
    '#type' => 'checkbox',
    '#title' => t('Upload'),
    '#default_value' => $directory['upload'],
  );
  $form['thumb'] = array(
    '#type' => 'checkbox',
    '#title' => t('Thumbnails'),
    '#default_value' => $directory['thumb'],
  );
  $form['delete'] = array(
    '#type' => 'checkbox',
    '#title' => t('Delete'),
    '#default_value' => $directory['delete'],
  );
  $form['resize'] = array(
    '#type' => 'checkbox',
    '#title' => t('Resize'),
    '#default_value' => $directory['resize'],
  );
  return $form;
}