summaryrefslogtreecommitdiff
path: root/modules/upload/upload.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upload/upload.module')
-rw-r--r--modules/upload/upload.module15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 2ce3fe8c6..50a4c0861 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -143,17 +143,20 @@ function upload_file_download($file) {
}
}
+function upload_form_alter($form_id, &$form) {
+ if (substr($form_id, -14) == '_node_settings') {
+ $form['workflow']['upload_'. $node->type] = array(
+ '#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $node->type, 1),
+ '#options' => array(t('Disabled'), t('Enabled')),
+ );
+ }
+}
+
/**
* Implementation of hook_nodeapi().
*/
function upload_nodeapi(&$node, $op, $arg) {
switch ($op) {
- case 'settings':
- $form['upload_'. $node->type] = array(
- '#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $node->type, 1),
- '#options' => array(t('Disabled'), t('Enabled'))
- );
- return $form;
case 'validate':
$node->files = upload_load($node);
// Double check existing files: