diff --git a/include/class.forms.php b/include/class.forms.php index d87d9501cfbc1985ae8a820b188d26f5464ed570..11419d2f8ce16a19c075c7f1da6a616be38cd412 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1960,6 +1960,40 @@ class ChoiceField extends FormField { } } +class NumericField extends FormField { + + function getSearchMethods() { + return array( + 'equal' => __('Equal'), + 'greater' => __('Greater Than'), + 'less' => __('Less Than'), + ); + } + + function getSearchMethodWidgets() { + return array( + 'equal' => array('TextboxField', array( + 'configuration' => array( + 'validator' => 'number', + 'size' => 6 + ), + )), + 'greater' => array('TextboxField', array( + 'configuration' => array( + 'validator' => 'number', + 'size' => 6 + ), + )), + 'less' => array('TextboxField', array( + 'configuration' => array( + 'validator' => 'number', + 'size' => 6 + ), + )), + ); + } +} + class DatetimeField extends FormField { static $widget = 'DatetimePickerWidget';