summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/svc_domain-defaultrecords.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/svc_domain-defaultrecords.cgi')
-rw-r--r--httemplate/edit/process/svc_domain-defaultrecords.cgi18
1 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/edit/process/svc_domain-defaultrecords.cgi b/httemplate/edit/process/svc_domain-defaultrecords.cgi
new file mode 100644
index 0000000..ec3d221
--- /dev/null
+++ b/httemplate/edit/process/svc_domain-defaultrecords.cgi
@@ -0,0 +1,18 @@
+% if ( $error ) {
+% errorpage($error);
+% } else {
+<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum#dns") %>
+% }
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice');
+
+my $svcnum = scalar($cgi->param('svcnum'));
+
+my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svcnum })
+ or die 'unknown svc_domain.svcnum';
+
+my $error = $svc_domain->insert_defaultrecords;
+
+</%init>