Closed (fixed)
Project:
Admin links
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2009 at 13:59 UTC
Updated:
18 Sep 2009 at 14:20 UTC
Since this module provides links to delete a node, "delete" button in node form is no longer necessary. From end user point of view it is also confusing to have 3 submit buttons for a form.
I propose to remove "delete" button from all node forms.
This can be accomplished by the following code:
/*
* Implementation of hook_form_alter().
* Removes "delete" button from node form.
/
function admin_links_form_alter(&$form, &$form_state, $form_id) {
if ( substr($form_id, -strlen('node_form')) == 'node_form' ) {
unset($form['buttons']['delete']);
}
}
Comments
Comment #1
dave reidThanks! Committed to CVS with a few minor revisions (using ['#access'] = FALSE instead of unset so that other things that attempt to manipulate the delete button won't fail).
http://drupal.org/cvs?commit=259372