[Tickets #1395] Add preference data type support for floating point numbers

bugs at bugs.horde.org bugs at bugs.horde.org
Thu Feb 17 18:23:31 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
 Updated By         | scott at realorganized.com
 Summary            | Add preference data type support for floating point numbers
 Queue              | Horde Base
 Version            | 3.0.3
 State              | Assigned
 Priority           | 1. Low
 Type               | Enhancement
 Owners             | Horde Developers
-----------------------------------------------------------------------


scott at realorganized.com (2005-02-17 18:23) wrote:

Here is a sample handler function which would go into the application's
pref.php file for each type that a UI widget is created for.  The $pref
variable is the individual preference for which the UI widget is being
handled for.

function handle_largefloat($updated, $pref)
{
    global $prefs, $notification;   
    $num = Util::getPost($pref);
    if (floatval($num) != $num) {
        $notification->push(_("This value must be a number."),
'horde.error');
    } else {
        $updated = $updated | $prefs->setValue($pref, $num);
    }
    return $updated;
}

The .inc file with the html code is identical to the existing help controls
with the exception that the file name uses the type rather than the property
name.




More information about the bugs mailing list