function download_count_reset_form in Download Count 7.2
Same name and namespace in other branches
- 6.2 includes/download_count.pages.inc \download_count_reset_form()
- 7.3 includes/download_count.pages.inc \download_count_reset_form()
@todo Please document this function.
See also
1 string reference to 'download_count_reset_form'
- download_count_menu in ./
download_count.module - Implements hook_menu().
File
- includes/
download_count.pages.inc, line 109 - Page callback file for the download_count module.
Code
function download_count_reset_form($form, $form_state, $dc_entry = array()) {
$form = array();
if ($dc_entry != 'all') {
$form['dcid'] = array(
'#type' => 'value',
'#value' => $dc_entry['dcid'],
);
$form['filename'] = array(
'#type' => 'value',
'#value' => $dc_entry['filename'],
);
$form['fid'] = array(
'#type' => 'value',
'#value' => $dc_entry['fid'],
);
$form['nid'] = array(
'#type' => 'value',
'#value' => $dc_entry['nid'],
);
return confirm_form($form, t('Are you sure you want to reset the download count for %filename?', array(
'%filename' => $dc_entry['filename'],
)), 'download_count', t('This action cannot be undone.'), t('Reset'), t('Cancel'));
}
else {
$form['dcid'] = array(
'#type' => 'value',
'#value' => 'all',
);
return confirm_form($form, t('Are you sure you want to reset all download counts?'), 'download_count', t('This action cannot be undone.'), t('Reset All'), t('Cancel'));
}
}