move the hook before send to a more efficient location
[squirrelmail.git] / functions / options.php
index 0f284d0bbeebdd209cd385b11c0200976c8eb21b..85598f107123c76774dbf2d57ec776bed42b529f 100644 (file)
@@ -275,23 +275,14 @@ class SquirrelOption {
 
     function createWidget_Integer() {
 
-        // add onChange javascript handler to a regular string widget
-        // which will strip out all non-numeric chars
-        return preg_replace('/>/', ' onChange="a=this.value; b=\'\'; '
-                    . 'for (i=0;i<a.length;i++) { if (a.charAt(i)>=\'0\' '
-                    . '&& a.charAt(i)<=\'9\') b += a.charAt(i); } '
-                    . 'this.value=b;">', $this->createWidget_String());
+        return $this->createWidget_String();
+
     }
 
     function createWidget_Float() {
         
-        // add onChange javascript handler to a regular string widget
-        // which will strip out all non-numeric (period also OK) chars 
-        return preg_replace('/>/', ' onChange="a=this.value; b=\'\'; '
-                    . 'for (i=0;i<a.length;i++) { if ((a.charAt(i)>=\'0\' '
-                    . '&& a.charAt(i)<=\'9\') || a.charAt(i)==\'.\') '
-                    . 'b += a.charAt(i); } this.value=b;">'
-                , $this->createWidget_String());
+        return $this->createWidget_String();
+
     }
 
     function createWidget_Boolean() {