[freeside-commits] freeside/httemplate/edit/process svc_domain-defaultrecords.cgi, 1.1, 1.2 domain_record.cgi, 1.6, 1.7
Ivan,,,
ivan at wavetail.420.am
Sun Oct 17 15:35:59 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv21496/httemplate/edit/process
Modified Files:
svc_domain-defaultrecords.cgi domain_record.cgi
Log Message:
dns editing improvements: show an error from adding default records, redirect back to the dns section on all operations, finish editing. RT#8933
Index: svc_domain-defaultrecords.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/svc_domain-defaultrecords.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- svc_domain-defaultrecords.cgi 17 Aug 2010 17:08:22 -0000 1.1
+++ svc_domain-defaultrecords.cgi 17 Oct 2010 22:35:57 -0000 1.2
@@ -1,4 +1,8 @@
-<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %>
+% if ( $error ) {
+% errorpage($error);
+% } else {
+<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum#dns") %>
+% }
<%init>
die "access denied"
Index: domain_record.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/domain_record.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- domain_record.cgi 17 Aug 2010 17:08:22 -0000 1.6
+++ domain_record.cgi 17 Oct 2010 22:35:57 -0000 1.7
@@ -1,8 +1,14 @@
%if ( $error ) {
% errorpage($error);
-%} else {
+%} elsif ( $recnum ) { #editing
+<% header('Nameservice record changed') %>
+ <SCRIPT TYPE="text/javascript">
+ window.top.location.reload();
+ </SCRIPT>
+ </BODY></HTML>
+%} else { #adding
% my $svcnum = $new->svcnum;
-<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %>
+<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum#dns") %>
%}
<%init>
@@ -21,10 +27,11 @@
my $error;
if ( $recnum ) {
+ $new->svcnum( $old->svcnum );
$error=$new->replace($old);
} else {
$error=$new->insert;
- $recnum=$new->getfield('recnum');
+ #$recnum = $new->getfield('recnum');
}
</%init>
More information about the freeside-commits
mailing list