function _filebrowser_form_uploads_part in Filebrowser 6.2
2 calls to _filebrowser_form_uploads_part()
- filebrowser_admin_settings in ./
filebrowser.admin.inc - filebrowser_form in ./
filebrowser.module - Implementation of hook_form().
File
- includes/
node.inc, line 286
Code
function _filebrowser_form_uploads_part($settings = NULL, $weight = 0) {
if (is_null($settings)) {
$globale_settings = variable_get('filebrowser', NULL);
if (!is_null($globale_settings) && isset($globale_settings['folder_uploads'])) {
$settings = (object) $globale_settings['folder_uploads'];
}
if (is_null($settings)) {
$settings = (object) array(
'enabled' => FALSE,
'allow_overwrite' => FALSE,
'accepted_uploaded_files' => '',
);
}
}
/** Folder uploads
* *************************************************************** */
$form['folder_uploads'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
'#title' => t('Folder Upload'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => $weight,
);
$form['folder_uploads']['enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Allow uploads'),
'#description' => t('Allow users to upload files.'),
'#default_value' => $settings->enabled,
);
$form['folder_uploads']['allow_overwrite'] = array(
'#type' => 'checkbox',
'#title' => t('Allow overwrites'),
'#description' => t('Allow files to be overwritten.'),
'#default_value' => $settings->allow_overwrite,
);
$form['folder_uploads']['accepted_uploaded_files'] = array(
'#type' => 'textarea',
'#title' => t('Accepted files for uploading'),
'#description' => t('List of file patterns accepted for upload. Empty means anything.'),
'#default_value' => $settings->accepted_uploaded_files,
);
return $form;
}