Index: htmlwrap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/htmlwrap/htmlwrap.module,v
retrieving revision 1.1
diff -u -r1.1 htmlwrap.module
--- htmlwrap.module	31 May 2005 21:00:41 -0000	1.1
+++ htmlwrap.module	19 Feb 2006 23:31:40 -0000
@@ -9,10 +9,6 @@
   }
 }
 
-function htmlwrap_settings() {
-  return form_textfield(t('Maximum word length'), 'htmlwrap_length', variable_get('htmlwrap_length', 60), 10, 3, t('Words longer than this number of characters will be broken to allow wordwrap. HTML entities such as urls in a tags will not be broken, be sure to run the content through all html filters before this filter.'));
-}
-
 function htmlwrap_filter_tips($delta, $format, $long = false) {
   return t('Long words are automatically broken up to prevent word-wrap problems.');
 }
@@ -20,14 +16,31 @@
 function htmlwrap_filter($op, $delta = 0, $format = -1, $text = '') {
   switch ($op) {
     case 'list':
-      return array(0 => t('htmlwrap filter'));
+      return array(0 => t('HTML wrap filter'));
 
     case 'description':
       return t('Breaks long words to prevent formatting problems.');
 
     case 'process':
-      $text = htmlwrap($text, variable_get('htmlwrap_length', 60), "\n", "", "pre", TRUE);
+      return htmlwrap($text, variable_get('htmlwrap_length', 60), "\n", "", "pre", TRUE);
 
+    case 'settings':
+      $form['filter_htmlwrap'] = array(
+        '#type' => 'fieldset', 
+        '#title' => t('HTML wrap filter'), 
+        '#collapsible' => TRUE, 
+        '#collapsed' => TRUE);
+      $form['filter_htmlwrap']['htmlwrap_length'] = array(
+        '#type' => 'textfield',
+        '#title' => t('Maximum word length'),
+        '#default_value' => variable_get('htmlwrap_length', 60),
+        '#size' => 10,
+        '#maxlength' => 3,
+        '#description' => t('Words longer than this number of characters will be broken to allow wordwrap. HTML entities such as urls in a tags will not be broken, be sure to run the content through all html filters before this filter.'),
+      );
+      
+      return $form;
+      
     default:
       return $text;
   }
