function redhen_org_org_archive_form_submit in RedHen CRM 7
Submit callback for redhen_org_org_archive_form().
1 string reference to 'redhen_org_org_archive_form_submit'
- redhen_org_org_archive_form in modules/
redhen_org/ includes/ redhen_org.forms.inc - Form callback: confirmation form for archiving an organization.
File
- modules/
redhen_org/ includes/ redhen_org.forms.inc, line 156 - Forms for creating, editing, and deleting organizations.
Code
function redhen_org_org_archive_form_submit($form, &$form_state) {
$org = $form_state['redhen_org'];
if ($org
->setState(REDHEN_STATE_ARCHIVED)) {
drupal_set_message(t('%label has been archived.', array(
'%label' => $org->label,
)));
}
else {
drupal_set_message(t('%label was not archived.', array(
'%label' => $org->label,
)), WATCHDOG_ERROR);
}
$url = entity_uri($org
->entityType(), $org);
drupal_goto($url['path']);
}