? files ? formcheck.patch ? generate-content.php ? misc/formcheck.js ? modules/devel ? modules/project ? modules/timesheet Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.480 diff -u -r1.480 common.inc --- includes/common.inc 29 Sep 2005 12:33:34 -0000 1.480 +++ includes/common.inc 6 Oct 2005 17:18:09 -0000 @@ -1038,6 +1038,15 @@ if (!$action) { $action = request_uri(); } + // If the 'formcheck' class has been set, add needed javascript. + if (is_array($attributes) && array_key_exists('class', $attributes) && strpos($attributes['class'], 'formcheck')) { + $script = ''; + + drupal_set_html_head($script); + drupal_add_js('misc/formcheck.js'); + } // Anonymous div to satisfy XHTML compliancy. return '
\n
". $form ."\n
\n"; } Index: modules/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node.module,v retrieving revision 1.531 diff -u -r1.531 node.module --- modules/node.module 27 Sep 2005 15:09:28 -0000 1.531 +++ modules/node.module 6 Oct 2005 17:13:14 -0000 @@ -1439,6 +1439,7 @@ if (is_array($param['options'])) { $attributes = array_merge($param['options'], $attributes); } + $attributes['class'] .= ' formcheck'; return form($output, ($param['method'] ? $param['method'] : 'post'), $param['action'], $attributes); }