From 129c8eb18c47bf7b0e0fe35ac6bc1b7ee38d177f Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Sun, 6 Aug 2006 23:00:42 +0000 Subject: #62340 by chx, webchick, Jaza, Eaton, mathieu, and myself. Configurable node types. --- modules/upload/upload.module | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'modules/upload') diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 6ad97cc53..d36dc2011 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -348,14 +348,16 @@ function _upload_prepare(&$node) { } function upload_form_alter($form_id, &$form) { - if (isset($form['type'])) { - if ($form['type']['#value'] .'_node_settings' == $form_id) { - $form['workflow']['upload_'. $form['type']['#value']] = array( - '#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $form['type']['#value'], 1), - '#options' => array(t('Disabled'), t('Enabled')), - ); - } + if ($form_id == 'node_type_form' && isset($form['identity']['type'])) { + $form['workflow']['upload'] = array( + '#type' => 'radios', + '#title' => t('Attachments'), + '#default_value' => variable_get('upload_'. $form['identity']['type']['#default_value'], 1), + '#options' => array(t('Disabled'), t('Enabled')), + ); + } + if (isset($form['type'])) { $node = $form['#node']; if ($form['type']['#value'] .'_node_form' == $form_id && variable_get("upload_$node->type", TRUE) && user_access('upload files')) { drupal_add_js('misc/progress.js'); -- cgit v1.2.3