diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-10-07 06:11:12 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-10-07 06:11:12 +0000 |
commit | 7e1527ee61bc10b3765b95b9af8faaa2254da5a8 (patch) | |
tree | 2225c7f571b4a3f635564f8281406a12b2a271a7 /modules/page | |
parent | 7b5b460534e5c54b07d28467c2aa2fc670c714e4 (diff) | |
download | brdo-7e1527ee61bc10b3765b95b9af8faaa2254da5a8.tar.gz brdo-7e1527ee61bc10b3765b95b9af8faaa2254da5a8.tar.bz2 |
- Patch #29465: new form API by Adrian et al.
TODO:
+ The contact.module was broken; a new patch for contact.module is needed.
+ Documentation is needed.
+ The most important modules need to be updated ASAP.
Diffstat (limited to 'modules/page')
-rw-r--r-- | modules/page/page.module | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/modules/page/page.module b/modules/page/page.module index 1370c9d6d..073c99cbb 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -74,18 +74,25 @@ function page_validate(&$node) { * Implementation of hook_form(). */ function page_form(&$node) { - $output = form_textfield(t('Title'), 'title', $node->title, 60, 128, NULL, NULL, TRUE); + + $form['title'] = array(type => 'textfield', title => t('Title'), size => 60, maxlength => 128, required => TRUE, default_value => $node->title); if (function_exists('taxonomy_node_form')) { - $output .= implode('', taxonomy_node_form('page', $node)); + $form['taxonomy'] = taxonomy_node_form('page', $node); } - $output .= form_textarea(t('Body'), 'body', $node->body, 60, 20, '', NULL, TRUE); - $output .= filter_form('format', $node->format); + $form['body'] = array( + type => 'textarea', title => t('Body'), default_value => $node->body, required => TRUE + ); + $form = array_merge($form, filter_form($node->format)); - $output .= form_textarea(t('Log message'), 'log', $node->log, 60, 5, t('An explanation of the additions or updates being made to help other authors understand your motivations.')); - return $output; + $form['log'] = array( + type => 'textarea', title => t('Log message'), default_value => $node->log, rows => 5, + description => t('An explanation of the additions or updates being made to help other authors understand your motivations.') + ); + + return $form; } |