Closed (fixed)
Project:
E-Publish
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2008 at 15:52 UTC
Updated:
13 Jan 2009 at 15:07 UTC
In Drupal 6, there is no option to remove the 'abstract' field from the node input forms.
The following patch fixes this :
@@ -464,14 +464,12 @@
* Implementation of hook_form_alter().
*/
function epublish_form_alter(&$form, $form_state, $form_id) {
- if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id)
- {
- $form['submission']['epublish_abstract_'. $form['type']['#value']] = array(
+ if ($form_id == 'node_type_form') {
+ $form['submission']['epublish_abstract'] = array(
'#type' => 'checkbox',
'#title' => t('Has abstract'),
'#return_value' => 1,
- '#default_value' => variable_get('epublish_abstract_'. $form['type']
- ['#value'], TRUE),
+ '#default_value' => variable_get('epublish_abstract_'. $form['#node_type']->type, TRUE),
'#description' => t('Users can enter a brief abstract summarizing the content of each node.'),
);
}
Comments
Comment #1
phdhiren commentedyes, this patch works for me
Comment #2
phdhiren commentedCommitted to latest dev version
Comment #4
hannesh commented"Committed to latest dev version"
Also on the 1.0 version?