function media_browser_plus_folder_add in Media Browser Plus 7.2
Same name and namespace in other branches
- 7 includes/media_browser_plus.folders.inc \media_browser_plus_folder_add()
@todo Document what this function is does.
_state
Parameters
$form:
1 string reference to 'media_browser_plus_folder_add'
- media_browser_plus_menu in ./
media_browser_plus.module - Implements hook_menu().
File
- includes/
media_browser_plus.folders.inc, line 138 - Folder manipulation functions
Code
function media_browser_plus_folder_add($form, &$form_state) {
$form['new_folder'] = array(
'#type' => 'fieldset',
'#title' => t('New Folder'),
'name' => array(
'#type' => 'textfield',
'#title' => t('Name'),
'#description' => t('Please enter a folder name'),
'#maxlength' => 125,
'#required' => TRUE,
),
'description' => array(
'#type' => 'textfield',
'#title' => t('Description'),
'#description' => t('You may enter a brief description'),
'#maxlength' => 255,
),
'pid' => array(
'#type' => 'select',
'#title' => t('Parent Category'),
'#options' => media_browser_plus_folder_get_folders(),
'#description' => t('Sets one parent folder for the new folder'),
),
);
$form['actions'] = array(
'#type' => 'actions',
'submit' => array(
'#type' => 'submit',
'#value' => t('Save'),
'#submit' => array(
'media_browser_plus_folder_add_submit',
),
),
'continue' => array(
'#type' => 'submit',
'#value' => t('Save & Continue'),
'#submit' => array(
'media_browser_plus_folder_add_submit_continue',
),
),
'cancel' => array(
'#type' => 'submit',
'#value' => t('Cancel'),
'#limit_validation_errors' => array(),
'#submit' => array(
'media_browser_plus_folder_add_cancel',
),
),
);
return $form;
}