You are here

function asset_search_wizard_preview_form_submit in Asset 6

Same name and namespace in other branches
  1. 5.2 contrib/asset_search/asset_search.module \asset_search_wizard_preview_form_submit()

Submit handler for asset_search_wizard_preview_form

File

contrib/asset_search/asset_search.module, line 209

Code

function asset_search_wizard_preview_form_submit($form_id, $form_values) {
  $asset = $form_values['asset'];
  unset($asset->aid);
  $asset = asset_save($asset);
  if ($asset->aid) {
    drupal_set_message(t('Asset saved successfully.'));
  }
  else {
    drupal_set_message(t('Problem saving asset.'), 'error');
  }
  return 'asset/wizard/' . $asset->aid;
}