diff options
Diffstat (limited to 'httemplate/edit/part_svc.cgi')
-rwxr-xr-x | httemplate/edit/part_svc.cgi | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index 79703435c..98ed9fec1 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -15,10 +15,12 @@ Disable new orders <INPUT TYPE="checkbox" NAME="disabled" VALUE="Y"<% $hashref-> Service definitions are the templates for items you offer to your customers. <UL><LI>svc_acct - Accounts - anything with a username (Mailboxes, PPP accounts, shell accounts, RADIUS entries for broadband, etc.) <LI>svc_domain - Domains - <LI>svc_forward - mail forwarding + <LI>svc_forward - Mail forwarding + <LI>svc_mailinglist - Mailing list <LI>svc_www - Virtual domain website <LI>svc_broadband - Broadband/High-speed Internet service (always-on) <LI>svc_phone - Customer phone numbers + <LI>svc_pbx - Customer PBXs <LI>svc_external - Externally-tracked service <!-- <LI>svc_charge - One-time charges (Partially unimplemented) <LI>svc_wo - Work orders (Partially unimplemented) @@ -64,10 +66,9 @@ that field. % 'condition' => % sub { !ref($_[0]) || $_[0]->{disable_select} }, % }, -%# need to template-ize httemplate/edit/svc_* first -%# 'M' => { 'desc' => 'Manual selection from inventory', -%# 'condition' => $inv_sub, -%# }, +% 'M' => { 'desc' => 'Manual selection from inventory', +% 'condition' => $inv_sub, +% }, % 'A' => { 'desc' => 'Automatically fill in from inventory', % 'condition' => $inv_sub, % }, @@ -184,6 +185,9 @@ that field. % % foreach my $f ( keys %flag ) { % +% # need to template-ize more httemplate/edit/svc_* first +% next if $f eq 'M' and $layer !~ /^svc_(broadband|external|phone)$/; +% % #here is where the SUB from above is called, to skip some choices % next if $flag{$f}->{condition} % && &{ $flag{$f}->{condition} }( $def, $layer, $field ); @@ -265,6 +269,14 @@ that field. % 'empty_label' => 'Select inventory class', % ); % +% } elsif ( $def->{type} eq 'checkbox' ) { +% +% $html .= include('/elements/checkbox.html', +% 'field' => $layer.'__'.$field, +% 'curr_value' => $value, +% 'value' => 'Y', +% ); +% % } elsif ( $def->{type} eq 'select' ) { % % $html .= qq!<SELECT NAME="${layer}__${field}" $disabled!; @@ -288,6 +300,15 @@ that field. % } #endif % $html .= '</SELECT>'; % +% } elsif ( $def->{type} eq 'select-svc_pbx.html' ) { +% +% $html .= include('/elements/select-svc_pbx.html', +% 'curr_value' => $value, +% 'element_name' => "${layer}__${field}", +% 'element_etc' => $disabled, +% 'multiple' => ($flag eq 'S'), +% ); +% % } elsif ( $def->{type} eq 'radius_usergroup_selector' ) { % % #XXX disable the RADIUS usergroup selector? ugh it sure does need @@ -296,6 +317,14 @@ that field. % $html .= FS::svc_acct::radius_usergroup_selector( % [ split(',', $value) ], "${layer}__${field}" ); % +% } elsif ( $def->{type} eq 'communigate_pro-accessmodes' ) { +% +% $html .= include('/elements/communigate_pro-accessmodes.html', +% 'element_name_prefix' => "${layer}__${field}_", +% 'curr_value' => $value, +% #doesn't work#'element_etc' => $disabled, +% ); +% % } elsif ( $def->{type} eq 'disabled' ) { % % $html .= @@ -303,7 +332,7 @@ that field. % % } else { % -% $html .= '<font color="#ff0000">unknown type'. $def->{type}; +% $html .= '<font color="#ff0000">unknown type '. $def->{type}; % % } % |