X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_domain.cgi;h=10079ce98f3d863454e386706ec20d20dda8b090;hb=357b4e26965895666685590d59f72de331fecb08;hp=56ba604bfa94950fbb550ca9818bc1f2b1e6e1cb;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git
diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi
index 56ba604bf..10079ce98 100755
--- a/httemplate/edit/svc_domain.cgi
+++ b/httemplate/edit/svc_domain.cgi
@@ -7,17 +7,31 @@
->New
+<% ntable("#cccccc",2) %>
+
+Domain
+% if ($export) {
+Available top-level domains: <% $export->option('tlds') %>
+
->Transfer
+
+>Register at <% $registrar->{'name'} %>
+
-Domain
+>Transfer to <% $registrar->{'name'} %>
+
-
Purpose/Description:
+>Registered elsewhere
-
+
+
+% }
+
+
+
+
<% include('/elements/footer.html') %>
@@ -27,7 +41,7 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
-my($svcnum, $pkgnum, $svcpart, $kludge_action, $purpose, $part_svc,
+my($svcnum, $pkgnum, $svcpart, $kludge_action, $part_svc,
$svc_domain);
if ( $cgi->param('error') ) {
@@ -38,7 +52,6 @@ if ( $cgi->param('error') ) {
$pkgnum = $cgi->param('pkgnum');
$svcpart = $cgi->param('svcpart');
$kludge_action = $cgi->param('action');
- $purpose = $cgi->param('purpose');
$part_svc = qsearchs('part_svc', { 'svcpart' => $svcpart } );
die "No part_svc entry!" unless $part_svc;
@@ -61,7 +74,6 @@ if ( $cgi->param('error') ) {
} else { #editing
$kludge_action = '';
- $purpose = '';
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ or die "unparsable svcnum";
$svcnum=$1;
@@ -82,6 +94,20 @@ my $action = $svcnum ? 'Edit' : 'Add';
my $svc = $part_svc->getfield('svc');
+my @exports = $part_svc->part_export();
+
+my $registrar;
+my $export;
+
+# Find the first export that does domain registration
+foreach (@exports) {
+ $export = $_ if $_->can('registrar');
+}
+# If we have a domain registration export, get the registrar object
+if ($export) {
+ $registrar = $export->registrar;
+}
+
my $otaker = getotaker;
my $domain = $svc_domain->domain;