You are here

function asset_search_wizard_preview_form in Asset 5.2

Same name and namespace in other branches
  1. 6 contrib/asset_search/asset_search.module \asset_search_wizard_preview_form()
1 string reference to 'asset_search_wizard_preview_form'
asset_search_wizard_preview in contrib/asset_search/asset_search.module

File

contrib/asset_search/asset_search.module, line 187

Code

function asset_search_wizard_preview_form($cid) {
  if (($cache = cache_get($cid, 'cache_asset_search')) && !empty($cache->data)) {
    $asset = unserialize($cache->data);
    $preview = asset_view($asset);
  }
  else {
    $output = 'n/a';
  }
  $form['preview'] = array(
    '#value' => $preview,
  );
  $form['asset'] = array(
    '#type' => 'value',
    '#value' => $asset,
  );
  $form['cid'] = array(
    '#type' => 'value',
    '#value' => $cid,
  );
  $form['buttons'] = array(
    '#tree' => FALSE,
    '#theme' => 'asset_form_buttons',
  );
  $form['buttons']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Next'),
    '#weight' => 45,
  );
  return $form;
}