X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_svc.cgi;h=ce8c463b76b299abd7d4dc467c75eb0d6340e3ec;hb=4d9d7b07924ceb7386c0b5fc40e2ebc535bf3e4b;hp=45e0b6ffe8f0f52aa8221205bbcc8925eeb59313;hpb=58d44fbe5eb9ab32e6d87063a4a3b22ddba9a828;p=freeside.git diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index 45e0b6ffe..ce8c463b7 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -50,9 +50,9 @@ Disable new orders
  • svc_acct - Shell accounts, POP mailboxes, SLIP/PPP and ISDN accounts
  • svc_domain - Domains +
  • svc_acct_sm - deprecated (use svc_forward for new installations) Virtual domain mail aliasing.
  • svc_forward - mail forwarding
  • svc_www - Virtual domain website -
  • svc_broadband - Broadband/High-speed Internet service @@ -65,11 +65,9 @@ blank slipip as well as a fixed shell something like /bin/true or

    <% - -my %vfields; - #these might belong somewhere else for other user interfaces #pry need to eventually create stuff that's shared amount UIs +my $conf = new FS::Conf; my %defs = ( 'svc_acct' => { 'dir' => 'Home directory', @@ -90,7 +88,11 @@ my %defs = ( 'quota' => '', '_password' => 'Password', 'gid' => 'GID (when blank, defaults to UID)', - 'shell' => 'Shell (all service definitions should have a default or fixed shell that is present in the shells configuration file)', + 'shell' => { + desc =>'Shell (all service definitions should have a default or fixed shell that is present in the shells configuration file)', + type =>'select', + select_list => [ $conf->config('shells') ], + }, 'finger' => 'GECOS', 'domsvc' => { desc =>'svcnum from svc_domain', @@ -107,51 +109,32 @@ my %defs = ( 'svc_domain' => { 'domain' => 'Domain', }, + 'svc_acct_sm' => { + 'domuser' => 'domuser@virtualdomain.com', + 'domuid' => 'UID where domuser@virtualdomain.com mail is forwarded', + 'domsvc' => 'svcnum from svc_domain for virtualdomain.com', + }, 'svc_forward' => { 'srcsvc' => 'service from which mail is to be forwarded', 'dstsvc' => 'service to which mail is to be forwarded', 'dst' => 'someone@another.domain.com to use when dstsvc is 0', }, -# 'svc_charge' => { -# 'amount' => 'amount', -# }, -# 'svc_wo' => { -# 'worker' => 'Worker', -# '_date' => 'Date', -# }, + 'svc_charge' => { + 'amount' => 'amount', + }, + 'svc_wo' => { + 'worker' => 'Worker', + '_date' => 'Date', + }, 'svc_www' => { #'recnum' => '', #'usersvc' => '', }, - 'svc_broadband' => { - 'speed_down' => 'Maximum download speed for this service in Kbps. 0 denotes unlimited.', - 'speed_up' => 'Maximum upload speed for this service in Kbps. 0 denotes unlimited.', - 'ip_addr' => 'IP address. Leave blank for automatic assignment.', - 'blocknum' => 'Address block.', - }, ); - foreach $svcdb (keys(%defs)) { - my $self = "FS::$svcdb"->new; - $vfields{$svcdb} = {}; - foreach my $field ($self->virtual_fields) { # svc_Common::virtual_fields with a null svcpart returns all of them - my $pvf = $self->pvf($field); - my @list = $pvf->list; - if (scalar @list) { - $defs{$svcdb}->{$field} = { desc => $pvf->label, - type => 'select', - select_list => \@list }; - } else { - $defs{$svcdb}->{$field} = $pvf->label; - } #endif - $vfields{$svcdb}->{$field} = $pvf; - warn "\$vfields{$svcdb}->{$field} = $pvf"; - } #next $field - } #next $svcdb - my @dbs = $hashref->{svcdb} ? ( $hashref->{svcdb} ) - : qw( svc_acct svc_domain svc_forward svc_www svc_broadband ); + : qw( svc_acct svc_domain svc_acct_sm svc_forward svc_www ); tie my %svcdb, 'Tie::IxHash', map { $_=>$_ } @dbs; my $widget = new HTML::Widgets::SelectLayers( @@ -174,7 +157,7 @@ my %defs = ( $html .= '

    '. table(). table(). "Exports"; foreach my $part_export ( @part_export ) { - $html .= 'svcpart ) #null svcpart search causing error @@ -219,8 +202,8 @@ my %defs = ( qq!Default ". qq!Fixed "; - $html .= '
    '; + ' CHECKED'x($flag eq 'F'). ">Fixed ". + '
    '; } if ( ref($def) ) { if ( $def->{type} eq 'select' ) { @@ -254,11 +237,6 @@ my %defs = ( $html .= qq!!; } - - if($vfields{$layer}->{$field}) { - $html .= qq!
    Excluded "; - } $html .= "\n"; } $part_svc->svcpart('') if $clone; #undone