function commerce_file_license_delete_form in Commerce File 7
Form callback: confirmation form for deleting a license.
Parameters
$entity: The object to delete through the form.
Return value
The form array to add or edit a license.
See also
File
- includes/
commerce_file_license.forms.inc, line 371 - Forms for creating / editing, deleting, issuing licenses
Code
function commerce_file_license_delete_form($form, &$form_state, $entity) {
$form_state[COMMERCE_FILE_LICENSE_ENTITY_NAME] = $entity;
// Ensure this include file is loaded when the form is rebuilt from the cache.
$form_state['build_info']['files']['form'] = drupal_get_path('module', 'commerce_file') . '/includes/commerce_file_license.forms.inc';
$form['#submit'][] = 'commerce_file_license_delete_form_submit';
$form = confirm_form($form, t('Are you sure you want to delete the file license for @filename owned by @owner_name?', array(
'@filename' => $entity->file['filename'],
'@owner_name' => $entity->owner->name,
)), '', '<p>' . t('Deleting this license cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
return $form;
}