function redhen_contact_contact_archive_form in RedHen CRM 7
Form callback: confirmation form for archiving a contact.
Parameters
$contact: The contact object to be archived.
See also
1 string reference to 'redhen_contact_contact_archive_form'
- redhen_contact_menu in modules/
redhen_contact/ redhen_contact.module - Implements hook_menu().
File
- modules/
redhen_contact/ includes/ redhen_contact.forms.inc, line 218 - Forms for creating, editing, and deleting contacts.
Code
function redhen_contact_contact_archive_form($form, &$form_state, $contact) {
$form_state['redhen_contact'] = $contact;
// Ensure this include file is loaded when the form is rebuilt from the cache.
$form_state['build_info']['files']['form'] = drupal_get_path('module', 'redhen_contact') . '/includes/redhen_contact.forms.inc';
$form['#submit'][] = 'redhen_contact_contact_archive_form_submit';
$wrapper = entity_metadata_wrapper('redhen_contact', $contact);
$full_name = $wrapper->full_name
->value();
$form = confirm_form($form, t('Are you sure you want to archive %label?', array(
'%label' => $full_name,
)), entity_uri('redhen_contact', $contact), '<p>' . t('Archive this contact.') . '</p>', t('Archive'), t('Cancel'), 'confirm');
return $form;
}