diff options
| author | Jonathan Prykop <jonathan@freeside.biz> | 2016-01-11 13:37:01 -0600 |
|---|---|---|
| committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-01-11 13:37:01 -0600 |
| commit | 8c8872f684ccfa43dae290877c2cf8aed8828a9f (patch) | |
| tree | c5c3ddade7816ca986597c1c6ce94409385942c1 /httemplate/edit/elements/part_export/broadband_snmp.html | |
| parent | cd73f00695cd1d118133669f09585c1b3d4322f6 (diff) | |
RT#39115: View SNMP info on svc_broadband service [fix to default value handling]
Diffstat (limited to 'httemplate/edit/elements/part_export/broadband_snmp.html')
| -rw-r--r-- | httemplate/edit/elements/part_export/broadband_snmp.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/httemplate/edit/elements/part_export/broadband_snmp.html b/httemplate/edit/elements/part_export/broadband_snmp.html index b4d57edd5..63b61e27e 100644 --- a/httemplate/edit/elements/part_export/broadband_snmp.html +++ b/httemplate/edit/elements/part_export/broadband_snmp.html @@ -11,7 +11,7 @@ <& /elements/tr-input-text.html, label => 'Community', field => 'community', - curr_value => $part_export->option('community') || $opt{'export_info'}->{'options'}->{'community'}->{'default'}, + curr_value => $curr_value->{'community'}, &> <& /elements/tr-checkbox.html, label => 'Send IP address changes to new address', @@ -88,6 +88,10 @@ function receive_mib(obj, rownum) { <%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')); |
