2 % $cgi->param('error', $error);
3 <% $cgi->redirect(popurl(2). "svc_domain.cgi?". $cgi->query_string ) %>
5 <% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %>
10 unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
12 #remove this to actually test the domains!
13 $FS::svc_domain::whois_hack = 1;
15 $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
18 #unmunge cgp_accessmodes (falze laziness-ish w/part_svc.pm::process & svc_acct)
19 unless ( $cgi->param('cgp_accessmodes') ) {
20 $cgi->param('cgp_accessmodes',
22 sort map { /^cgp_accessmodes_([\w\/]+)$/ or die "no way"; $1; }
24 grep /^cgp_accessmodes_([\w\/]+)$/,
30 #unmunge acct_def_cgp_accessmodes (falze laziness-ahoy)
31 unless ( $cgi->param('acct_def_cgp_accessmodes') ) {
32 $cgi->param('acct_def_cgp_accessmodes',
34 sort map { /^acct_def_cgp_accessmodes_([\w\/]+)$/ or die "no way"; $1; }
36 grep /^acct_def_cgp_accessmodes_([\w\/]+)$/,
42 my $new = new FS::svc_domain ( {
44 $_, scalar($cgi->param($_));
45 #} qw(svcnum pkgnum svcpart domain action)
46 } ( fields('svc_domain'), qw( pkgnum svcpart action ) )
49 # trim leading and trailing whitespace to avoid errors caused by pasting into UI
50 my $domain = $new->domain;
51 $domain =~ s/^\s+|\s+$//g;
52 $new->domain($domain);
55 if ($cgi->param('svcnum')) {
56 $error = $new->replace();
58 $error = $new->insert;
59 $svcnum = $new->svcnum;