[Tickets #1395] NEW: Add preference data type support for floating
point numbers
bugs at bugs.horde.org
bugs at bugs.horde.org
Wed Feb 16 19:08:23 PST 2005
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=1395
-----------------------------------------------------------------------
Ticket | 1395
Created By | scott at realorganized.com
Summary | Add preference data type support for floating point numbers
Queue | Horde Base
Version | 3.0.3
State | New
Priority | 1. Low
Type | Enhancement
Owners |
+New Attachment | floatnumber.inc
-----------------------------------------------------------------------
scott at realorganized.com (2005-02-16 19:08) wrote:
I am developing a real estate module for horde and have a need to be able to
handle preferences for several floating point numbers. There is support for
integers and strings but not floating point. Since I need to use this for
several fields, it would be non-ideal to create a hook for each of these
fields.
The change required is quite simple. Add the following code to
horde/lib/Prefs/ui.php right after the case 'number' element.
case 'floatnumber': // SDS 2/16/2005
$num = Util::getPost($pref);
if (floatval($num) != $num) {
$notification->push(_("This value must be a
number."), 'horde.error');
} else {
$updated = $updated | $save->setValue($pref,
$num);
}
break;
Additionally, a file must be added to horde/templates/prefs/ for that
particular data type. I have included the appropriate file in attachment.
thanks,
Scott.
More information about the bugs
mailing list