default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / elements / part_export / broadband_snmp.html
index b4d57ed..44b80f4 100644 (file)
@@ -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',
@@ -75,7 +75,7 @@ function receive_mib(obj, rownum) {
     <INPUT TYPE="text" NAME="datatype" ID="datatype">
   </TD>
   <TD>
-    <INPUT NAME="value" ID="value">
+    <INPUT NAME="value" ID="value" SIZE="30">
   </TD>
 </TR>
 <& /elements/auto-table.html,
@@ -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'));