You are here

function units_measure_form_delete_submit in Units of Measurement 7.2

Same name and namespace in other branches
  1. 7 units_ui.pages.inc \units_measure_form_delete_submit()

Submit handler for 'units_measure_form'.

Delete an entity of type 'units_measure'.

1 string reference to 'units_measure_form_delete_submit'
units_measure_form in ./units_ui.pages.inc
Generate editing form for entity type 'units_measure'.

File

./units_ui.pages.inc, line 80
Menu page callbacks for Units UI module.

Code

function units_measure_form_delete_submit($form, &$form_state) {
  $entity = entity_ui_form_submit_build_entity($form, $form_state);
  units_measure_delete($entity);
  drupal_set_message(t('Measure %name has been successfully deleted.', array(
    '%name' => entity_label('units_measure', $entity),
  )));

  // Taking user back to the overview page.
  $form_state['redirect'] = array(
    units_ui_overview_uri($entity),
  );
}