diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-12-10 20:59:42 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-12-10 20:59:42 -0800 |
commit | 430b2c784d2ee9ea5be00b821d2dbd27279ef132 (patch) | |
tree | c8a224219c1425bd3fa03b1a54487bf1f3de7449 /httemplate/edit/process | |
parent | 6ced51db0e73603461591e54b7f606467e7c7af0 (diff) | |
parent | e1157f37c618a7b9cdb2793d61999458076dc51b (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Conflicts:
FS/FS/Mason.pm
FS/MANIFEST
Diffstat (limited to 'httemplate/edit/process')
-rw-r--r-- | httemplate/edit/process/addr_range.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/httemplate/edit/process/addr_range.html b/httemplate/edit/process/addr_range.html new file mode 100644 index 000000000..6b05d23a5 --- /dev/null +++ b/httemplate/edit/process/addr_range.html @@ -0,0 +1,22 @@ +<& elements/process.html, + 'table' => 'addr_range', + 'popup_reload' => 'Address range changed', + 'precheck_callback' => sub { + my ($cgi) = @_; + my $start = NetAddr::IP->new($cgi->param('start'), 0) + or return 'Illegal or empty (IP address) start: '.$cgi->param('start'); + if ( length($cgi->param('end')) ) { + my $end = NetAddr::IP->new($cgi->param('end'), 0) + or return 'Illegal or empty (IP address) end: '.$cgi->param('end'); + if ( $end < $start ) { + ($start, $end) = ($end, $start); + $cgi->param('end', $end->addr); + $cgi->param('start', $start->addr); + } + $cgi->param('length', $end - $start + 1); + } else { + $cgi->param('length', 1); + } + ''; + }, +&> |