You are here

function fillpdf_field_delete_confirm in FillPDF 6

Same name and namespace in other branches
  1. 5 fillpdf.module \fillpdf_field_delete_confirm()
1 string reference to 'fillpdf_field_delete_confirm'
fillpdf_menu in ./fillpdf.module
Implementation of hook_menu().

File

./fillpdf.admin.inc, line 686
Allows mappings of PDFs to site content

Code

function fillpdf_field_delete_confirm(&$form_state, $fid, $pdf_key) {
  $pdf_form = db_fetch_object(db_query("SELECT * FROM {fillpdf_forms} WHERE fid = %d", $fid));
  if ($pdf_key) {
    $field = db_fetch_object(db_query("SELECT * FROM {fillpdf_fields} WHERE pdf_key = '%s' AND fid = %d", $pdf_key, $fid));
  }
  if (!$field) {
    drupal_not_found();
    exit;
  }
  $form['#pdf_field'] = $field;
  $form['#pdf_form'] = $pdf_form;
  return confirm_form($form, t('Are you sure you want to delete the field %pdf_key?', array(
    '%pdf_key' => $field->pdf_key,
  )), 'admin/content/fillpdf/' . $pdf_form->fid, t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}