Skip to content
Snippets Groups Projects
Commit af829e82 authored by Peter Rotich's avatar Peter Rotich
Browse files

Add NumericField

parent 2f7e3a01
Branches
Tags
No related merge requests found
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment