You are here

function imce_fileop_form in IMCE 7

Same name and namespace in other branches
  1. 6.2 inc/imce.page.inc \imce_fileop_form()
  2. 6 inc/page.inc \imce_fileop_form()

File operations form.

2 string references to 'imce_fileop_form'
imce_content in inc/imce.page.inc
Returns the content of the file browser.
imce_process_fileop in inc/imce.js.inc
Process file operations form.

File

inc/imce.page.inc, line 179
Implements the file browser.

Code

function imce_fileop_form($form, &$form_state, $ref) {
  $imce =& $ref['imce'];
  $form['filenames'] = array(
    '#type' => 'textfield',
    '#title' => t('Selected files'),
    '#maxlength' => $imce['filenum'] ? $imce['filenum'] * 255 : NULL,
  );

  // Thumbnail.
  if (!empty($imce['thumbnails']) && imce_perm_exists($imce, 'thumb')) {
    $form['fset_thumb'] = array(
      '#type' => 'fieldset',
      '#title' => t('Thumbnails'),
    ) + imce_thumb_form($imce);
  }

  // Delete.
  if (imce_perm_exists($imce, 'delete')) {
    $form['fset_delete'] = array(
      '#type' => 'fieldset',
      '#title' => t('Delete'),
    ) + imce_delete_form($imce);
  }

  // Resize.
  if (imce_perm_exists($imce, 'resize')) {
    $form['fset_resize'] = array(
      '#type' => 'fieldset',
      '#title' => t('Resize'),
    ) + imce_resize_form($imce);
  }

  // Download.
  $form['fset_download'] = array(
    '#type' => 'fieldset',
    '#title' => t('Download'),
  ) + imce_download_form($imce);
  $form['#action'] = $imce['url'];
  return $form;
}