function imce_upload_form in IMCE 6
Same name and namespace in other branches
- 6.2 inc/imce.page.inc \imce_upload_form()
- 7 inc/imce.page.inc \imce_upload_form()
Upload form.
2 string references to 'imce_upload_form'
- imce_content in inc/
page.inc - Content of the file browser.
- imce_js_upload in inc/
js.inc - Ajax operation: upload
File
- inc/
page.inc, line 101
Code
function imce_upload_form(&$form_state, $ref) {
$imce =& $ref['imce'];
$form['imce'] = array(
'#type' => 'file',
'#title' => t('File'),
'#size' => 30,
'#prefix' => '<div class="container-inline">',
);
$form['upload'] = array(
'#type' => 'submit',
'#value' => t('Upload'),
'#submit' => $imce['perm']['upload'] ? array(
'imce_upload_submit',
) : NULL,
//permission for submission
'#suffix' => '</div>',
);
if (!empty($imce['thumbnails'])) {
$form['thumbnails'] = array(
'#type' => 'checkboxes',
'#title' => t('Create thumbnails'),
'#options' => imce_thumbnail_options($imce['thumbnails']),
);
}
$form = array(
'fset_upload' => array(
'#type' => 'fieldset',
'#title' => t('Upload file'),
) + $form,
);
$form['#attributes']['enctype'] = 'multipart/form-data';
$form['#action'] = $imce['url'];
return $form;
}