<INPUT TYPE="hidden" NAME="svcpart" VALUE="<% $svcpart %>">
<% ntable("#cccccc",2) %>
+
<TR>
-<P>Domain <INPUT TYPE="text" NAME="domain" VALUE="<% $domain %>" SIZE=28 MAXLENGTH=63>
-<BR>
+ <TD ALIGN="right">Domain</TD>
+ <TD>
+% if ( !$svcnum || $conf->exists('svc_domain-edit_domain') ) {
+ <INPUT TYPE="text" NAME="domain" VALUE="<% $domain %>" SIZE=28 MAXLENGTH=63>
+% } else {
+ <B><% $domain %></B>
+ <INPUT TYPE="hidden" NAME="domain" VALUE="<% $domain %>">
+% }
+
% if ($export) {
+<BR>
Available top-level domains: <% $export->option('tlds') %>
</TR>
</TR>
% }
-
-<TR>
-<P><INPUT TYPE="submit" VALUE="Submit">
+ </TD>
</TR>
+
+<% include('svc_domain/communigate-basics.html',
+ 'svc_domain' => $svc_domain,
+ 'part_svc' => $part_svc,
+ 'communigate' => $communigate,
+ )
+%>
+
</TABLE>
+<BR>
+
+<% include('svc_domain/communigate-acct_defaults.html',
+ 'svc_domain' => $svc_domain,
+ 'part_svc' => $part_svc,
+ 'communigate' => $communigate,
+ )
+%>
+
+<INPUT TYPE="submit" VALUE="Submit">
+
</FORM>
<% include('/elements/footer.html') %>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
+my $conf = new FS::Conf;
+
my($svcnum, $pkgnum, $svcpart, $kludge_action, $part_svc,
$svc_domain);
if ( $cgi->param('error') ) {
my $svc = $part_svc->getfield('svc');
-my @exports = $part_svc->part_export();
-
-my $registrar;
-my $export;
+my $communigate = scalar($part_svc->part_export('communigate_pro'));
+ # || scalar($part_svc->part_export('communigate_pro_singledomain'));
# Find the first export that does domain registration
-foreach (@exports) {
- $export = $_ if $_->can('registrar');
-}
+my @exports = grep $_->can('registrar'), $part_svc->part_export;
+my $export = $exports[0];
# If we have a domain registration export, get the registrar object
-if ($export) {
- $registrar = $export->registrar;
-}
+my $registrar = $export ? $export->registrar : '';
my $otaker = getotaker;