From 4920ad2671d712afe23d731e25bc5b53955397b7 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 23 May 2002 13:00:08 +0000 Subject: bind: allow adding slave domains too --- httemplate/edit/process/domain_record.cgi | 3 + httemplate/view/svc_domain.cgi | 101 +++++++++++++++++++----------- 2 files changed, 66 insertions(+), 38 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi index 8fb0368f6..b8c3f62a1 100755 --- a/httemplate/edit/process/domain_record.cgi +++ b/httemplate/edit/process/domain_record.cgi @@ -22,6 +22,9 @@ if ( $error ) { # $cgi->param('error', $error); # print $cgi->redirect(popurl(2). "agent.cgi?". $cgi->query_string ); #no edit screen to send them back to +%> + +<% eidiot($error); } else { my $svcnum = $new->svcnum; diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi index 28214f04e..b70ac8f90 100755 --- a/httemplate/view/svc_domain.cgi +++ b/httemplate/view/svc_domain.cgi @@ -30,7 +30,9 @@ if ($svc_domain->catchall) { my $domain = $svc_domain->domain; -print header('Domain View', menubar( +%> + +<%= header('Domain View', menubar( ( ( $pkgnum || $custnum ) ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", @@ -39,43 +41,66 @@ print header('Domain View', menubar( "${p}misc/cancel-unaudited.cgi?$svcnum" ) ), "Main menu" => $p, -)), - "Service #$svcnum", - "
Service: ", $part_svc->svc, "", - "
Domain name: $domain.", - qq!
Catch all email (change):!, - $email ? "$email." : "(none)", - qq!

View whois information.!, - '

', - '', - ntable("",2), - 'ZoneTypeData', -; +)) %> +Service #<%= $svcnum %> +
Service: <%= $part_svc->svc %> +
Domain name: <%= $domain %> +
Catch all email (change): +<%= $email ? "$email" : "(none)" %> +

View whois information. +

+ -foreach my $domain_record ( $svc_domain->domain_record ) { - print ''. $domain_record->reczone. ''. - ''. $domain_record->recaf. ' '. $domain_record->rectype. ''. - ''. $domain_record->recdata; - print qq! (delete)! - unless $domain_record->rectype eq 'SOA'; - print ''; -} -print '
'. - qq!
!. - qq!!. - ' '. - 'IN '. - ''. - ' '. - '

'. joblisting({'svcnum'=>$svcnum}, 1). - ''; +<% my @records; if ( @records = $svc_domain->domain_record ) { %> + <%= ntable("",2) %> + ZoneTypeData -%> + <% foreach my $domain_record ( @records ) { + my $type = $domain_record->rectype eq '_mstr' + ? "(slave)" + : $domain_record->recaf. ' '. $domain_record->rectype; + %> + + <%= $domain_record->reczone %> + <%= $type %> + <%= $domain_record->recdata %> + + <% unless ( $domain_record->rectype eq 'SOA' ) { %> + (delete) + <% } %> + + <% } %> + +<% } %> + +
+ + + + IN + + +


or

+
+ + +<% if ( @records ) { %> Delete all records and <% } %> +Slave from nameserver IP + + + + + +
+

<%= joblisting({'svcnum'=>$svcnum}, 1) %> + -- cgit v1.2.1