<%doc> <& head.html, %opt &> <& /elements/tr-select.html, label => 'SNMP version', field => 'version', options => [ '', 'v1', 'v2c' ], labels => { v1 => '1', v2c => '2c' }, curr_value => $part_export->option('version') &> <& /elements/tr-input-text.html, label => 'Community', field => 'community', curr_value => $curr_value->{'community'}, &> <& /elements/tr-checkbox.html, label => 'Send IP address changes to new address', field => 'ip_addr_change_to_new', value => 1, curr_value => $part_export->option('ip_addr_change_to_new'), &> <& /elements/tr-input-text.html, label => 'Timeout (seconds)', field => 'timeout', curr_value => $part_export->option('timeout'), &> <& /elements/auto-table.html, template_row => 'mytemplate', fieldorder => ['action', 'oid', 'datatype', 'value'], data => \@data, &> <& foot.html, %opt &> <%init> my %opt = @_; my $part_export = $opt{part_export} || FS::part_export->new; my $curr_value = {}; $curr_value->{'community'} = ($opt{'part_export'} && $opt{'part_export'}->exportnum) ? $part_export->option('community') : $opt{'export_info'}->{'options'}->{'community'}->{'default'}; my @actions = split("\n", $part_export->option('action')); my @oids = split("\n", $part_export->option('oid')); my @types = split("\n", $part_export->option('datatype')); my @values = split("\n", $part_export->option('value')); my @data; while (@actions or @oids or @values) { my @thisrow = (shift(@actions), shift(@oids), shift(@types), shift(@values)); push @data, \@thisrow if grep length($_), @thisrow; } my $popup_name = 'popup-'.time."-$$-".rand() * 2**32;
Action Object Type Value