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