You are here

function farm_asset_delete_form_submit in farmOS 7

Delete form submit handler.

Parameters

array $form: The form array.

array $form_state: The form state array.

File

modules/farm/farm_asset/farm_asset.pages.inc, line 260
Farm asset pages.

Code

function farm_asset_delete_form_submit(array $form, array &$form_state) {
  $farm_asset = $form_state['values']['farm_asset'];
  farm_asset_delete($farm_asset);
  drupal_set_message(t('%title was deleted.', array(
    '%title' => entity_label('farm_asset', $farm_asset),
  )));
  $form_state['redirect'] = '<front>';
}