diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-11-25 10:11:59 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-11-25 10:11:59 +0000 |
commit | b1b1e2045f9a3bcc645293c372516e756f0dcb57 (patch) | |
tree | 0ec8a2fa3f65161af09a13a327b66a833386a43b /modules/upload/upload.module | |
parent | 924dda1fa4f227c295f5a6e28f2c6e57d7871ecc (diff) | |
download | brdo-b1b1e2045f9a3bcc645293c372516e756f0dcb57.tar.gz brdo-b1b1e2045f9a3bcc645293c372516e756f0dcb57.tar.bz2 |
- Patch #37798 by Neil: allow non-workflow form elements on the node type settings page.
Diffstat (limited to 'modules/upload/upload.module')
-rw-r--r-- | modules/upload/upload.module | 15 |
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: |