[freeside-commits] branch master updated. 74200be4e8f20a86e103e447bb19c301abffdb4b

Christopher Burger burgerc at freeside.biz
Wed May 1 05:31:35 PDT 2019


The branch, master has been updated
       via  74200be4e8f20a86e103e447bb19c301abffdb4b (commit)
      from  1ade81c5455b7a74a7ccc374bc980444f30f6a1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 74200be4e8f20a86e103e447bb19c301abffdb4b
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Wed May 1 08:30:54 2019 -0400

    RT# 83250 - added expected data description to sector fields

diff --git a/httemplate/elements/tower_sector.html b/httemplate/elements/tower_sector.html
new file mode 100644
index 000000000..cdcf67d7b
--- /dev/null
+++ b/httemplate/elements/tower_sector.html
@@ -0,0 +1,70 @@
+% unless ( $opt{'js_only'} ) {
+
+  <INPUT TYPE="hidden" NAME="<%$name%>" ID="<%$id%>" VALUE="<% $curr_value %>">
+
+  <TABLE>
+    <TR>
+%     foreach my $field ( @fields ) {
+
+        <TD>
+          <INPUT TYPE  = "text"
+                 NAME  = "<%$name%>_<%$field%>"
+                 ID    = "<%$id%>_<%$field%>"
+                 SIZE  = "<% $size{$field} || 15 %>"
+                 VALUE = "<% scalar($cgi->param($name."_$field"))
+                             || $tower_sector->get($field) |h %>"
+                 <% $onchange %>
+          ><BR>
+          <FONT SIZE="-1"><% $label{$field} %></FONT>
+        </TD>
+%     }
+    </TR>
+  </TABLE>
+
+
+% }
+<%init>
+
+my( %opt ) = @_;
+
+my $name = $opt{'element_name'} || $opt{'field'} || 'sectornum';
+my $id = $opt{'id'} || 'sectornum';
+
+my $curr_value = $opt{'curr_value'} || $opt{'value'};
+
+my $onchange = '';
+if ( $opt{'onchange'} ) {
+  $onchange = $opt{'onchange'};
+  $onchange .= '(this)' unless $onchange =~ /\(\w*\);?$/;
+  $onchange =~ s/\(what\);/\(this\);/g; #ugh, terrible hack.  all onchange
+                                        #callbacks should act the same
+  $onchange = 'onChange="'. $onchange. '"';
+}
+
+my $tower_sector;
+if ( $curr_value ) {
+  $tower_sector = qsearchs('tower_sector', { 'sectornum' => $curr_value } );
+} else {
+  $tower_sector = new FS::tower_sector {};
+}
+
+my %size = ( 'title' => 12 );
+
+tie my %label, 'Tie::IxHash',
+  'sectorname'   => 'Name',
+  'ip_addr'      => 'IP Address',
+  'height'       => 'Height (feet)',
+  'freq_mhz'     => 'Freq. (MHz)',
+  'direction'    => 'Direction (° from north)', # or a button to set these to 0 for omni
+  'downtilt'     => 'Downtilt (° below horizontal)',
+  'width'        => 'Horiz. width (° 0 - 360)',
+  'v_width'      => 'Vert. width (° 0 - 360)',
+  'sector_range' => 'Range (miles)',
+  'margin'       => 'Signal margin (dB)',
+  'up_rate_limit' => 'Up rate limit (kbps)',
+  'down_rate_limit' => 'Down rate limit (kbps)',
+;
+
+my @fields = keys %label;
+
+</%init>

-----------------------------------------------------------------------

Summary of changes:
 .../{rate_tier_detail.html => tower_sector.html}   | 34 ++++++++++++----------
 1 file changed, 19 insertions(+), 15 deletions(-)
 copy httemplate/elements/{rate_tier_detail.html => tower_sector.html} (56%)




More information about the freeside-commits mailing list