function video_admin_preset in Video 6.5
1 string reference to 'video_admin_preset'
- video_menu in ./
video.module - Implementation of hook_menu().
File
- ./
video.admin.inc, line 238
Code
function video_admin_preset($form_state, video_preset $preset = NULL) {
$form = array(
'#redirect' => 'admin/settings/video/presets',
'#preset' => $preset,
);
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#required' => TRUE,
'#maxlength' => 50,
'#default_value' => $preset == NULL ? '' : $preset->name,
);
$form['help'] = array(
'#type' => 'textarea',
'#title' => t('Help text'),
'#required' => FALSE,
'#default_value' => $preset == NULL ? '' : $preset->help,
'#rows' => 3,
'#wysiwyg' => FALSE,
);
$extensions = array_keys(video_video_extensions());
$extensions = array_combine($extensions, $extensions);
$form['extension'] = array(
'#type' => 'select',
'#title' => t('File extension'),
'#required' => TRUE,
'#options' => $extensions,
'#default_value' => $preset == NULL ? '' : $preset->extension,
'#description' => t('Give the extension that the converted file will have. Use only lowercase alphanumeric characters. Do not enter a dot.'),
);
$form['filenamesuffix'] = array(
'#type' => 'textfield',
'#title' => t('File name suffix'),
'#required' => FALSE,
'#maxlength' => 15,
'#size' => 10,
'#default_value' => $preset == NULL ? '' : $preset->filenamesuffix,
'#description' => t('If you have multiple presets with the same extension, you must use this field to differentiate between converted files with the same extension. This suffix is added after the file name and before the extension. For instance, if you enter "_high" and extension "flv", sample.mp4 will be converted to sample_high.flv. Use only alphanumeric characters, . , - or _.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
'#suffix' => l(t('Back'), $form['#redirect']),
);
return $form;
}