[freeside-commits] freeside/httemplate/elements tr-tower_sector.html, NONE, 1.1.2.2 tower_sector.html, NONE, 1.1.2.2 tr-select-tower_sector.html, NONE, 1.1.2.2 select-tower_sector.html, NONE, 1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Fri Dec 9 16:37:06 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv5092/httemplate/elements
Added Files:
Tag: FREESIDE_2_3_BRANCH
tr-tower_sector.html tower_sector.html
tr-select-tower_sector.html select-tower_sector.html
Log Message:
tower tracking, RT#15538
--- NEW FILE: tr-tower_sector.html ---
% unless ( $opt{'js_only'} ) {
<% include('tr-td-label.html', %opt) %>
<TD <% $cell_style %>>
% }
%
<% include( '/elements/sector.html', %opt ) %>
%
% unless ( $opt{'js_only'} ) {
</TD>
</TR>
% }
<%init>
my( %opt ) = @_;
my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
$opt{'label'} ||= 'Sector';
</%init>
--- NEW FILE: tower_sector.html ---
% 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',
;
my @fields = keys %label;
</%init>
--- NEW FILE: tr-select-tower_sector.html ---
<% include('tr-td-label.html', label => emt('Tower sector'), %opt ) %>
<TD <% $style %>>
<% include( '/elements/select-tower_sector.html', %opt ) %>
</TD>
</TR>
<%init>
my( %opt ) = @_;
my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
</%init>
--- NEW FILE: select-tower_sector.html ---
<& /elements/select-table.html,
table => 'tower_sector',
name_col => 'description',
order_by => 'ORDER BY towernum,sectorname',
empty_label => ' ',
@_
&>
More information about the freeside-commits
mailing list