function views_pdf_template_delete in Views PDF 7
Same name and namespace in other branches
- 7.3 views_pdf.admin.inc \views_pdf_template_delete()
Delete a PDF template.
1 string reference to 'views_pdf_template_delete'
- views_pdf_menu in ./
views_pdf.module - Implements hook_menu().
File
- ./
views_pdf.admin.inc, line 126 - Theme function for enhence the views admin interface vor PDF options.
Code
function views_pdf_template_delete($form, &$form_state, $file_name) {
$pdfs = _list_pdfs($pdf_dir);
if (isset($pdfs[$file_name])) {
$form['name'] = array(
'#type' => 'value',
'#value' => $file_name,
);
$form['pdf_uri'] = array(
'#type' => 'value',
'#value' => "{$pdf_dir}/{$file_name}",
);
return confirm_form($form, t('Are you sure you want to delete the template file %name?', array(
'%name' => $file_name,
)), 'admin/structure/views/pdfs');
}
}