function rooms_unit_delete_form in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Form callback: confirmation form for deleting a unit.
Parameters
$unit: The unit to delete.
See also
1 string reference to 'rooms_unit_delete_form'
- rooms_unit_delete_form_wrapper in modules/
rooms_unit/ rooms_unit.admin.inc - Form callback wrapper: delete a unit.
File
- modules/
rooms_unit/ rooms_unit.admin.inc, line 543 - Rooms editing UI.
Code
function rooms_unit_delete_form($form, &$form_state, $unit) {
$form_state['rooms_unit'] = $unit;
$form['#submit'][] = 'rooms_unit_delete_form_submit';
$form = confirm_form($form, t('Are you sure you want to delete Unit %name?', array(
'%name' => $unit->name,
)), 'admin/rooms/units/unit', '<p>' . t('This action cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
return $form;
}