[vhffs-dev] [1773] No more HTML::Template in dns/prefs

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1773
Author:   beuss
Date:     2011-05-19 07:44:26 +0200 (Thu, 19 May 2011)
Log Message:
-----------
No more HTML::Template in dns/prefs

This one was huge...

Modified Paths:
--------------
    trunk/vhffs-panel/Makefile.am
    trunk/vhffs-panel/dns/prefs.pl
    trunk/vhffs-panel/templates/Makefile.am

Added Paths:
-----------
    trunk/vhffs-panel/templates/dns/prefs.tt

Removed Paths:
-------------
    trunk/vhffs-panel/dns/delete.pl
    trunk/vhffs-panel/templates/dns/list_a_sub.tmpl
    trunk/vhffs-panel/templates/dns/list_aaaa_sub.tmpl
    trunk/vhffs-panel/templates/dns/list_cname_sub.tmpl
    trunk/vhffs-panel/templates/dns/list_mx_sub.tmpl
    trunk/vhffs-panel/templates/dns/list_ns_sub.tmpl
    trunk/vhffs-panel/templates/dns/list_srv_sub.tmpl
    trunk/vhffs-panel/templates/dns/list_txt_sub.tmpl
    trunk/vhffs-panel/templates/dns/prefs.tmpl

Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/Makefile.am	2011-05-19 05:44:26 UTC (rev 1773)
@@ -876,7 +876,6 @@
 	cvs/index.pl \
 	cvs/prefs.pl \
 	dns/create.pl \
-	dns/delete.pl \
 	dns/index.pl \
 	dns/prefs.pl \
 	group/create.pl \

Deleted: trunk/vhffs-panel/dns/delete.pl
===================================================================
--- trunk/vhffs-panel/dns/delete.pl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/dns/delete.pl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,104 +0,0 @@
-#!%PERL% -w
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without 
-# modification, are permitted provided that the following conditions 
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright 
-#   notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in 
-#   the documentation and/or other materials provided with the 
-#   distribution.
-#3. Neither the name of vhffs nor the names of its contributors 
-#   may be used to endorse or promote products derived from this 
-#   software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use strict;
-
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $cgi = $panel->{'cgi'};
-my $vhffs = $panel->{'vhffs'};
-my $domain_name = $cgi->param("name");
-my $sure = $cgi->param("DELETE");
-my $user = $panel->{'user'};
-
-my $dns = Vhffs::Services::DNS::get_by_domainname( $vhffs , $domain_name );
-my $templatedir = $vhffs->get_config->get_templatedir;
-my $output = "";
-my $message;
-
-my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-
-if( ! defined $domain_name )
-{
-	$message = gettext( "CGI Error !");
-}
-elsif( ! defined $dns )
-{
-	$message = gettext( "Cannot get informations on this object");
-}
-elsif( ! $user->can_delete( $dns ) )
-{
-	$message = gettext( 'You\'re not allowed to do this, object is not in active state or you don\'t have enough ACL rights' );
-}
-else
-{
-	if( $sure == 1 )
-	{
-		$dns->set_status( Vhffs::Constants::TO_DELETE );
-		if( $dns->commit < 0 )
-		{
-			$message = gettext("Error while switching state. DNS will NOT be deleted");
-		}
-		else
-		{
-			$message = gettext("This domain will be DELETED from Vhffs platform");
-		}
-	}
-	else
-	{
-		$message = gettext("This domain will NOT be DELETED from Vhffs platform");
-	}
-
-}
-
-$template->param( MESSAGE => $message );
-$panel->build( $template );
-$panel->display;

Modified: trunk/vhffs-panel/dns/prefs.pl
===================================================================
--- trunk/vhffs-panel/dns/prefs.pl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/dns/prefs.pl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -32,7 +32,6 @@
 
 use utf8;
 use POSIX qw(locale_h);
-use HTML::Template;
 use locale;
 use Locale::gettext;
 use CGI;
@@ -41,13 +40,9 @@
 
 
 use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
 use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Panel::Object;
 use Vhffs::Services::DNS;
+use Vhffs::Panel::DNS;
 
 
 my $panel = new Vhffs::Panel::Main();
@@ -56,7 +51,6 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $templatedir = $panel->{'templatedir'};
 my $user = $panel->{'user'};
 my $cgi = $panel->{'cgi'};
 
@@ -71,23 +65,13 @@
 my $output = "";
 my $message;
 
-unless( defined $domain_name )
-{
-	$template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
-	$template->param( MESSAGE => gettext( 'CGI Error !' ) );
-}
-elsif( ! defined $dns )
-{
-	$template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
-	$template->param( MESSAGE => gettext('Cannot get informations on this object') );
-}
-elsif( ! $user->can_view( $dns ) )
-{
-	$template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
-	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this, object is not in active state or you don\'t have enough ACL rights' ) );
-}
-else
-{
+unless( defined $domain_name ) {
+    $panel->render('misc/message.tt', { message => gettext( 'CGI Error !' ) } );
+} elsif( ! defined $dns ) {
+    $panel->render('misc/message.tt', { message => gettext('Cannot get informations on this object') } );
+} elsif( ! $user->can_view( $dns ) ) {
+    $panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this, object is not in active state or you don\'t have enough ACL rights' ) } );
+} else {
     my $action = $cgi->param('action');
 ACTION: {
     if(defined $action) {
@@ -216,197 +200,25 @@
         }
     }
 }
-	my $cnames = $dns->get_cname_type;
-	my $a_rr = $dns->get_a_type;
-    my $aaaa = $dns->get_aaaa_type;
-	my $mx = $dns->get_mx_type;
-	my $ns = $dns->get_ns_type;
-    my $srv = $dns->get_srv_type;
-    my $txt = $dns->get_txt_type;
 
-    $panel->set_title(sprintf(gettext("DNS Administration - %s"), $domain_name));
-	$template = new HTML::Template( filename => $templatedir."/panel/dns/prefs.tmpl" );
+    my $vars = {
+        dns => $dns
+    };
+    my @sorted_a = sort {$a->{name} cmp $b->{name}} values(%{$dns->get_a_type});
+    my @sorted_aaaa = sort {$a->{name} cmp $b->{name}} values(%{$dns->get_aaaa_type});
+    my @sorted_mx = sort {$a->{aux} <=> $b->{aux}} values(%{$dns->get_mx_type});
+    my @sorted_cname = sort {$a->{name} cmp $b->{name}} values(%{$dns->get_cname_type});
+    my @sorted_ns = sort {$a->{name} cmp $b->{name}} values(%{$dns->get_ns_type});
+    my @sorted_srv = sort {$a->{name} cmp $b->{name}} values(%{$dns->get_srv_type});
+    my @sorted_txt = sort {$a->{name} cmp $b->{name}} values(%{$dns->get_txt_type});
+    $vars->{sorted_a} = \@sorted_a;
+    $vars->{sorted_aaaa} = \@sorted_aaaa;
+    $vars->{sorted_mx} = \@sorted_mx;
+    $vars->{sorted_cname} = \@sorted_cname;
+    $vars->{sorted_ns} = \@sorted_ns;
+    $vars->{sorted_srv} = \@sorted_srv;
+    $vars->{sorted_txt} = \@sorted_txt;
 
-    $template->param( DOMAIN_NAME => $domain_name );
-
-    $template->param( TEXT_TYPEA => gettext('All A TYPE for your domain name') );
-    $template->param( TEXT_TYPEAAAA => gettext('All AAAA TYPE for your domain name') );
-    $template->param( TEXT_TYPEMX => gettext('All MX TYPE for your domain name') );
-    $template->param( TEXT_TYPECNAME => gettext('All CNAME for your domain name') );
-    $template->param( TEXT_LIST_A => gettext("List all A reccords") );
-    $template->param( TEXT_LIST_AAAA => gettext("List all AAAA reccords") );
-    $template->param( TEXT_ADD_A => gettext("Add an A record") );
-    $template->param( TEXT_ADD_AAAA => gettext("Add an AAAA record") );
-    $template->param( TEXT_ORIGIN => sprintf( gettext('Use @ for origin (%s)'),  $domain_name) );
-
-
-	#Treat ACL part
-    $template->param( VALUE_OID => $dns->get_oid );
-    $template->param( TEXT_ACL_ADMIN => gettext( "Admin Rights on this object (ACL)") );
-    $template->param( EXPLAIN_ADMIN_ACL => gettext( "You can Manage rights on this service for each user in the VHFFS database. Please read help before manage it.") );
-    $template->param( ADMIN_ACL => gettext("Ok, go to ACL admin") );
-
-
-	#Treat the delete part
-	$template->param( TEXT_DELETE_DNS => gettext("Delete this domain name from the VHFFS platform") );
-	$template->param( TEXT_BEFORE_DELETE => gettext("This action is non-reversible. This domain name will be DESTROYED.") );
-	$template->param( ASK_DELETE_DNS => gettext("Are you SURE you want DELETE this domain ?") );
-	$template->param( YES => gettext("Yes I'm sure of what I do") );
-	$template->param( NO => gettext("No, I'm not sure, I prefer to keep it.") );
-	$template->param( TEXT_DELETE => gettext("Delete") );
-
-
-	#All templates values for A reccords
-    $template->param( TEXT_QUESTION_REDIRECTION => gettext("Use our servers as destination IP for this A record?") );
-    $template->param( TEXT_YES => gettext("Yes") );
-    $template->param( TEXT_NO => gettext("No") );
-    $template->param( TEXT_ADDIP => gettext("IP") );
-    $template->param( TEXT_DOMAINNAME => gettext("Name for reccord") );
-    $template->param( TEXT_SUBMIT => gettext("Add !") );
-
-
-	#All templates for MX reccords
-    $template->param( TEXT_LIST_MX => gettext("All MX TYPE for your domain name") );
-    $template->param( TEXT_ADD_MX => gettext("Add a MX field to your domain") );
-    $template->param( MX_DOMAINNAME => gettext("Name of the record") );
-    $template->param( MX_NAME => gettext("Name of your MX") );
-    $template->param( MX_PRIORITY => gettext("Priority of your MX") );
-    $template->param( TEXT_SUBMIT => gettext("Submit") );
-
-
-	#Treat CNAME PART
-    $template->param( TEXT_LIST_CNAME => gettext("All CNAME TYPE for your domain name") );
-    $template->param( TEXT_ADD_CNAME => gettext("Add a CNAME field to your domain") );
-    $template->param( TEXT_SUBMIT => gettext("Submit") );
-    $template->param( CNAME_DESTINATION => gettext("Destination") );
-    $template->param( CNAME_PREFIX => gettext("Subdomain name") );
-
-	#Treat NS part
-    $template->param( TEXT_TYPENS => gettext("NS TYPE") );
-    $template->param( TEXT_LIST_NS => gettext("All NS TYPE for your domain name") );
-    $template->param( TEXT_ADD_NS => gettext("Add a NS field to your domain") );
-    $template->param( NS_PREFIX => gettext('Name of the record') );
-    $template->param( NS_HOSTNAME_TEXT => gettext('Host of your name server') );
-
-    #Treat SRV part
-    $template->param( TEXT_TYPESRV => gettext('SRV TYPE') );
-    $template->param( TEXT_LIST_SRV => gettext('All SRV records for your domain name') );
-    $template->param( TEXT_ADD_SRV => gettext('Add a SRV record to your domain') );
-    $template->param( SRV_PREFIX => gettext('Name of the record') );
-    $template->param( SRV_PROTOCOL_TEXT => gettext('Protocol') );
-    $template->param( SRV_SERVICE_TEXT => gettext('Service') );
-    $template->param( SRV_HOSTNAME_TEXT => gettext('Host') );
-    $template->param( SRV_PORT_TEXT => gettext('Port') );
-    $template->param( SRV_PRIORITY_TEXT => gettext('Priority') );
-    $template->param( SRV_WEIGHT_TEXT => gettext('Weight') );
-
-    $template->param( TEXT_SUBMIT => gettext("Submit") );
-
-    # Treat TXT part
-    $template->param( TEXT_LIST_TXT => gettext('List all TXT records') );
-    $template->param( TEXT_ADD_TXT => gettext('Add a TXT record') );
-    $template->param( TEXT_TYPETXT => gettext('All TXT records for your domain name') );
-    $template->param( TXT_DATA_TEXT => gettext('Text') );
-    $template->param( TXT_NAME_TEXT => gettext('Name for record') );
-
-    if( scalar(keys %{$a_rr}) ) {
-        my $thirdtemplate = new HTML::Template( filename => $templatedir.'/panel/dns/list_a_sub.tmpl', global_vars => 1, die_on_bad_params => 0);
-        my @list_a = sort {$a->{name} cmp $b->{name}} values(%{$a_rr});
-        $thirdtemplate->param( LIST_HELP => sprintf(gettext( '@ represents the origin (%s)' ), $domain_name) );
-	    $thirdtemplate->param( DEL => gettext( 'Delete' ) );
-        $thirdtemplate->param( DOMAIN => $domain_name );
-        $thirdtemplate->param( MODIFY => gettext( 'Modify' ) );
-        $thirdtemplate->param( A_RR => \@list_a);
-    	$template->param( LIST_A => $thirdtemplate->output );
-    } else {
-    	$template->param( LIST_A => gettext('No A type found' ));
-    }
-
-    if( scalar(keys %{$aaaa}) ) {
-        my $thirdtemplate = new HTML::Template( filename => $templatedir.'/panel/dns/list_aaaa_sub.tmpl', global_vars => 1, die_on_bad_params => 0);
-        my @list_aaaa = sort {$a->{name} cmp $b->{name}} values(%{$aaaa});
-	    $thirdtemplate->param( DEL => gettext( 'Delete' ) );
-        $thirdtemplate->param( DOMAIN => $domain_name );
-        $thirdtemplate->param( MODIFY => gettext( 'Modify' ) );
-        $thirdtemplate->param( AAAA_RR => \@list_aaaa);
-    	$template->param( LIST_AAAA => $thirdtemplate->output );
-    } else {
-    	$template->param( LIST_AAAA => gettext('No AAAA type found' ));
-    }
-
-
-	if( scalar(keys %{$mx} ) ) {
-        $thirdtemplate = new HTML::Template( filename => $templatedir.'/panel/dns/list_mx_sub.tmpl', global_vars => 1, die_on_bad_params => 0 );
-        my @list_mx = sort {$a->{name} cmp $b->{name}} sort {$a->{aux} <=> $b->{aux}} values(%{$mx});
-        $thirdtemplate->param( DEL => gettext( 'Delete' ) );
-        $thirdtemplate->param( DOMAIN => $domain_name );
-        $thirdtemplate->param( MODIFY => gettext( 'Modify' ) );
-        $thirdtemplate->param( TEXT_PRIORITY => gettext( 'Priority: ' ));
-        $thirdtemplate->param( MX_RR => \@list_mx );
-		$template->param( LIST_MX => $thirdtemplate->output );
-    } else {
-        $template->param( LIST_MX => gettext( 'No MX reccord for this domain' ));
-    }
-
-    if( scalar(keys %{$cnames} ) ) {
-        $thirdtemplate = new HTML::Template( filename => $templatedir.'/panel/dns/list_cname_sub.tmpl', global_vars => 1, die_on_bad_params => 0 );
-        $thirdtemplate->param( DEL => gettext( 'Delete' ) );
-        $thirdtemplate->param( MODIFY => gettext( 'Modify' ) );
-        $thirdtemplate->param( DOMAIN => $domain_name );
-        my @list_cname = sort {$a->{name} cmp $b->{name}} values(%{$cnames});
-        $thirdtemplate->param( CNAME_RR => \@list_cname );
-
-   		$template->param( LIST_CNAME => $thirdtemplate->output );
-    } else {
-        $template->param( LIST_CNAME => gettext( 'No CNAME available on this domain' ) );
-    }
-
-
-
-    if( scalar(keys %{$ns}) ) {
-        my @list_ns = sort {$a->{name} cmp $b->{name}} sort {$a->{data} cmp $b->{data}} values(%{$ns});
-        $thirdtemplate = new HTML::Template( filename => $templatedir.'/panel/dns/list_ns_sub.tmpl', global_vars => 1, die_on_bad_params => 0 );
-        $thirdtemplate->param( DEL => gettext( 'Delete' ) );
-        $thirdtemplate->param( DOMAIN => $domain_name );
-        $thirdtemplate->param( NS_RR => \@list_ns );
-        $template->param( LIST_NS => $thirdtemplate->output );
-    } else {
-        $template->param( LIST_NS => gettext( "No NS available on this domain") );
-    }
-
-    if( scalar(keys %{$srv}) ) {
-        my @list_srv = sort {$a->{name} cmp $b->{name}} values(%{$srv});
-        $thirdtemplate = new HTML::Template( filename => $templatedir.'/panel/dns/list_srv_sub.tmpl', global_vars => 1, die_on_bad_params => 0 );
-        $thirdtemplate->param( DEL => gettext( 'Delete' ) );
-        $thirdtemplate->param( MODIFY => gettext( 'Modify' ) );
-        $thirdtemplate->param( DOMAIN => $domain_name );
-        $thirdtemplate->param( HOST_TXT => gettext( 'Host' ) );
-        $thirdtemplate->param( PORT_TXT => gettext( 'Port' ) );
-        $thirdtemplate->param( PRIORITY_TXT => gettext( 'Priority' ) );
-        $thirdtemplate->param( WEIGHT_TXT => gettext( 'Weight' ) );
-        $thirdtemplate->param( SRV_RR => \@list_srv );
-        $template->param( LIST_SRV => $thirdtemplate->output );
-    } else {
-        $template->param( LIST_SRV => gettext( 'No SRV available on this domain') );
-    }
-
-    if( scalar(keys %{$txt}) ) {
-        my @list_txt = sort {$a->{data} cmp $b->{data}} values(%{$txt});
-        $thirdtemplate = new HTML::Template( filename => $templatedir.'/panel/dns/list_txt_sub.tmpl', global_vars => 1, die_on_bad_params => 0 );
-        $thirdtemplate->param( DEL => gettext( 'Delete' ) );
-        $thirdtemplate->param( MODIFY => gettext( 'Modify' ) );
-        $thirdtemplate->param( DOMAIN => $domain_name );
-        $thirdtemplate->param( HOST_TXT => gettext( 'Host' ) );
-        $thirdtemplate->param( TXT_RR => \@list_txt );
-        $template->param( LIST_TXT => $thirdtemplate->output );
-    } else {
-        $template->param( LIST_TXT => gettext( 'No TXT available on this domain') );
-    }
-
-
-	my $adminpart = Vhffs::Panel::Object::admin_part( $panel, $dns );
-	$template->param( ADMIN_PART => $adminpart->output ) if( defined $adminpart );
+    $panel->set_title(sprintf(gettext("DNS Administration - %s"), $domain_name));
+    $panel->render('dns/prefs.tt', $vars);
 }
-
-$panel->build( $template );
-$panel->display;

Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/Makefile.am	2011-05-19 05:44:26 UTC (rev 1773)
@@ -59,14 +59,6 @@
 	admin/cron/search.tmpl \
 	cvs/create.tmpl \
 	cvs/prefs.tmpl \
-	dns/list_a_sub.tmpl \
-	dns/list_aaaa_sub.tmpl \
-	dns/list_cname_sub.tmpl \
-	dns/list_mx_sub.tmpl \
-	dns/list_ns_sub.tmpl \
-	dns/list_srv_sub.tmpl \
-	dns/list_txt_sub.tmpl \
-	dns/prefs.tmpl \
 	menu/context.tmpl \
 	menu/context-group.tmpl \
 	menu/context-modo.tmpl \
@@ -94,6 +86,7 @@
 	anonymous/subscribe.tt \
 	database/prefs.tt \
 	dns/create.tt \
+	dns/prefs.tt \
 	git/create.tt \
 	group/create.tt \
 	group/index.tt \

Deleted: trunk/vhffs-panel/templates/dns/list_a_sub.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/list_a_sub.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/list_a_sub.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,16 +0,0 @@
-<p class="help"><TMPL_VAR ESCAPE=1 NAME="LIST_HELP"></p>
-<TMPL_LOOP NAME="A_RR">
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p>
-    <label for="data_<TMPL_VAR ESCAPE=1 NAME="id">">
-    <TMPL_VAR ESCAPE=1 NAME="NAME">-&gt;
-    </label>
-        <input type="text" name="data" id="data_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="data">" />
-        <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN">" />
-        <input type="hidden" name="rr_id" value="<TMPL_VAR ESCAPE=1 NAME="id">" />
-        <input type="hidden" name="action" value="manage_a"/>
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="MODIFY">" class="autowidth" name="modify_a_submit" />
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="DEL">" name="delete_a_submit" class="autowidth"/>
-    </p>
-</form>
-</TMPL_LOOP>

Deleted: trunk/vhffs-panel/templates/dns/list_aaaa_sub.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/list_aaaa_sub.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/list_aaaa_sub.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,16 +0,0 @@
-<p class="help"><TMPL_VAR ESCAPE=1 NAME="LIST_HELP"></p>
-<TMPL_LOOP NAME="AAAA_RR">
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p>
-    <label for="data_<TMPL_VAR ESCAPE=1 NAME="id">">
-    <TMPL_VAR ESCAPE=1 NAME="name">-&gt;
-    </label>
-        <input type="text" name="data" id="data_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="data">" />
-        <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN">" />
-        <input type="hidden" name="rr_id" value="<TMPL_VAR ESCAPE=1 NAME="id">" />
-        <input type="hidden" name="action" value="manage_aaaa"/>
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="MODIFY">" class="autowidth" name="modify_aaaa_submit" />
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="DEL">" name="delete_aaaa_submit" class="autowidth"/>
-    </p>
-</form>
-</TMPL_LOOP>

Deleted: trunk/vhffs-panel/templates/dns/list_cname_sub.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/list_cname_sub.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/list_cname_sub.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,15 +0,0 @@
-<TMPL_LOOP NAME="CNAME_RR">
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-	<p>
-		<label for="data_<TMPL_VAR ESCAPE=1 NAME="id">">
-			<TMPL_VAR ESCAPE=1 NAME="name">-&gt;
-		</label>
-		<input type="text" name="data" id="data_<TMPL_VAR ESCAPE=1 NAME="id">"value="<TMPL_VAR ESCAPE=1 NAME="data">" />
-        <input type="hidden" name="action" value="manage_cname" />
-        <input type="hidden" name="rr_id" value="<TMPL_VAR ESCAPE=1 NAME="id">"/>
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN">" />
-		<input type="submit" name="modify_cname_submit" value="<TMPL_VAR ESCAPE=1 NAME="MODIFY">" class="autowidth" />
-		<input type="submit" name="delete_cname_submit" value="<TMPL_VAR ESCAPE=1 NAME="DEL">" class="autowidth" />
-	</p>
-</form>
-</TMPL_LOOP>

Deleted: trunk/vhffs-panel/templates/dns/list_mx_sub.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/list_mx_sub.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/list_mx_sub.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,14 +0,0 @@
-<TMPL_LOOP NAME="MX_RR">
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-<p><label for="data_<TMPL_VAR ESCAPE=1 NAME="id">">
-    <TMPL_VAR ESCAPE=1 NAME="name"> (<TMPL_VAR ESCAPE=1 NAME="TEXT_PRIORITY"><TMPL_VAR ESCAPE=1 NAME="aux">)-&gt;
-</label>
-    <input type="text" name="data"  id="data_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="data">" />
-    <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN">" />
-    <input type="hidden" name="rr_id" value="<TMPL_VAR ESCAPE=1 NAME="id">" />
-    <input type="hidden" name="action" value="manage_mx" />
-    <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="MODIFY">" name="modify_mx_submit" class="autowidth"/>
-    <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="DEL">" name="delete_mx_submit" class="autowidth"/>
-</p>
-</form>
-</TMPL_LOOP>

Deleted: trunk/vhffs-panel/templates/dns/list_ns_sub.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/list_ns_sub.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/list_ns_sub.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,11 +0,0 @@
-<TMPL_LOOP NAME="NS_RR">
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-<p>
-    <label><TMPL_VAR ESCAPE=1 NAME="name">-&gt; <TMPL_VAR ESCAPE=1 NAME="data"></label>
-    <input type="hidden" name="action" value="manage_ns" />
-    <input type="hidden" name="rr_id" value="<TMPL_VAR ESCAPE=1 NAME="id">" />
-    <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="domain">" />
-    <input type="submit" name="delete_ns_submit" value="<TMPL_VAR ESCAPE=1 NAME="DEL">" class="autowidth"/>
-</p>
-</form>
-</TMPL_LOOP>

Deleted: trunk/vhffs-panel/templates/dns/list_srv_sub.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/list_srv_sub.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/list_srv_sub.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,18 +0,0 @@
-<TMPL_LOOP NAME="SRV_RR">
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p>
-    <label>
-    <TMPL_VAR ESCAPE=1 NAME="NAME">-&gt;
-    </label>
-    <input type="text" name="host" id="host_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="host">" title="<TMPL_VAR ESCAPE=1 NAME="HOST_TXT">"/>
-    <input type="text" name="port" id="port_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="port">" maxlength="5" size="5" style="width:auto" title="<TMPL_VAR ESCAPE=1 NAME="PORT_TXT">"/>
-    <input type="text" name="aux" id="aux_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="aux">" maxlength="5" size="5" style="width:auto" title="<TMPL_VAR ESCAPE=1 NAME="PRIORITY_TXT">"/>
-    <input type="text" name="weight" id="weight_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="weight">" maxlength="5" size="5" style="width:auto" title="<TMPL_VAR ESCAPE=1 NAME="WEIGHT_TXT">"/>
-        <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN">"/>
-        <input type="hidden" name="rr_id" value="<TMPL_VAR ESCAPE=1 NAME="id">" />
-        <input type="hidden" name="action" value="manage_srv"/>
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="MODIFY">" class="autowidth" name="modify_srv_submit" />
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="DEL">" name="delete_srv_submit" class="autowidth"/>
-    </p>
-</form>
-</TMPL_LOOP>

Deleted: trunk/vhffs-panel/templates/dns/list_txt_sub.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/list_txt_sub.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/list_txt_sub.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,16 +0,0 @@
-<p class="help"><TMPL_VAR ESCAPE=1 NAME="LIST_HELP"></p>
-<TMPL_LOOP NAME="TXT_RR">
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p>
-    <label for="data_<TMPL_VAR ESCAPE=1 NAME="id">">
-    <TMPL_VAR ESCAPE=1 NAME="NAME">-&gt;
-    </label>
-        <input type="text" name="data" id="data_<TMPL_VAR ESCAPE=1 NAME="id">" value="<TMPL_VAR ESCAPE=1 NAME="data">" />
-        <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN">" />
-        <input type="hidden" name="rr_id" value="<TMPL_VAR ESCAPE=1 NAME="id">" />
-        <input type="hidden" name="action" value="manage_txt"/>
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="MODIFY">" class="autowidth" name="modify_txt_submit" />
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="DEL">" name="delete_txt_submit" class="autowidth"/>
-    </p>
-</form>
-</TMPL_LOOP>

Deleted: trunk/vhffs-panel/templates/dns/prefs.tmpl
===================================================================
--- trunk/vhffs-panel/templates/dns/prefs.tmpl	2011-05-19 05:44:18 UTC (rev 1772)
+++ trunk/vhffs-panel/templates/dns/prefs.tmpl	2011-05-19 05:44:26 UTC (rev 1773)
@@ -1,239 +0,0 @@
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_TYPEA"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_LIST_A"></h3>
-<TMPL_VAR ESCAPE=0 NAME="LIST_A">
-
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_A"></h3>
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p class="help"><TMPL_VAR ESCAPE=1 NAME="TEXT_ORIGIN"></p>
-	<p>
-		<label for="add_a_prefix">
-			<TMPL_VAR ESCAPE=1 NAME="TEXT_DOMAINNAME">
-		</label>
-		<input type="text" name="name"  id="add_a_prefix" /><strong>.<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME"></strong>
-	</p>
-	<p><TMPL_VAR ESCAPE=1 NAME="TEXT_QUESTION_REDIRECTION">:
-		<input type="radio" name="redirect" id="redirect_true" value="true" checked="checked"
-            onclick="document.getElementById('add_a_ip').style.display='none'"/>
-        <label for="redirect_true" style="display:inline;float:none"><TMPL_VAR ESCAPE=1 NAME="TEXT_YES"></label>
-        <input type="radio" name="redirect" value="false" id="redirect_false"
-            onclick="document.getElementById('add_a_ip').style.display='block'"/>
-        <label for="redirect_false" style="display:inline;float:none"><TMPL_VAR ESCAPE=1 NAME="TEXT_NO"></label>
-    </p>
-	<p id="add_a_ip" style="display:none">
-		<label for="add_a_data">
-		<TMPL_VAR ESCAPE=1 NAME="TEXT_ADDIP">
-		</label>
-		<input type="text" name="data" id="add_a_data" />
-	</p>
-	<p class="button">
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">" />
-        <input type="hidden" name="action" value="add_a"/>
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT">" />
-	</p>
-</form>
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_TYPEAAAA"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_LIST_AAAA"></h3>
-<TMPL_VAR ESCAPE=0 NAME="LIST_AAAA">
-
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_AAAA"></h3>
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p class="help"><TMPL_VAR ESCAPE=1 NAME="TEXT_ORIGIN"></p>
-	<p>
-		<label for="add_aaaa_prefix">
-			<TMPL_VAR ESCAPE=1 NAME="TEXT_DOMAINNAME">
-		</label>
-		<input type="text" name="name" id="add_aaaa_prefix" /><strong>.<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME"></strong>
-	</p>
-	<p><TMPL_VAR ESCAPE=1 NAME="TEXT_QUESTION_REDIRECTION">:
-		<input type="radio" name="redirect" id="redirect_aaaa_true" value="true" checked="checked"
-            onclick="document.getElementById('add_aaaa_ip').style.display='none'"/>
-        <label for="redirect_aaaa_true" style="display:inline;float:none"><TMPL_VAR ESCAPE=1 NAME="TEXT_YES"></label>
-        <input type="radio" name="redirect" value="false" id="redirect_aaaa_false"
-            onclick="document.getElementById('add_aaaa_ip').style.display='block'"/>
-        <label for="redirect_aaaa_false" style="display:inline;float:none"><TMPL_VAR ESCAPE=1 NAME="TEXT_NO"></label>
-    </p>
-	<p id="add_aaaa_ip" style="display:none">
-		<label for="add_aaaa_data">
-		<TMPL_VAR ESCAPE=1 NAME="TEXT_ADDIP">
-		</label>
-		<input type="text" name="data" id="add_aaaa_data" />
-	</p>
-	<p class="button">
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">" />
-        <input type="hidden" name="action" value="add_aaaa"/>
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT">" />
-	</p>
-</form>
-
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_TYPEMX"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_LIST_MX"></h3>
-
-<TMPL_VAR ESCAPE=0 NAME="LIST_MX">
-
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_MX"></h3>
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-	<p class="help"><TMPL_VAR ESCAPE=1 NAME="TEXT_ORIGIN"></p>
-	<p>
-		<label for="add_mx_prefix">
-			<TMPL_VAR ESCAPE=1 NAME="MX_DOMAINNAME">
-		</label>
-		<input type="text" name="name" id="add_mx_prefix" /><strong>.<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME"></strong>
-	</p>
-	<p>
-		<label for="add_mx_data">
-			<TMPL_VAR ESCAPE=1 NAME="MX_NAME">
-		</label>
-		<input type="text" name="data" id="add_mx_data" />
-	</p>
-	<p>
-		<label for="add_mx_aux">
-			<TMPL_VAR ESCAPE=1 NAME="MX_PRIORITY">
-		</label>
-		<input type="text" name="aux" id="add_mx_aux" />
-	</p>
-	<p class="button">
-        <input type="hidden" name="action" value="add_mx" />
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">" />
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 name="TEXT_SUBMIT">" />
-	</p>
-</form>
-
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_TYPECNAME"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_LIST_CNAME"></h3>
-<TMPL_VAR ESCAPE=0 NAME="LIST_CNAME">
-
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_CNAME"></h3>
-
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-	<p>
-		<label for="add_cname_name">
-			<TMPL_VAR ESCAPE=1 NAME="CNAME_PREFIX">
-		</label>
-		<input type="text" name="name" id="add_cname_name" /><strong>.<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME"></strong>
-	</p>
-	<p>
-		<label for="add_cname_data">
-    		<TMPL_VAR ESCAPE=1 NAME="CNAME_DESTINATION">
-		</label>
-			<input type="text" name="data" id="add_cname_data" />
-	</p>
-	<p class="button">
-        <input type="hidden" name="action" value="add_cname" />
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">" />
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT">" />
-	</p>
-</form>
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_TYPENS"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_LIST_NS"></h3>
-<TMPL_VAR ESCAPE=0 NAME="LIST_NS">
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_NS"></h3>
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p><label for="add_ns_prefix"><TMPL_VAR ESCAPE=1 NAME="NS_PREFIX"></label>
-    <input type="text" name="name" id="add_ns_prefix"/><strong>.<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME"></strong></p>
-    <p><label for="add_ns_data"><TMPL_VAR ESCAPE=1 NAME="NS_HOSTNAME_TEXT"></label>
-    <input type="text" name="data" id="add_ns_data"/></p>
-    <input type="hidden" name="action" value="add_ns"/>
-    <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">"/>
-    <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT">" class="autowidth"/>
-</form>
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_TYPESRV"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_LIST_SRV"></h3>
-<TMPL_VAR ESCAPE=0 NAME="LIST_SRV">
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_SRV"></h3>
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p class="help"><TMPL_VAR ESCAPE=1 NAME="TEXT_ORIGIN"></p>
-    <p><label for="add_srv_name"><TMPL_VAR ESCAPE=1 NAME="SRV_PREFIX"></label>
-        <input type="text" name="name" id="add_srv_name" /><strong>.<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME"></strong></p>
-    <p><label for="add_srv_protocol"><TMPL_VAR ESCAPE=1 NAME="SRV_PROTOCOL_TEXT"></label>
-        <input type="text" name="protocol" id="add_srv_protocol"/></p>
-    <p><label for="add_srv_service"><TMPL_VAR ESCAPE=1 NAME="SRV_SERVICE_TEXT"></label>
-        <input type="text" name="service" id="add_srv_service"/></p>
-   <p><label for="add_srv_data"><TMPL_VAR ESCAPE=1 NAME="SRV_HOSTNAME_TEXT"></label>
-        <input type="text" name="host" id="add_srv_data"/></p>
-    <p><label for="add_srv_port"><TMPL_VAR ESCAPE=1 NAME="SRV_PORT_TEXT"></label>
-        <input type="text" name="port" id="add_srv_port" size="5" maxlength="5"/></p>
-    <p><label for="add_srv_priority"><TMPL_VAR ESCAPE=1 NAME="SRV_PRIORITY_TEXT"></label>
-        <input type="text" name="aux" id="add_srv_priority" size="5" maxlength="5"/></p>
-    <p><label for="add_srv_weight"><TMPL_VAR ESCAPE=1 NAME="SRV_WEIGHT_TEXT"></label>
-        <input type="text" name="weight" id="add_srv_weight" size="5" maxlength="5"/></p>
-    <p class="button">
-        <input type="hidden" name="action" value="add_srv" />
-        <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">" />
-        <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT">" />
-    </p>
-</form>
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_TYPETXT"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_LIST_TXT"></h3>
-<TMPL_VAR ESCAPE=0 NAME="LIST_TXT">
-
-<h3><TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_TXT"></h3>
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-    <p class="help"><TMPL_VAR ESCAPE=1 NAME="TEXT_ORIGIN"></p>
-	<p>
-		<label for="add_txt_prefix">
-			<TMPL_VAR ESCAPE=1 NAME="TXT_NAME_TEXT">
-		</label>
-		<input type="text" name="name"  id="add_txt_prefix" /><strong>.<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME"></strong>
-	</p>
-	<p>
-		<label for="add_txt_data">
-		<TMPL_VAR ESCAPE=1 NAME="TXT_DATA_TEXT">
-		</label>
-		<textarea name="data" id="add_txt_data"></textarea>
-	</p>
-	<p class="button">
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">" />
-        <input type="hidden" name="action" value="add_txt"/>
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT">" />
-	</p>
-</form>
-
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_ACL_ADMIN"></h2>
-		
-<form method="post" action="../acl/view.pl" accept-charset="utf-8">
-	<p><TMPL_VAR ESCAPE=1 NAME="EXPLAIN_ADMIN_ACL"></p>
-
-	<input type="hidden" name="target_oid" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_OID">" />
-	<p class="button" id="buttonAclAdmin">
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="ADMIN_ACL">" />
-	</p>
-</form>
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TEXT_DELETE_DNS"></h2>
-
-<form method="post" action="/dns/delete.pl" accept-charset="utf-8">
-	<fieldset class="delete">
-		<legend>
-			<TMPL_VAR ESCAPE=1 NAME="ASK_DELETE_DNS">:
-		</legend>
-
-		<p class="warning"><TMPL_VAR ESCAPE=1 NAME="TEXT_BEFORE_DELETE"></p>
-		<p>
-			<input type="radio" name="DELETE" id="DELETE_NO"  value="0" checked="checked" />
-			<label for="DELETE_NO">
-				<TMPL_VAR ESCAPE=1 NAME="NO">
-			</label>
-		</p>
-		<p>
-			<input type="radio" name="DELETE" id="DELETE_YES" value="1" />
-			<label for="DELETE_YES">
-				<TMPL_VAR ESCAPE=1 NAME="YES">
-			</label>
-		</p>
-	</fieldset>
-	
-	<p class="button">
-		<input type="hidden" name="name" value="<TMPL_VAR ESCAPE=1 NAME="DOMAIN_NAME">" />
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_DELETE">" />
-	</p>
-				
-</form>
-
-<TMPL_VAR ESCAPE=0 NAME="ADMIN_PART">

Added: trunk/vhffs-panel/templates/dns/prefs.tt
===================================================================
--- trunk/vhffs-panel/templates/dns/prefs.tt	                        (rev 0)
+++ trunk/vhffs-panel/templates/dns/prefs.tt	2011-05-19 05:44:26 UTC (rev 1773)
@@ -0,0 +1,312 @@
+<h2>[% 'A records (name -> IPv4)' | i18n | html %]</h2>
+<h3>[% 'Existing A records' | i18n | html %]</h3>
+
+<p class="help">[% '@ represents the ORIGIN (%s).' | i18n | pretty_print(dns.get_domain) | html %]</p>
+
+[% UNLESS sorted_a.size() %]
+<p class="info">[% 'No registered A records for this domain.' | i18n | html %]</p>
+[% END %]
+
+[% FOREACH a IN sorted_a %]
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p>
+        <label for="data_[% a.id %]">[% (a.name == '@' ? dns.get_domain : a.name) | html %]-&gt;</label>
+        <input type="text" name="data" id="data_[% a.id %]" value="[% a.data | html %]" />
+        <input type="hidden" name="domain" value="[% a.domain | html %]" />
+        <input type="hidden" name="rr_id" value="[% a.id %]" />
+        <input type="hidden" name="action" value="manage_a"/>
+        <input type="submit" value="[% 'Update' | i18n | html %]" class="autowidth" name="modify_a_submit" />
+        <input type="submit" value="[% 'Delete' | i18n | html %]" name="delete_a_submit" class="autowidth"/>
+    </p>
+</form>
+[% END # a In sorted_a %]
+
+<h3>[% 'Add a A record' | i18n | html %]</h3>
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p class="help">[% 'Use @ for ORIGIN (%s)' | i18n| pretty_print(dns.get_domain) | html %]</p>
+	<p>
+		<label for="add_a_prefix">[% 'Name for the record:' | i18n | html %]</label>
+		<input type="text" name="name"  id="add_a_prefix" /><strong>.[% dns.get_domain | html %]</strong>
+	</p>
+	<p>[% 'Use our servers as destination IP for this A record?' | i18n | html %]
+		<input type="radio" name="redirect" id="redirect_true" value="true" checked="checked"
+            onclick="document.getElementById('add_a_ip').style.display='none'"/>
+        <label for="redirect_true" style="display:inline;float:none">[% 'Yes' | i18n | html %]</label>
+        <input type="radio" name="redirect" value="false" id="redirect_false"
+            onclick="document.getElementById('add_a_ip').style.display='block'"/>
+        <label for="redirect_false" style="display:inline;float:none">[% 'No' | i18n | html %]</label>
+    </p>
+	<p id="add_a_ip" style="display:none">
+		<label for="add_a_data">[% 'IPv4 address:' | i18n | html %]</label>
+		<input type="text" name="data" id="add_a_data" />
+	</p>
+	<p class="button">
+		<input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+        <input type="hidden" name="action" value="add_a"/>
+		<input type="submit" value="[% 'Add record' | i18n | html %]" />
+	</p>
+</form>
+
+<h2>[% 'AAAA records (name -> IPv6)' | i18n | html %]</h2>
+<h3>[% 'Existing AAAA records' | i18n | html %]</h3>
+
+<p class="help">[% '@ represents the ORIGIN (%s).' | i18n | pretty_print(dns.get_domain) | html %]</p>
+
+[% UNLESS sorted_aaaa.size() %]
+<p class="info">[% 'No registered AAAA records for this domain.' | i18n | html %]</p>
+[% END %]
+
+[% FOREACH aaaa IN sorted_aaaa %]
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p>
+    <label for="data_[% aaaa.id %]">[% (aaaa.name == '@' ? dns.get_domain : aaaa.name) | html %]-&gt;</label>
+        <input type="text" name="data" id="data_[% aaaa.id %]" value="[% aaaa.data | html %]" />
+        <input type="hidden" name="domain" value="[% dns.get_domain | html %]"/>
+        <input type="hidden" name="rr_id" value="[% aaaa.id %]"/>
+        <input type="hidden" name="action" value="manage_aaaa"/>
+        <input type="submit" value="[% 'Update' | i18n | html %]" class="autowidth" name="modify_aaaa_submit" />
+        <input type="submit" value="[% 'Delete' | i18n | html %]" name="delete_aaaa_submit" class="autowidth"/>
+    </p>
+</form>
+[% END # aaaa IN sorted_aaaa %]
+
+<h3>[% 'Add a AAAA record' | i18n | html %]</h3>
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p class="help">[% 'Use @ for ORIGIN (%s)' | i18n| pretty_print(dns.get_domain) | html %]</p>
+	<p>
+		<label for="add_aaaa_prefix">[% 'Name for the record:' | i18n | html %]</label>
+		<input type="text" name="name" id="add_aaaa_prefix" /><strong>.[% dns.get_domain | html %]</strong>
+	</p>
+	<p>[% 'Use our servers as destination IP for this AAAA record?' | i18n | html %]
+		<input type="radio" name="redirect" id="redirect_aaaa_true" value="true" checked="checked"
+            onclick="document.getElementById('add_aaaa_ip').style.display='none'"/>
+        <label for="redirect_aaaa_true" style="display:inline;float:none">[% 'Yes' | i18n | html %]</label>
+        <input type="radio" name="redirect" value="false" id="redirect_aaaa_false"
+            onclick="document.getElementById('add_aaaa_ip').style.display='block'"/>
+        <label for="redirect_aaaa_false" style="display:inline;float:none">[% 'No' | i18n | html %]</label>
+    </p>
+	<p id="add_aaaa_ip" style="display:none">
+		<label for="add_aaaa_data">[% 'IPv6 address:' | i18n | html %]</label>
+		<input type="text" name="data" id="add_aaaa_data" />
+	</p>
+	<p class="button">
+		<input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+        <input type="hidden" name="action" value="add_aaaa"/>
+		<input type="submit" value="[% 'Add record' | i18n | html %]" />
+	</p>
+</form>
+
+
+<h2>[% 'MX records (mail servers)' | i18n | html %]</h2>
+<h3>[% 'Existing MX records for this domain' | i18n | html %]</h3>
+
+[% UNLESS sorted_mx.size() %]
+<p>[% 'No MX record for this domain' | i18n | html %]</p>
+[% END %]
+
+[% FOREACH mx IN sorted_mx %]
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+<p><label for="data_[% mx.id %]">
+    [% (mx.name == '@' ? dns.get_domain : mx.name) | html %] ([% 'Priority:' | i18n | html %] [% mx.aux | html %])-&gt;
+</label>
+    <input type="text" name="data"  id="data_[% mx.id %]" value="[% mx.data | html %]" />
+    <input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+    <input type="hidden" name="rr_id" value="[% mx.id %]" />
+    <input type="hidden" name="action" value="manage_mx" />
+    <input type="submit" value="[% 'Update' | i18n | html %]" name="modify_mx_submit" class="autowidth"/>
+    <input type="submit" value="[% 'Delete' | i18n | html %]" name="delete_mx_submit" class="autowidth"/>
+</p>
+</form>
+[% END %]
+
+<h3>[% 'Add a MX record' | i18n | html %]</h3>
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p class="help">[% 'Use @ for ORIGIN (%s)' | i18n| pretty_print(dns.get_domain) | html %]</p>
+	<p>
+		<label for="add_mx_prefix">[% 'Name of the record:' | i18n | html %]</label>
+		<input type="text" name="name" id="add_mx_prefix" value="@"/><strong>.[% dns.get_domain | html %]</strong>
+	</p>
+	<p>
+		<label for="add_mx_data">[% 'MX name:' | i18n | html %]</label>
+		<input type="text" name="data" id="add_mx_data" />
+	</p>
+	<p>
+		<label for="add_mx_aux">[% 'MX priority:' | i18n | html %]</label>
+		<input type="text" name="aux" id="add_mx_aux" />
+	</p>
+	<p class="button">
+        <input type="hidden" name="action" value="add_mx" />
+		<input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+		<input type="submit" value="[% 'Add record' | i18n | html %]" />
+	</p>
+</form>
+
+
+<h2>[% 'CNAME records (aliases)' | i18n | html %]</h2>
+<h3>[% 'Existing CNAMEs for this domain' | html %]</h3>
+
+[% UNLESS sorted_cname.size() %]
+<p>[% 'No CNAME record for this domain.' | i18n | html %]</p>
+[% END %]
+
+[% FOREACH cname IN sorted_cname %]
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+	<p>
+		<label for="data_[% cname.id %]">[% (cname.name == '@' ? dns.get_domain : cname.name) | html %]-&gt;</label>
+		<input type="text" name="data" id="data_[% cname.id %]"value="[% cname.data | html %]" />
+        <input type="hidden" name="action" value="manage_cname" />
+        <input type="hidden" name="rr_id" value="[% cname.id %]"/>
+		<input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+		<input type="submit" name="modify_cname_submit" value="[% 'Update' | i18n | html %]" class="autowidth" />
+		<input type="submit" name="delete_cname_submit" value="[% 'Delete' | i18n | html %]" class="autowidth" />
+	</p>
+</form>
+[% END %]
+
+<h3>[% 'Add a CNAME record' | i18n | html %]</h3>
+
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+	<p>
+		<label for="add_cname_name">[% 'Subdomain name:' | i18n | html %]</label>
+		<input type="text" name="name" id="add_cname_name" /><strong>.[% dns.get_domain | html %]</strong>
+	</p>
+	<p>
+		<label for="add_cname_data">[% 'Destination:' | i18n | html %]</label>
+        <input type="text" name="data" id="add_cname_data" />
+	</p>
+	<p class="button">
+        <input type="hidden" name="action" value="add_cname" />
+		<input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+		<input type="submit" value="[% 'Add record' | i18n | html %]" />
+	</p>
+</form>
+
+<h2>[% 'NS records for this domain (nameservers)' | i18n | html %]</h2>
+<p class="warning">[% 'Modifying NS records configuration could lead to serious problem. Proceed with caution.' | i18n | html %]</p>
+<h3>[% 'Existing NS records' %]</h3>
+
+[% UNLESS sorted_ns.size() %]
+<p>[% 'No NS record for this domain (do not expect anything to work).' | i18n | html %]</p>
+[% END %]
+
+[% FOREACH ns IN sorted_ns %]
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+<p>
+    <label>[% (ns.name == '@' ? dns.get_domain : ns.name) | html %] -&gt; [% ns.data | html %]</label>
+    <input type="hidden" name="action" value="manage_ns" />
+    <input type="hidden" name="rr_id" value="[% ns.id %]" />
+    <input type="hidden" name="domain" value="[% dns.domain | html %]" />
+    <input type="submit" name="delete_ns_submit" value="[% 'Delete' | i18n | html %]" class="autowidth"/>
+</p>
+</form>
+[% END %]
+
+<h3>[% 'Add a NS record' | i18n | html %]</h3>
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p><label for="add_ns_prefix">[% 'Name of the record:' | i18n | html %]</label>
+    <input type="text" name="name" id="add_ns_prefix"/><strong>.[% dns.get_domain | html %]</strong></p>
+    <p><label for="add_ns_data">[% 'Host of your name server:' | i18n | html %]</label>
+    <input type="text" name="data" id="add_ns_data"/></p>
+    <input type="hidden" name="action" value="add_ns"/>
+    <input type="hidden" name="domain" value="[% dns.get_domain | html %]"/>
+    <input type="submit" value="[% 'Add record' | i18n | html %]" class="autowidth"/>
+</form>
+
+<h2>[% 'SRV records (servers)' | i18n | html %]</h2>
+<h3>[% 'Existing SRV records for this domain' | i18n | html %]</h3>
+
+[% UNLESS sorted_srv.size() %]
+<p>[% 'No SRV records for this domain.' | i18n | html %]</p>
+[% END %]
+
+[% FOREACH srv IN sorted_srv %]
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p>
+    <label>[% srv.name | html %] -&gt;</label>
+    <input type="text" name="host" id="host_[% srv.id %]" value="[% srv.host | html %]" title="[% 'Host' | i18n | html %]"/>
+    <input type="text" name="port" id="port_[% srv.id %]" value="[% srv.port %]" maxlength="5" size="5" style="width:auto" title="[% 'Port' | i18n | html %]"/>
+    <input type="text" name="aux" id="aux_[% srv.id %]" value="[% srv.aux %]" maxlength="5" size="5" style="width:auto" title="[% 'Priority' | i18n | html %]"/>
+    <input type="text" name="weight" id="weight_[% srv.id %]" value="[% srv.weight %]" maxlength="5" size="5" style="width:auto" title="[% 'Weight' | i18n | html %]"/>
+        <input type="hidden" name="domain" value="[% dns.get_domain %]"/>
+        <input type="hidden" name="rr_id" value="[% srv.id %]" />
+        <input type="hidden" name="action" value="manage_srv"/>
+        <input type="submit" value="[% 'Update' | i18n | html %]" class="autowidth" name="modify_srv_submit" />
+        <input type="submit" value="[% 'Delete' | i18n | html %]" name="delete_srv_submit" class="autowidth"/>
+    </p>
+</form>
+[% END %]
+<h3>[% 'Add a SRV record' | i18n | html %]</h3>
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p class="help">[% 'Use @ for ORIGIN (%s)' | i18n| pretty_print(dns.get_domain) | html %]</p>
+    <p><label for="add_srv_name">[% 'Record name:' | i18n | html %]</label>
+        <input type="text" name="name" id="add_srv_name" /><strong>.[% dns.get_domain | html %]</strong></p>
+    <p><label for="add_srv_protocol">[% 'Protocol:' | i18n | html %]</label>
+        <input type="text" name="protocol" id="add_srv_protocol"/></p>
+    <p><label for="add_srv_service">[% 'Service:' | i18n | html %]</label>
+        <input type="text" name="service" id="add_srv_service"/></p>
+   <p><label for="add_srv_data">[% 'Host:' | i18n | html %]</label>
+        <input type="text" name="host" id="add_srv_data"/></p>
+    <p><label for="add_srv_port">[% 'Port:' | i18n | html %]</label>
+        <input type="text" name="port" id="add_srv_port" size="5" maxlength="5"/></p>
+    <p><label for="add_srv_priority">[% 'Priority:' | i18n | html %]</label>
+        <input type="text" name="aux" id="add_srv_priority" size="5" maxlength="5"/></p>
+    <p><label for="add_srv_weight">[% 'Weight:' | i18n | html %]</label>
+        <input type="text" name="weight" id="add_srv_weight" size="5" maxlength="5"/></p>
+    <p class="button">
+        <input type="hidden" name="action" value="add_srv" />
+        <input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+        <input type="submit" value="[% 'Add record' | i18n | html %]" />
+    </p>
+</form>
+
+<h2>[% 'TXT records for this domain (textual information)' | i18n | html %]</h2>
+<h3>[% 'Existing TXT records' | i18n | html %] </h3>
+
+[% UNLESS sorted_txt.size() %]
+<p>[% 'No TXT records for this domain.' | i18n | html %]</p>
+[% END %]
+
+[% FOREACH txt IN sorted_txt %]
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p>
+        <label for="data_[% txt.id %]">[% (txt.name == '@' ? dns.get_domain : txt.name) | html %]</label>
+        <input type="text" name="data" id="data_[% txt.id %]" value="[% txt.data | html %]" />
+        <input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+        <input type="hidden" name="rr_id" value="[% txt.id %]" />
+        <input type="hidden" name="action" value="manage_txt"/>
+        <input type="submit" value="[% 'Update' | i18n | html %]" class="autowidth" name="modify_txt_submit" />
+        <input type="submit" value="[% 'Delete' | i18n | html %]" name="delete_txt_submit" class="autowidth"/>
+    </p>
+</form>
+[% END %]
+
+<h3>[% 'Add a TXT record' | i18n | html %]</h3>
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+    <p class="help">[% 'Use @ for ORIGIN (%s)' | i18n| pretty_print(dns.get_domain) | html %]</p>
+	<p>
+		<label for="add_txt_prefix">[% 'Record name:' | i18n | html %]</label>
+		<input type="text" name="name"  id="add_txt_prefix" /><strong>.[% dns.get_domain | html %]</strong>
+	</p>
+	<p>
+		<label for="add_txt_data">[% 'Textual information:' | i18n | html %]</label>
+		<textarea name="data" id="add_txt_data"></textarea>
+	</p>
+	<p class="button">
+		<input type="hidden" name="domain" value="[% dns.get_domain | html %]" />
+        <input type="hidden" name="action" value="add_txt"/>
+		<input type="submit" value="[% 'Add record' | i18n | html %]" />
+	</p>
+</form>
+
+[% INCLUDE 'acl/form.tt' 
+    object = dns %]
+
+[% INCLUDE 'object/delete.tt'
+    type = 'dns'
+    oid = dns.get_oid %]
+
+[% IF current_user.is_admin %]
+    [% INCLUDE 'admin/object/edit.tt' 
+        object = dns %]
+[% END %]
+


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/