function asset_page_edit in Asset 5.2
Menu callback; presents the asset editing form, or redirects to delete confirmation.
Related topics
1 string reference to 'asset_page_edit'
- asset_menu in ./
asset.module - Implementation of hook_menu().
File
- ./
asset.module, line 689 - Main module.
Code
function asset_page_edit($asset) {
if ($_POST['op'] == t('Delete')) {
// Note: we redirect from asset/nid/edit to asset/nid/delete to make the tabs disappear.
if ($_REQUEST['destination']) {
$destination = drupal_get_destination();
unset($_REQUEST['destination']);
}
drupal_goto('asset/' . $asset->aid . '/delete', $destination);
}
drupal_set_title(check_plain($asset->title));
return drupal_get_form($asset->type . '_asset_form', $asset);
}