You are here

function asset_base_form_submit in Asset 7

Form API submit callback for the asset form.

2 string references to 'asset_base_form_submit'
assets_wysiwyg_form in includes/asset.admin.inc
Page callback for wysiwyg form.
asset_base_form in includes/asset.admin.inc
Base form builder.

File

includes/asset.admin.inc, line 177
Asset admin page callbacks.

Code

function asset_base_form_submit($form, &$form_state) {
  $asset = entity_ui_form_submit_build_entity($form, $form_state);
  $asset
    ->save();
  $form_state['asset'] = $asset;

  // @TODO: Normally we need to ensure that redirect page accessible to avoid 403 redirects within frame forms i.e.
  // Better to redirect to same page with Get param and not to HP or etc. See assetWidget.getTabAsyncContent() in asset-widget.js
  $form_state['redirect'] = user_access('administer assets') ? 'admin/content/assets' : '';
}