%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
$line{'Field'} = $CustomField->Name;
# Op
- if ($CustomField->Type eq 'Date') {
+ if ($CustomField->Type =~ /^Date(Time)?$/ ) {
$line{'Op'} = {
Type => 'component',
Path => '/Elements/SelectDateRelation',
Arguments => {},
};
+ }
+ elsif ($CustomField->Type =~ /^IPAddress(Range)?$/ ) {
+ $line{'Op'} = {
+ Type => 'component',
+ Path => '/Elements/SelectIPRelation',
+ Arguments => {},
+ };
} else {
$line{'Op'} = {
Type => 'component',
}
# Value
- if ($CustomField->Type eq 'Date') {
+ if ($CustomField->Type =~ /^Date(Time)?$/) {
+ my $is_datetime = $1 ? 1 : 0;
$line{'Value'} = {
Type => 'component',
Path => '/Elements/SelectDate',
- Arguments => {},
+ Arguments => { $is_datetime ? (ShowTime => 1) : (ShowTime => 0), },
};
} else {
$line{'Value'} = {