function jplayer_protect_settings_form in jPlayer 6
Same name and namespace in other branches
- 7.2 jplayer_protect/jplayer_protect.admin.inc \jplayer_protect_settings_form()
Settings form for enabling jPlayer protection.
1 call to jplayer_protect_settings_form()
- jplayer_protect_form_jplayer_settings_form_alter in jplayer_protect/
jplayer_protect.module - Implements hook_form_FORM_ID_alter().
File
- jplayer_protect/
jplayer_protect.admin.inc, line 56
Code
function jplayer_protect_settings_form(&$form, &$form_state) {
$form['jplayer_protect'] = array(
'#title' => t('Protect audio files from direct downloads'),
'#type' => 'checkbox',
'#default_value' => variable_get('jplayer_protect', FALSE),
);
if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC) {
$form['jplayer_protect']['#description'] = t('To enable file download protection, first <a href="@file-system-settings">set a Private file system path and set protected file fields to use it</a>.', array(
'@file-system-settings' => url('admin/settings/file-system', array(
'query' => drupal_get_destination(),
)),
));
}
$form['jplayer_protect_access_time'] = array(
'#title' => t('Access delay'),
'#type' => 'textfield',
'#default_value' => variable_get('jplayer_protect_access_time', 30),
'#size' => 5,
'#description' => t('The number of seconds that a client will have access to download a protected file after it is requested by jPlayer.'),
);
$form['buttons']['#weight'] = 10;
$form['#validate'][] = 'jplayer_protect_settings_form_validate';
}