function bat_unit_delete_form_submit in Booking and Availability Management Tools for Drupal 7
Submit callback for unit_delete_form.
1 string reference to 'bat_unit_delete_form_submit'
- bat_unit_delete_form in modules/
bat_unit/ bat_unit.admin.inc - Form callback: confirmation form for deleting a unit.
File
- modules/
bat_unit/ bat_unit.admin.inc, line 424 - BatUnit editing UI.
Code
function bat_unit_delete_form_submit($form, &$form_state) {
$unit = $form_state['bat_unit'];
bat_unit_delete($unit);
drupal_set_message(t('The unit %name has been deleted.', array(
'%name' => $unit->name,
)));
watchdog('bat', 'Deleted unit %name.', array(
'%name' => $unit->name,
));
$form_state['redirect'] = 'admin/bat/config/units';
}