summaryrefslogtreecommitdiff
path: root/httemplate/edit/elements
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/elements')
-rw-r--r--httemplate/edit/elements/edit.html8
-rw-r--r--httemplate/edit/elements/part_export/broadband_snmp_get.html13
-rw-r--r--httemplate/edit/elements/part_svc_column.html19
-rw-r--r--httemplate/edit/elements/svc_Common.html10
4 files changed, 45 insertions, 5 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html
index 8ba703a2f..1d472099b 100644
--- a/httemplate/edit/elements/edit.html
+++ b/httemplate/edit/elements/edit.html
@@ -114,6 +114,9 @@ Example:
#we're in a popup (no title/menu/searchboxes)
'popup' => 1,
+ #if you need to access the submit button
+ 'submit_id' => 'mysubmitbuttonid',
+
#we're embedded (rows only: no header at all, no html_init, no error
# display, no <FORM>, no hidden fields for table name or primary key, no
# display of primary key, no submit button, no html_foot, no footer)
@@ -398,6 +401,8 @@ Example:
%
% my $layer_prefix_on = '';
%
+% my $submitid = $opt{submit_id} ? $opt{submit_id} : '';
+%
% my $include_sub = sub {
% my %opt = @_;
%
@@ -422,6 +427,7 @@ Example:
% 'field' => "$field$fieldnum",
% 'id' => "$field$fieldnum", #separate?
% 'label_id' => $field."_label$fieldnum", #don't want field0_label0...
+% 'submit_id' => $submitid,
% %include_common,
% %opt,
% );
@@ -669,7 +675,7 @@ Example:
var newrow = <% include(@layer_opt, html_only=>1) |js_string %>;
% #until the rest have html/js_only
-% if ( ($type eq 'selectlayers') || ($type eq 'selectlayersx') || ($type =~ /^select-cgp_rule_/) ) {
+% if ( ($type eq 'selectlayers') || ($type eq 'selectlayersx') || ($type =~ /^select-cgp_rule_/) || ($type eq 'contact') ) {
var newfunc = <% include(@layer_opt, js_only=>1) |js_string %>;
% } else {
var newfunc = '';
diff --git a/httemplate/edit/elements/part_export/broadband_snmp_get.html b/httemplate/edit/elements/part_export/broadband_snmp_get.html
index faf179acc..a426e617d 100644
--- a/httemplate/edit/elements/part_export/broadband_snmp_get.html
+++ b/httemplate/edit/elements/part_export/broadband_snmp_get.html
@@ -45,20 +45,23 @@ function receive_mib_get(obj, rownum) {
</script>
<table bgcolor="#cccccc" border=0 cellspacing=3>
-<TR><TH>Object ID</TH></TR>
+<TR><TH>Object Name</TH><TH>Object ID</TH></TR>
<TR id="broadband_snmp_get_template">
<TD>
+ <INPUT NAME="oid_name" ID="oid_name" SIZE="25">
+ </TD>
+ <TD>
<INPUT NAME="oid" ID="oid" SIZE="54">
<INPUT TYPE="button" VALUE="..." ID="openselector" onclick="open_select_mib_get(this)">
</TD>
</TR>
<& /elements/auto-table.html,
template_row => 'broadband_snmp_get_template',
- fieldorder => ['oid'],
+ fieldorder => ['oid_name','oid'],
data => \@data,
table => 'snmp',
&>
-<INPUT TYPE="hidden" NAME="multi_options" VALUE="snmp_oid">
+<INPUT TYPE="hidden" NAME="multi_options" VALUE="snmp_oid,snmp_oid_name">
<& foot.html, %opt &>
<%init>
my %opt = @_;
@@ -73,11 +76,13 @@ foreach my $field ( qw(snmp_version snmp_community snmp_timeout) ) {
}
my @oids = split("\n", $part_export->option('snmp_oid'));
+my @oid_names = split("\n", $part_export->option('snmp_oid_name'));
my @data;
while (@oids) {
my @thisrow = (shift(@oids));
- push @data, \@thisrow if grep length($_), @thisrow;
+ my $name = shift(@oid_names);
+ push @data, [$name, \@thisrow] if grep length($_), @thisrow;
}
my $popup_name = 'popup-'.time."-$$-".rand() * 2**32;
diff --git a/httemplate/edit/elements/part_svc_column.html b/httemplate/edit/elements/part_svc_column.html
index 816f3428b..bdbce7c79 100644
--- a/httemplate/edit/elements/part_svc_column.html
+++ b/httemplate/edit/elements/part_svc_column.html
@@ -15,6 +15,7 @@ To be called from part_svc.cgi.
# don't allow the 'inventory' flags (M, A) to be chosen for
# fields that aren't free-text
my $inv_sub = sub { $_[0]->{disable_inventory} || $_[0]->{type} ne 'text' };
+
tie my %flag, 'Tie::IxHash',
'' => { 'desc' => 'No default', 'condition' => sub { 0 } },
'D' => { 'desc' => 'Default',
@@ -38,6 +39,9 @@ tie my %flag, 'Tie::IxHash',
'H' => { 'desc' => 'Select from hardware class',
'condition' => sub { $_[0]->{type} ne 'select-hardware' },
},
+ 'P' => { 'desc' => 'From package FCC 477 information',
+ 'condition' => sub { $_[0]->{type} ne 'fcc_477_speed' }, # get values from package fcc 477 information
+ },
'X' => { 'desc' => 'Excluded',
'condition' => sub { 1 }, # obsolete
},
@@ -202,6 +206,20 @@ my %communigate_fields = (
% $mode = 'hardware';
% $multiple = 0;
% }
+%
+% if ( $def->{'type'} eq 'fcc_477_speed' ) {
+% if ($field eq 'speed_up') {
+ <SPAN ID="<% $name %>_select">
+ upstream speed
+ <INPUT TYPE="hidden" ID="<% $name %>_select" NAME="<% $name %>_classnum" VALUE="up">
+ </SPAN>
+% } elsif ($field eq 'speed_down') {
+ <SPAN ID="<% $name %>_select">
+ downstream speed
+ <INPUT TYPE="hidden" ID="<% $name %>_select" NAME="<% $name %>_classnum" VALUE="down">
+ </SPAN>
+% }
+% } else {
<& /elements/select-table.html,
'field' => $name.'_classnum',
'id' => $name.'_select',
@@ -211,6 +229,7 @@ my %communigate_fields = (
'empty_label' => "Select $mode class",
'multiple' => $multiple,
&>
+% }
% }
</TD>
<TD>
diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html
index a4e345e40..e1c309080 100644
--- a/httemplate/edit/elements/svc_Common.html
+++ b/httemplate/edit/elements/svc_Common.html
@@ -169,6 +169,16 @@
];
} # shouldn't this be enforced for all 'S' fields?
+ elsif ( $flag eq 'P' ) { #form fcc_477 values
+ $f->{type} = 'fixed';
+ my $cust_pkg = FS::Record::qsearchs({
+ 'table' => 'cust_pkg',
+ 'hashref' => { 'pkgnum' => $object->{Hash}->{pkgnum} }
+ });
+ my $fcc_record = $cust_pkg->fcc_477_record('broadband_'.$columndef->columnvalue.'stream') if $cust_pkg;
+ $f->{'value'} = $fcc_record->{Hash}->{optionvalue} ? $fcc_record->{Hash}->{optionvalue} * 1000 : '';
+ } # end 477 values
+
if ( $f->{'type'} =~ /^select-svc/ )
{
$f->{'include_opt_callback'} =