ispman/ispman-web/cgi-bin/tmpl/domains/edit domaintype.tmpl, 1.7, 1.8

Joerg Delker <[email protected]> Sun, 21 Dec 2008 16:27:11 +0000
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/domains/edit
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv924/ispman-web/cgi-bin/tmpl/domains/edit

Modified Files:
	domaintype.tmpl 
Log Message:
fixed [ 2213932 ] Allow nodns/slave domains to be changed to to other types

Index: domaintype.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/domains/edit/domaintype.tmpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- domaintype.tmpl	8 Jan 2004 00:08:26 -0000	1.7
+++ domaintype.tmpl	21 Dec 2008 16:27:09 -0000	1.8
@@ -1,7 +1,30 @@
 
 <tr>
     <td><perl>_("Domain type")</perl></td>
-    <td><perl>$ispman->getDomainType($r->param('ispmanDomain'))</perl>
+    <td><perl>
+    my %description=(
+	'primary' => 'Primary domain (DNS will be managed by ISPMan)',
+	'slave' => 'Secondary domain (DNS will be managed by another Primary DNS server)',
+	'replica' => 'Replica domain (This domain points to another domain within ISPMan)',
+	'nodns' => 'No Dns Management for this domain'
+    );
+    my $text="";
+    my $domainType=$ispman->getDomainType($r->param('ispmanDomain'));
+    if (($domainType eq 'replica') or
+	# FIXME: support changing from primary
+	($domainType eq 'primary')) {
+	$text.=$description{$domainType};
+    } else {
+	$text.="<select name='ispmanDomainType'>\n";
+	foreach ('primary', 'slave', 'nodns') {
+	    $text.="<option value='$_'";
+	    $text.=" selected" if $domainType eq $_;
+	    $text.=">".$description{$_}."</option>\n";
+	}
+	$text.="</select>\n";
+    }
+    $text
+    </perl>
     </td>
 </tr>
 


------------------------------------------------------------------------------