[freeside-commits] freeside/httemplate/elements tr-select-svc-domain.html, NONE, 1.1 select-svc-domain.html, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Sun Mar 7 23:03:00 PST 2010
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv12478/httemplate/elements
Added Files:
tr-select-svc-domain.html select-svc-domain.html
Log Message:
domain names in netsapiens export (domain name association w/svc_phone), RT#5864
--- NEW FILE: tr-select-svc-domain.html ---
%if ( $columnflag eq 'F' ) {
<INPUT TYPE="hidden" NAME="domsvc" VALUE="<% $domsvc %>">
% } else {
<TR>
<TD ALIGN="right"><% $opt{'label'} || 'Domain' %></TD>
<TD>
<% include('/elements/select-svc-domain.html',
'curr_value' => $domsvc,
'part_svc' => $part_svc,
'cust_pkg' => $cust_pkg,
)
%>
</TD>
</TR>
% }
<%init>
my %opt = @_;
my $domsvc = $opt{'curr_value'};
#required
my $part_svc = $opt{'part_svc'}
|| qsearchs('part_svc', { 'svcpart' => $opt{'svcpart'} });
my $columnflag = $part_svc->part_svc_column('domsvc')->columnflag;
#optional
my $cust_pkg = $opt{'cust_pkg'};
$cust_pkg ||= qsearchs('cust_pkg', { 'pkgnum' => $opt{'pkgnum'} })
if $opt{'pkgnum'};
</%init>
--- NEW FILE: select-svc-domain.html ---
<SELECT NAME="domsvc" SIZE=1>
% foreach my $svcnum (
% sort { $svc_domain{$a} cmp $svc_domain{$b} }
% keys %svc_domain
% ) {
<OPTION VALUE="<% $svcnum %>"
<% ($svcnum == $domsvc) ? ' SELECTED' : '' %>
><% $svc_domain{$svcnum} %>
% }
</SELECT>
<%init>
my %opt = @_;
my %svc_domain = ();
my $domsvc;
my $domsvc = $opt{'curr_value'};
my $part_svc = $opt{'part_svc'}
|| qsearchs('part_svc', { 'svcpart' => $opt{'svcpart'} });
#optional
my $cust_pkg = $opt{'cust_pkg'};
$cust_pkg ||= qsearchs('cust_pkg', { 'pkgnum' => $opt{'pkgnum'} })
if $opt{'pkgnum'};
my $pkgnum = $cust_pkg ? $cust_pkg->pkgnum : '';
my %svc_domain = ();
if ( $domsvc ) {
my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $domsvc } );
if ( $svc_domain ) {
$svc_domain{$svc_domain->svcnum} = $svc_domain;
} else {
warn "unknown svc_domain.svcnum for svc_acct.domsvc: $domsvc";
}
}
%svc_domain = (
%svc_domain,
FS::svc_Domain_Mixin->domain_select_hash( 'svcpart' => $part_svc->svcpart,
'pkgnum' => $pkgnum,
)
);
</%init>
More information about the freeside-commits
mailing list