X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fpart_svc.cgi;h=d4bb4704c013279f2b6d06f846af78929ac1961a;hb=030bef17868168b05a67d9f5866b55da1bb9439c;hp=91995674a3bf500479d147053f556a0a1cc9222b;hpb=22a35047ecdffff80110e06cc08fc84f9ddba9b0;p=freeside.git
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi
index 91995674a..d4bb4704c 100755
--- a/httemplate/edit/part_svc.cgi
+++ b/httemplate/edit/part_svc.cgi
@@ -1,9 +1,17 @@
+
<%
my $part_svc;
+ my $clone = '';
if ( $cgi->param('error') ) { #error
$part_svc = new FS::part_svc ( {
map { $_, scalar($cgi->param($_)) } fields('part_svc')
} );
+ } elsif ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {#clone
+ #$cgi->param('clone') =~ /^(\d+)$/ or die "malformed query: $query";
+ $part_svc = qsearchs('part_svc', { 'svcpart'=>$1 } )
+ or die "unknown svcpart: $1";
+ $clone = $part_svc->svcpart;
+ $part_svc->svcpart('');
} elsif ( $cgi->keywords ) { #edit
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ or die "malformed query: $query";
@@ -14,25 +22,16 @@
}
my $action = $part_svc->svcpart ? 'Edit' : 'Add';
my $hashref = $part_svc->hashref;
- my $p_svcdb = $part_svc->svcdb || 'svc_acct';
+# my $p_svcdb = $part_svc->svcdb || 'svc_acct';
-%>
-
+ #" onLoad=\"visualize()\""
+%>
<%= header("$action Service Definition",
menubar( 'Main Menu' => $p,
'View all service definitions' => "${p}browse/part_svc.cgi"
),
- " onLoad=\"visualize()\""
)
%>
@@ -46,13 +45,14 @@ function visualize(what) {
Service
Disable new orders {disabled} eq 'Y' ? ' CHECKED' : '' %>>
+
Services are items you offer to your customers.
0e0
[zero e zero] to enable export to RADIUS without a Framed-IP-Address.)',
- 'popnum' => qq!POP number!,
- 'username' => 'Username',
+# 'popnum' => qq!POP number!,
+ 'popnum' => {
+ desc => 'Access number',
+ type => 'select',
+ select_table => 'svc_acct_pop',
+ select_key => 'popnum',
+ select_label => 'city',
+ },
+ 'username' => {
+ desc => 'Username',
+ type => 'disabled',
+ },
'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)',
'finger' => 'GECOS',
- 'domsvc' => 'svcnum from svc_domain',
+ 'domsvc' => {
+ desc =>'svcnum from svc_domain',
+ type =>'select',
+ select_table => 'svc_domain',
+ select_key => 'svcnum',
+ select_label => 'domain',
+ },
+ 'usergroup' => {
+ desc =>'ICRADIUS/FreeRADIUS groups',
+ type =>'radius_usergroup_selector',
+ },
},
'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',
@@ -136,104 +120,130 @@ my %defs = (
#'recnum' => '',
#'usersvc' => '',
},
+ 'svc_broadband' => {
+ 'actypenum' => 'This is the actypenum that refers to the type of AC that can be provisioned for this service. This field must be set fixed.',
+ '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.',
+ 'acnum' => 'acnum of a specific AC that this service is restricted to. Not required',
+ 'ip_addr' => 'IP address. Leave blank for automatic assignment.',
+ 'ip_netmask' => 'Mask length, aka. netmask bits. (Eg. 255.255.255.0 == 24)',
+ 'mac_addr' => 'MAC address which is used by some ACs for access control. Specified by 6 colon seperated hex octets. (Eg. 00:00:0a:bc:1a:2b)',
+ 'location' => 'Defines the physically location at which this service was installed. This is not necessarily the billing address',
+ },
);
-# svc_acct svc_domain svc_acct_sm svc_charge svc_wo
-foreach my $svcdb ( qw(
- konq_kludge svc_acct svc_domain svc_acct_sm svc_forward svc_www
-) ) {
-
-# my(@fields) = $svcdb eq 'konq_kludge'
-# ? ()
-# : grep { $_ ne 'svcnum' } fields($svcdb);
- #yucky kludge
- my(@fields) = defined( $FS::Record::dbdef->table($svcdb) )
- ? grep { $_ ne 'svcnum' } fields($svcdb)
- : ();
- #my($rowspan)=scalar(@rows);
-
- #my($ptmp)="