function units_measure_form_submit in Units of Measurement 7
Same name and namespace in other branches
- 7.2 units_ui.pages.inc \units_measure_form_submit()
Submit handler for 'units_measure_form'.
Save an entity of type 'units_measure'.
File
- ./
units_ui.pages.inc, line 79 - Menu page callbacks for Units UI module.
Code
function units_measure_form_submit($form, &$form_state) {
$entity = entity_ui_form_submit_build_entity($form, $form_state);
units_measure_save($entity);
drupal_set_message(t('Measure %name has been successfully saved.', array(
'%name' => entity_label('units_measure', $entity),
)));
// Taking user back to the overview page.
$form_state['redirect'] = array(
units_ui_overview_uri($entity),
);
}