You are here

function demo_delete_confirm in Demonstration site (Sandbox / Snapshot) 6

Same name and namespace in other branches
  1. 5 demo.admin.inc \demo_delete_confirm()
  2. 7 demo.admin.inc \demo_delete_confirm()

Form builder to confirm deletion of a snapshot.

1 string reference to 'demo_delete_confirm'
demo_menu in ./demo.module
Implements hook_menu().

File

./demo.admin.inc, line 89
Demonstration Site administrative pages

Code

function demo_delete_confirm(&$form_state, $filename) {
  $fileconfig = demo_get_fileconfig($filename);
  if (!file_exists($fileconfig['infofile'])) {
    return drupal_access_denied();
  }
  $form['filename'] = array(
    '#type' => 'value',
    '#value' => $filename,
  );
  return confirm_form($form, t('Are you sure you want to delete the snapshot %title?', array(
    '%title' => $filename,
  )), 'admin/build/demo/manage', t('This action cannot be undone.'), t('Delete'));
}