You are here

function imce_upload_form in IMCE 6.2

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

Upload form.

2 string references to 'imce_upload_form'
imce_content in inc/imce.page.inc
Returns the content of the file browser.
imce_js_upload in inc/imce.js.inc
Ajax operation: upload

File

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

Code

function imce_upload_form(&$form_state, $ref) {
  $imce =& $ref['imce'];
  $form['imce'] = array(
    '#type' => 'file',
    '#title' => t('File'),
    '#size' => 30,
  );
  if (!empty($imce['thumbnails'])) {
    $form['thumbnails'] = array(
      '#type' => 'checkboxes',
      '#title' => t('Create thumbnails'),
      '#options' => imce_thumbnail_options($imce['thumbnails']),
    );
  }
  $form['upload'] = array(
    '#type' => 'submit',
    '#value' => t('Upload'),
    '#submit' => $imce['perm']['upload'] ? array(
      'imce_upload_submit',
    ) : NULL,
  );
  $form = array(
    'fset_upload' => array(
      '#type' => 'fieldset',
      '#title' => t('Upload file'),
    ) + $form,
  );
  $form['#attributes']['enctype'] = 'multipart/form-data';
  $form['#action'] = $imce['url'];
  return $form;
}