function jplayer_protect_settings_form in jPlayer 7.2
Same name and namespace in other branches
- 6 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 67 - Page callback for the jPlayer protection statistics page.
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_private_path', '') == '') {
$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/config/media/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['#validate'][] = 'jplayer_protect_settings_form_validate';
}