diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/elements/select-svc_pbx.html | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/elements/select-svc_pbx.html')
-rw-r--r-- | httemplate/elements/select-svc_pbx.html | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/httemplate/elements/select-svc_pbx.html b/httemplate/elements/select-svc_pbx.html deleted file mode 100644 index 19bce96ca..000000000 --- a/httemplate/elements/select-svc_pbx.html +++ /dev/null @@ -1,57 +0,0 @@ -<SELECT <% $opt{'multiple'} ? 'MULTIPLE' : 'SIZE=1' %> - NAME = "<% $opt{'element_name'} || $opt{'field'} || 'pbxsvc' %>" - <% $opt{'element_etc'} %> -> - -% unless ( $opt{'multiple'} || $opt{'disable_empty'} ) { - <OPTION VALUE=""><% $opt{'empty_label'} || '' %> -% } - -% foreach my $svcnum ( -% sort { $svc_pbx{$a} cmp $svc_pbx{$b} } -% keys %svc_pbx -% ) { -% my $svc_pbx = $svc_pbx{$svcnum}; -% my $selected = ($svcnum == $pbxsvc) ? ' SELECTED' : ''; - - <OPTION VALUE="<% $svcnum %>" <% $selected %>><% $svc_pbx{$svcnum} %> - -% } - -</SELECT> -<%init> - -# false laziness w/select-svc_acct-domain.html - -my %opt = @_; - -my $pbxsvc = $opt{'curr_value'}; -my $part_svc = $opt{'part_svc'} - || qsearchs('part_svc', { 'svcpart' => $opt{'svcpart'} }); -my $svcpart = $part_svc ? $part_svc->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_pbx = (); - -if ( $pbxsvc ) { - my $svc_pbx = qsearchs('svc_pbx', { 'svcnum' => $pbxsvc } ); - if ( $svc_pbx ) { - $svc_pbx{$svc_pbx->svcnum} = $svc_pbx; - } else { - warn "unknown svc_pbx.svcnum for svc_acct.pbxsvc: $pbxsvc"; - } -} - -%svc_pbx = ( - %svc_pbx, - FS::svc_Common->pbx_select_hash( 'svcpart' => $svcpart, - 'pkgnum' => $pkgnum, - ) -); -</%init> |