[vhffs-dev] [1004] All mailinglist prefs are handled by prefs.pl.

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


Revision: 1004
Author:   beuss
Date:     2007-10-18 06:15:43 +0000 (Thu, 18 Oct 2007)

Log Message:
-----------
All mailinglist prefs are handled by prefs.pl.

Modified Paths:
--------------
    trunk/vhffs-panel/Makefile.am
    trunk/vhffs-panel/mailinglist/prefs.pl
    trunk/vhffs-panel/templates/mailinglist/list_part.tmpl
    trunk/vhffs-panel/templates/mailinglist/prefs.tmpl

Removed Paths:
-------------
    trunk/vhffs-panel/mailinglist/add_sub.pl
    trunk/vhffs-panel/mailinglist/change_right.pl
    trunk/vhffs-panel/mailinglist/del_member.pl
    trunk/vhffs-panel/mailinglist/save_options.pl
    trunk/vhffs-panel/mailinglist/save_sig.pl


Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/Makefile.am	2007-10-18 06:15:43 UTC (rev 1004)
@@ -113,15 +113,10 @@
 	mail/delete.pl \
 	mail/index.pl \
 	mail/prefs.pl \
-	mailinglist/add_sub.pl \
-	mailinglist/change_right.pl \
 	mailinglist/create.pl \
-	mailinglist/del_member.pl \
 	mailinglist/delete.pl \
 	mailinglist/index.pl \
 	mailinglist/prefs.pl \
-	mailinglist/save_options.pl \
-	mailinglist/save_sig.pl \
 	mysql/create.pl \
 	mysql/delete.pl \
 	mysql/index.pl \

Deleted: trunk/vhffs-panel/mailinglist/add_sub.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/add_sub.pl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/mailinglist/add_sub.pl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -1,122 +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 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::Functions;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Services::MailingList;
-use Vhffs::Acl;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
-my $cgi = $panel->{'cgi'};
-my $domain = $cgi->param("DOMAIN");
-my $lpart = $cgi->param("LOCALPART");
-my $memberlist = $cgi->param("MEMBERS");
-
-my $template;
-my $subtemplate;
-my $message = "";
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-my $list = Vhffs::Services::MailingList::get_by_mladdress( $vhffs , $lpart , $domain , $user , $group );
-
-$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-
-
-if( ( ! defined $lpart ) || ( ! defined $domain ) || ( ! defined $memberlist ) )
-{
-	$message = gettext( "CGI Error!");
-}
-elsif( ! defined ( $list ) )
-{
-	$message = gettext( "Cannot get informations on this object");
-}
-elsif( $list->get_status != Vhffs::Constants::ACTIVATED )
-{
-	$message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
-}
-elsif( ( Vhffs::Acl::what_perm_for_user( $user , $list , $vhffs ) < Vhffs::Constants::ACL_MODIFY ) && ( $user->is_admin != 1 ) )
-{
-	$message = gettext("You're not allowed to do this (ACL rights)");
-}
-
-my $listengineconfig = $vhffs->get_config->get_listengine;
-
-my @members = split /\r\n/, $memberlist;
-foreach my $member ( @members )  {
-	chomp $member;
-
-	if( ! Vhffs::Functions::valid_mail( $member ) )  {
-		$message .= sprintf( gettext("%s is not a valid mail"), $member );
-	}
-	elsif( $list->add_sub( $member , Vhffs::Constants::ML_RIGHT_SUB )  < 0 ) {
-		$message .= sprintf( gettext( "%s is already subscribed" ), $member );
-	}
-	else {
-		$message .= sprintf( gettext( "%s has been successfully added" ), $member );
-		Vhffs::Functions::send_mail(
-			$listengineconfig->{'listmaster'},
-			$member,
-			undef,
-			sprintf(gettext('[%s] You\'ve been added to the list %s'), $list->get_prefix, $list->get_localpart.'@'.$list->get_domain),
-			sprintf(gettext("Greetings,\n\nYou've been added to the list %s on platform %s.\n\nYou may get some help on listengine by sending an email to %s-request\@%s with subject help.\n\nCheers."), $list->get_localpart.'@'.$list->get_domain, $vhffs->get_config->get_host_name, $list->get_localpart, $list->get_domain),
-			);
-	}
-}
-
-$template->param( MESSAGE => $message );
-$panel->set_refresh_url( "/mailinglist/prefs.pl?local=$lpart&domain=$domain" );
-$panel->build( $template );
-$panel->display;

Deleted: trunk/vhffs-panel/mailinglist/change_right.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/change_right.pl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/mailinglist/change_right.pl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -1,119 +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 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::Functions;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Services::MailingList;
-use Vhffs::Acl;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
-my $cgi = $panel->{'cgi'};
-my $domain = $cgi->param("DOMAIN");
-my $lpart = $cgi->param("LOCALPART");
-my $member = $cgi->param("MEMBER");
-my $right = $cgi->param("RIGHT");
-
-my $template;
-my $subtemplate;
-my $message;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-my $list = Vhffs::Services::MailingList::get_by_mladdress( $vhffs, $lpart, $domain );
-
-$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-
-if( ( ! defined $lpart ) ||( ! defined $domain )  )
-{
-	$message = gettext( "CGI Error!");
-}
-elsif( ! defined ( $list ) )
-{
-	$message = gettext( "Cannot get informations on this object");
-}
-elsif( $list->get_status != Vhffs::Constants::ACTIVATED )
-{
-	$message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
-}
-elsif( ( Vhffs::Acl::what_perm_for_user( $user , $list , $vhffs ) < Vhffs::Constants::ACL_MODIFY ) && ( $user->is_admin != 1 ) )
-{
-	$message = gettext("You're not allowed to do this (ACL rights)");
-}
-elsif( ! Vhffs::Functions::valid_mail( $member ) )
-{
-	$message = gettext("Not valid mail");
-}
-elsif( ! ( $right =~ /^[0-9]+$/ ) )
-{
-	$message = gettext("CGI Error!");
-}
-else
-{
-	if( ( my $retour = $list->change_right_for_sub( $member , $right ) ) < 0 )
-	{
-		$message = gettext( "An error occured while modifying the rights" );
-	}
-	else
-	{
-		$message = gettext( "Rights successfully changed" );
-	}
-
-}
-
-$template->param( MESSAGE => $message );
-$panel->set_refresh_url( "/mailinglist/prefs.pl?local=$lpart&domain=$domain" );
-$panel->build( $template );
-$panel->display;

Deleted: trunk/vhffs-panel/mailinglist/del_member.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/del_member.pl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/mailinglist/del_member.pl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -1,114 +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 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::Functions;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Services::MailingList;
-use Vhffs::Acl;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
-my $cgi = $panel->{'cgi'};
-my $domain = $cgi->param("DOMAIN");
-my $lpart = $cgi->param("LOCALPART");
-my $member = $cgi->param("MEMBER");
-
-my $template;
-my $subtemplate;
-my $message;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-my $list = Vhffs::Services::MailingList::get_by_mladdress( $vhffs, $lpart, $domain );
-
-$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-
-if( ( ! defined $lpart ) ||( ! defined $domain )  )
-{
-	$message = gettext( "CGI Error!");
-}
-elsif( ! defined ( $list ) )
-{
-	$message = gettext( "Cannot get informations on this object");
-}
-elsif( $list->get_status != Vhffs::Constants::ACTIVATED )
-{
-	$message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
-}
-elsif( ( Vhffs::Acl::what_perm_for_user( $user , $list , $vhffs ) < Vhffs::Constants::ACL_MODIFY ) && ( $user->is_admin != 1 ) )
-{
-	$message = gettext("You're not allowed to do this (ACL rights)");
-}
-elsif( ! Vhffs::Functions::valid_mail( $member ) )
-{
-	$message = gettext("Not valid mail");
-}
-else
-{
-	if( $list->del_sub( $member )  < 0 )
-	{
-		$message = gettext( "An error occured while unsubscribing the user" );
-	}
-	else
-	{
-		$message = gettext( "Successfully deleted" );
-	}
-#	$message = $list->add_sub( $member , 0 );
-
-}
-
-$template->param( MESSAGE => $message );
-$panel->set_refresh_url( "/mailinglist/prefs.pl?local=$lpart&domain=$domain" );
-$panel->build( $template );
-$panel->display;

Modified: trunk/vhffs-panel/mailinglist/prefs.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/prefs.pl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/mailinglist/prefs.pl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -44,6 +44,7 @@
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
+use Vhffs::Panel::Template;
 use Vhffs::Services::MailingList;
 use Vhffs::Acl;
 use Vhffs::Constants;
@@ -66,12 +67,8 @@
 my $subtemplate;
 my $templatedir = $vhffs->get_config->get_templatedir;
 
-my $num_members;
-$num_members = 0;
-
 #defined name in CGI overwrite lpart and domain cgi
-if( defined $name )
-{
+if( defined $name ) {
 	( $lpart , $domain ) =  ( $name =~ /(.+)\@(.+)/ );
 
 }
@@ -79,33 +76,40 @@
 my $list = Vhffs::Services::MailingList::get_by_mladdress( $vhffs , $lpart , $domain );
 
 
-if( ! defined $list )
-{
+if( ! defined $list ) {
 
 	$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-	my $message = gettext( "Cannot get informations on this object".$lpart."/".$domain);
+	my $message = sprintf( gettext('Mailing list %s@%s not found'), $lpart, $domain);
 	$template->param( MESSAGE => $message );
 
-}
-elsif( ( $list->get_status != Vhffs::Constants::ACTIVATED ) && ( $user->is_admin != 1 ) )
-{
+} elsif( ( $list->get_status != Vhffs::Constants::ACTIVATED ) && ( $user->is_admin != 1 ) ) {
 	
 	$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 	my $message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
 	$template->param( MESSAGE => $message );
 }
-elsif( ( Vhffs::Acl::what_perm_for_user( $user , $list , $vhffs ) < Vhffs::Constants::ACL_VIEW ) && ( $user->is_admin != 1 ) )
+elsif( !$user->can_view($list) )
 {
 	$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 	my $message = gettext("You're not allowed to do this (ACL rights)");
 	$template->param( MESSAGE => $message );
-}
-else
-{
-	$template = new HTML::Template( filename => $templatedir."/panel/mailinglist/prefs.tmpl" );
+} else {
+    if(defined $cgi->param('options_submit')) {
+        update_ml_options();
+    } elsif(defined $cgi->param('delete_submit')) {
+        delete_member();
+    } elsif(defined $cgi->param('change_rights_submit')) {
+        change_rights();
+    } elsif(defined $cgi->param('add_members_submit')) {
+        add_members();
+    }
+    
+	$template = new Vhffs::Panel::Template( filename => $templatedir."/panel/mailinglist/prefs.tmpl",
+        die_on_bad_params => 0, global_var => 1);
 
-	$template->param( TEXT_TITLE => gettext("Administration for list ") );
-	$template->param( VALUE_LIST => $list->get_localpart . "\@" . $list->get_domain );
+    $panel->set_title( sprintf(gettext('Administration for list %s'),
+            $list->get_localpart . "\@" . $list->get_domain) );
+	
 	$template->param( VALUE_DOMAIN => $list->get_domain );
 	$template->param( VALUE_LOCALPART => $list->get_localpart );
 	
@@ -147,7 +151,6 @@
 
 	$template->param( TEXT_SUBMIT_PREFS => gettext("Save options") );
 
-	$template->param( TITLE_SIGNATURE => gettext("Signature") );
 	$template->param( VALUE_SIGNATURE => $list->get_signature );
 	$template->param( TEXT_SUBMIT_SIGNATURE => gettext("Update signature") );
 	
@@ -162,58 +165,32 @@
 		$emaillist .= $_->{'mail'}."\n";
 	}
 	$template->param( PROJECT_MEMBERS_LIST => $emaillist );
-	$template->param( FILL_MEMBERS_TEXT => gettext("Fill with project's members emails") );
-	$template->param( CHECK_OPENARCHIVE => "checked" ) if( $list->get_open_archive == 1 );
-	$template->param( CHECK_REPLYTO => "checked" ) if( $list->get_replyto == 1 );
+	$template->param( PUBLIC_ARCHIVE => $list->get_open_archive == 1 );
+	$template->param( REPLY_TO => $list->get_replyto == 1 );
 
-	my $subs = $list->get_members;
-	my $output = "";
-	if( defined $subs )
-	{
-		foreach( keys %{$subs} )
-		{
-			$subtemplate = new HTML::Template( filename => $templatedir."/panel/mailinglist/list_part.tmpl" );
-			$subtemplate->param( BUTTON_DELETE_MEMBER   => gettext("Delete from list") );
-			$subtemplate->param( BUTTON_CHANGE_RIGHT    => gettext("Change rights\n") );
-			$subtemplate->param( MEMBER                 => $subs->{$_}{member} );
-			$subtemplate->param( VALUE_LOCALPART        => $list->get_localpart );
-			$subtemplate->param( VALUE_DOMAIN           => $list->get_domain );
-	
-			$subtemplate->param( VALUE_RIGHT_SUB                           => Vhffs::Constants::ML_RIGHT_SUB );
-			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_REPLY         => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY );
-			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_VALIDATION    => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_VALIDATION );
-			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_DELETE        => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL);
-			$subtemplate->param( VALUE_RIGHT_ADMIN                         => Vhffs::Constants::ML_RIGHT_ADMIN );
-			$subtemplate->param( TEXT_RIGHT_SUB                            => gettext( "Subscribed" ) );
-			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_REPLY          => gettext( "Waiting for confirmation" ) );
-			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_VALIDATION     => gettext( "Waiting for validation" ) );
-			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_DELETE         => gettext( "Waiting for deletion" ) );
-			$subtemplate->param( TEXT_RIGHT_ADMIN                          => gettext( "Admin"  ) );
-			$subtemplate->param( SELECTED_RIGHT_SUB                        => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB );
-			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_REPLY      => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY );
-			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_VALIDATION => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_VALIDATION );
-			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_DELETE     => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL );
-			$subtemplate->param( SELECTED_RIGHT_ADMIN                      => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_ADMIN );
+	my @subs = values(%{$list->get_members});
+    
+    $template->param( LOCAL_PART => $list->get_localpart );
+    $template->param( DOMAIN => $list->get_domain );
 
-			$output .= $subtemplate->output;	
-			$num_members++;
-		}
-		$template->param( LIST_MEMBERS => $output );
-		$template->param( HOWMANY_MEMBERS => $num_members );
-	}
-	else
-	{
-		$template->param( LIST_MEMBERS => gettext( "No member on this list" ) );
-	}
+    $template->param( ML_RIGHT_SUB_WAITING_FOR_REPLY => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY);
+    $template->param( ML_RIGHT_SUB_WAITING_FOR_VALIDATION => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_VALIDATION);
+    $template->param( ML_RIGHT_SUB => Vhffs::Constants::ML_RIGHT_SUB);
+    $template->param( ML_RIGHT_SUB_WAITING_FOR_DEL => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL);
+    $template->param( ML_RIGHT_ADMIN => Vhffs::Constants::ML_RIGHT_ADMIN);
+    
 
+    $template->param( MEMBERS => \@subs );
 
-	$template->param( TEXT_DELETE_LIST => gettext("Delete this list") );
-	$template->param( TEXT_BEFORE_DELETE => gettext("This action is non-reversible. All services associated to this project will be DESTROYED.") );
-	$template->param( ASK_DELETE_WEB => gettext("Are you SURE you want DELETE this mailing list ?") );
-	$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 this project.") );
-	$template->param( TEXT_DELETE => gettext("Delete") );
+    $template->param( HOWMANY_MEMBERS => scalar(@subs) );
 
+    $template->param( TEXT_DELETE_LIST => gettext("Delete this list") );
+    $template->param( TEXT_BEFORE_DELETE => gettext("This action is non-reversible. All services associated to this project will be DESTROYED.") );
+    $template->param( ASK_DELETE_WEB => gettext("Are you SURE you want DELETE this mailing list ?") );
+    $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 this project.") );
+    $template->param( TEXT_DELETE => gettext("Delete") );
+
     $template->param( VALUE_OID => $list->get_oid );
     $template->param( TEXT_ACL_ADMIN => "Admin Rights on this object (ACL)" );
     $template->param( EXPLAIN_ADMIN_ACL => "You can Manage rights on this service for each user in the VHFFS database. Please read help before manage it." );
@@ -233,3 +210,115 @@
 
 $panel->build( $template );
 $panel->display;
+
+
+sub update_ml_options {
+    my $prefix = $cgi->param('prefix');
+    my $sub_ctrl = $cgi->param('subscribe_control');
+    my $post_ctrl = $cgi->param('posting_control');
+    my $sig = $cgi->param('signature');
+
+    if(!$user->can_modify($list)) {
+        $panel->add_error( gettext('You are not allowed to change options (ACL rights)') );
+        return;
+    }
+
+    if(!defined $prefix || !defined $sub_ctrl || !defined $post_ctrl || !defined $sig) {
+      $panel->add_error( gettext('CGI Error') );
+      return;
+    }
+    $list->set_prefix($prefix);
+    $list->set_sub_ctrl($sub_ctrl);
+    $list->set_post_ctrl($post_ctrl);
+    $list->set_open_archive(defined $cgi->param('public_archive') ? 1 : 0);
+    $list->set_replyto(defined $cgi->param('reply_to') ? 1 : 0);
+    $list->set_signature($sig);
+    if($list->commit() < 0) {
+      $panel->add_error( gettext('Unable to save object') );
+    } else {
+      $panel->add_info( gettext('List updated') );
+    }
+}
+
+sub delete_member {
+    my $member = $cgi->param('member');
+
+    if(!$user->can_modify($list)) {
+        $panel->add_error( gettext('You are not allowed to delete members (ACL rights)') );
+        return;
+    }
+
+    if(!defined $member) {
+        $panel->add_error( gettext('CGI Error') );
+        return;
+    }
+
+    if( $list->del_sub($member) < 0 ) {
+        $panel->add_error('An error occured while deleting this subscriber');
+    } else {
+        $panel->add_info( sprintf( gettext('Subscriber %s deleted'), $member ) );
+    }
+}
+
+sub change_rights {
+    my $member = $cgi->param('member');
+    my $right = $cgi->param('right');
+
+    if(!$user->can_modify($list)) {
+        $panel->add_error('You are not allowed to manager subscribers\' rights (ACL rights)');
+        return;
+    }
+
+    if(!defined $member || !defined $right) {
+        $panel->add_error( gettext('CGI Error') );
+        return;
+    }
+
+    if( $list->change_right_for_sub( $member, $right ) < 0) {
+        $panel->add_error( sprintf( gettext('Unable to change rights for subscriber %s'), $member ) );
+    } else {
+        $panel->add_info( sprintf( gettext('Rights for subscriber %s updated'), $member ) );
+    }
+}
+
+sub add_members {
+    my $memberlist = $cgi->param('members');
+
+    if(!$user->can_modify($list)) {
+        $panel->add_error( gettext('You are not allowed to add members (ACL rights)') );
+        return;
+    }
+
+    if(!defined($memberlist)) {
+        $panel->add_error( gettext('CGI Error') );
+        return;
+    }
+
+    if($memberlist =~ /^\s*$/) {
+        $panel->add_error( gettext('You need to enter at least one new member') );
+        return;
+    }
+
+    my @members = split /\r\n/, $memberlist;
+    my $listengineconfig = $vhffs->get_config->get_listengine;
+
+    foreach my $member ( @members )  {
+        chomp $member;
+
+        if( ! Vhffs::Functions::valid_mail( $member ) )  {
+            $panel->add_error( sprintf( gettext('%s is not a valid mail'), $member ) )
+        }  elsif( $list->add_sub( $member , Vhffs::Constants::ML_RIGHT_SUB )  < 0 ) {
+            $panel->add_error( sprintf( gettext( '%s is already a member of this list' ), $member ) );
+        } else {
+            $panel->add_info( sprintf( gettext( '%s has been added' ), $member ) );
+            Vhffs::Functions::send_mail(
+                $listengineconfig->{'listmaster'},
+                $member,
+                undef,
+                sprintf(gettext('[%s] You\'ve been added to the list %s'), $list->get_prefix, $list->get_localpart.'@'.$list->get_domain),
+                sprintf(gettext("Greetings,\n\nYou've been added to the list %s on platform %s.\n\nYou may get some help on listengine by sending an email to %s-request\@%s with subject help.\n\nCheers."), $list->get_localpart.'@'.$list->get_domain, $vhffs->get_config->get_host_name, $list->get_localpart, $list->get_domain),
+                );
+        }
+    }
+}
+

Deleted: trunk/vhffs-panel/mailinglist/save_options.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/save_options.pl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/mailinglist/save_options.pl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -1,138 +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 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;
-use Vhffs::Services::MailingList;
-use Vhffs::Acl;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
-my $cgi = $panel->{'cgi'};
-my $domain = $cgi->param("DOMAIN");
-my $lpart = $cgi->param("LOCALPART");
-
-my $openarchive = $cgi->param("OPENARCHIVE");
-my $replyto = $cgi->param("REPLYTO");
-my $prefix = $cgi->param("PREFIX");
-my $sub_ctrl = $cgi->param("SUBSCRIBE_CONTROL");
-my $post_ctrl = $cgi->param("POSTING_CONTROL");
-
-my $template;
-my $subtemplate;
-my $message;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-my $list = Vhffs::Services::MailingList::get_by_mladdress( $vhffs , $lpart , $domain );
-
-$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-
-if( ( ! defined $lpart ) ||( ! defined $domain )  )
-{
-	$message = gettext( "CGI Error!");
-}
-elsif( ! defined ( $list ) )
-{
-	$message = gettext( "Cannot get informations on this object");
-}
-elsif( $list->get_status != Vhffs::Constants::ACTIVATED )
-{
-	$message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
-}
-elsif( ( Vhffs::Acl::what_perm_for_user( $user , $list , $vhffs ) < Vhffs::Constants::ACL_MODIFY ) && ( $user->is_admin != 1 ) )
-{
-	$message = gettext("You're not allowed to do this (ACL rights)");
-}
-else
-{
-
-    $list->set_prefix( $prefix ) if( defined $prefix );
-
-	$list->set_sub_ctrl( $sub_ctrl ) if( defined $sub_ctrl );
-
-	$list->set_post_ctrl( $post_ctrl ) if( defined $post_ctrl );
-
-	if( ! defined $openarchive )
-	{
-		$list->set_open_archive( 0 );
-	}
-	else
-	{
-		$list->set_open_archive( 1 );
-	}
-
-	if( ! defined $replyto )
-	{
-		$list->set_replyto( 0 );
-	}
-	else
-	{
-		$list->set_replyto( 1 );
-	}
-
-	if( ( my $retour = $list->commit ) < 0 )
-	{
-		$message = gettext( "Cannot save" );
-	}
-	else
-	{
-		$message = gettext( "Options successfully modified" );
-	}
-
-}
-
-$template->param( MESSAGE => $message );
-$panel->set_refresh_url( "/mailinglist/prefs.pl?local=$lpart&domain=$domain" );
-$panel->build( $template );
-$panel->display;

Deleted: trunk/vhffs-panel/mailinglist/save_sig.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/save_sig.pl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/mailinglist/save_sig.pl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -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 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;
-use Vhffs::Services::MailingList;
-use Vhffs::Acl;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $cgi = $panel->{'cgi'};
-my $domain = $cgi->param("DOMAIN");
-my $lpart = $cgi->param("LOCALPART");
-my $sig = $cgi->param("signature");
-
-my $template;
-my $subtemplate;
-my $message;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-my $list = Vhffs::Services::MailingList::get_by_mladdress( $vhffs , $lpart , $domain );
-
-$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-
-if( ( ! defined $lpart ) ||( ! defined $domain ) || (! defined $sig) )
-{
-	$message = gettext( "CGI Error!");
-}
-elsif( ! defined ( $list ) )
-{
-	$message = gettext( "Cannot get informations on this object");
-}
-elsif( $list->get_status != Vhffs::Constants::ACTIVATED )
-{
-	$message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
-}
-elsif( ( Vhffs::Acl::what_perm_for_user( $user , $list , $vhffs ) < Vhffs::Constants::ACL_MODIFY ) && ( $user->is_admin != 1 ) )
-{
-	$message = gettext("You're not allowed to do this (ACL rights)");
-}
-else
-{
-    $list->set_signature($sig);
-    if( $list->commit < 0 ) {
-        $message = gettext( "Cannot save" );
-    } else {
-        $message = gettext( "Options successfully modified" );
-    }
-}
-
-$template->param( MESSAGE => $message );
-$panel->set_refresh_url( "/mailinglist/prefs.pl?local=$lpart&domain=$domain" );
-$panel->build( $template );
-$panel->display;

Modified: trunk/vhffs-panel/templates/mailinglist/list_part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/mailinglist/list_part.tmpl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/templates/mailinglist/list_part.tmpl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -1,30 +1,19 @@
-<tr>
-	<td>
-		<tmpl_var name="MEMBER">
-	</td>
-
-	<td>
-		<form method="post" action="change_right.pl">
-		    <select name="RIGHT"  id="RIGHT">
-        	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB_WAITING_FOR_REPLY">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB_WAITING_FOR_REPLY">> <TMPL_VAR NAME="TEXT_RIGHT_SUB_WAITING_FOR_REPLY"></option>
-        	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB_WAITING_FOR_VALIDATION">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB_WAITING_FOR_VALIDATION">> <TMPL_VAR NAME="TEXT_RIGHT_SUB_WAITING_FOR_VALIDATION"></option>
-        	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB">> <TMPL_VAR NAME="TEXT_RIGHT_SUB"></option>
-			<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB_WAITING_FOR_DELETE">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB_WAITING_FOR_DELETE">> <TMPL_VAR NAME="TEXT_RIGHT_SUB_WAITING_FOR_DELETE"></option>
-        	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_ADMIN">" <TMPL_VAR NAME="SELECTED_RIGHT_ADMIN">> <TMPL_VAR NAME="TEXT_RIGHT_ADMIN"></option>
-
-        	</select>
-			<input type="hidden" name="MEMBER" value="<tmpl_var name="MEMBER">" />
-			<input type="hidden" name="LOCALPART" value="<tmpl_var name="VALUE_LOCALPART">" />
-			<input type="hidden" name="DOMAIN" value="<tmpl_var name="VALUE_DOMAIN">" />
-			<input type="submit" value="<tmpl_var name="BUTTON_CHANGE_RIGHT">" />
-		</form>
-	</td>
-	<td>
-		<form method="post" action="del_member.pl">
-			<input type="hidden" name="MEMBER" value="<tmpl_var name="MEMBER">" />
-			<input type="hidden" name="LOCALPART" value="<tmpl_var name="VALUE_LOCALPART">" />
-			<input type="hidden" name="DOMAIN" value="<tmpl_var name="VALUE_DOMAIN">" />
-			<input type="submit" value="<tmpl_var name="BUTTON_DELETE_MEMBER">" />
-		</form>
-	</td>
-</tr>
+<TMPL_LOOP NAME="MEMBERS">
+<fieldset>
+<legend><TMPL_VAR NAME="MEMBER"></legend>
+    <form method="post" action="prefs.pl">
+        <p><select name="right">
+            <option value="<TMPL_VAR NAME="ML_RIGHT_SUB_WAITING_FOR_REPLY">" <TMPL_IF EXPR="perm==ML_RIGHT_SUB_WAITING_FOR_REPLY">selected="selected"</TMPL_IF>><TMPL_I18N KEY="Waiting for confirmation"></option>
+            <option value="<TMPL_VAR NAME="ML_SUB_WAITING_FOR_VALIDATION">" <TMPL_IF EXPR="perm==ML_RIGHT_SUB_WAITING_FOR_VALIDATION">selected="selected"</TMPL_IF>><TMPL_I18N KEY="Waiting for validation"></option>
+            <option value="<TMPL_VAR NAME="ML_RIGHT_SUB">" <TMPL_IF EXPR="perm==ML_RIGHT_SUB">selected="selected"</TMPL_IF>><TMPL_I18N KEY="Subscribed"></option>
+            <option value="<TMPL_VAR NAME="ML_RIGHT_SUB_WAITING_FOR_DEL">" <TMPL_IF EXPR="perm==ML_RIGHT_SUB_WAITING_FOR_DEL">selected="selected"</TMPL_IF>> <TMPL_I18N KEY="Waiting for deletion"></option>
+            <option value="<TMPL_VAR NAME="ML_RIGHT_ADMIN">" <TMPL_IF EXPR="perm==ML_RIGHT_ADMIN">selected="selected"</TMPL_IF>> <TMPL_I18N KEY="Admin"></option>
+       	</select></p>
+        <input type="hidden" name="member" value="<tmpl_var name="MEMBER">" />
+        <input type="hidden" name="local" value="<tmpl_var name="LOCAL_PART">" />
+        <input type="hidden" name="domain" value="<tmpl_var name="DOMAIN">" />
+        <input type="submit" name="change_rights_submit" value="<TMPL_I18N KEY="Change rights">" />
+		<input type="submit" name="delete_submit" value="<TMPL_I18N KEY="Delete from list">" />
+	</form>
+</fieldset>
+</TMPL_LOOP>

Modified: trunk/vhffs-panel/templates/mailinglist/prefs.tmpl
===================================================================
--- trunk/vhffs-panel/templates/mailinglist/prefs.tmpl	2007-10-17 11:09:55 UTC (rev 1003)
+++ trunk/vhffs-panel/templates/mailinglist/prefs.tmpl	2007-10-18 06:15:43 UTC (rev 1004)
@@ -1,19 +1,15 @@
-<h1><tmpl_var name="TEXT_TITLE"> <tmpl_var name="VALUE_LIST"></h1>
-
-
-<form method="post" action="/mailinglist/save_options.pl">
-
+<form method="post" action="/mailinglist/prefs.pl">
 	<fieldset>
 		<legend>
 			<tmpl_var name="SUBTITLE_OPTIONS">
 		</legend>
 		<p>
 			<tmpl_var name="TEXT_PREFIX">
-			<input type="TEXT" size=20 name="PREFIX" value="<tmpl_var name="VALUE_PREFIX">"/>
+			<input type="text" size=20 name="prefix" value="<tmpl_var name="VALUE_PREFIX">"/>
 		</p>
 		<p>
 			<tmpl_var name="TEXT_SUBSCRIBE_CONTROL">
-			<select name="SUBSCRIBE_CONTROL" id="SUBSCRIBE_CONTROL">
+			<select name="subscribe_control" id="SUBSCRIBE_CONTROL">
 				<option value="<tmpl_var name="VALUE_SUBSCRIBE_NO_APPROVAL_REQUIRED">" <tmpl_var name="SELECTED_SUBSCRIBE_NO_APPROVAL_REQUIRED">>
 					<tmpl_var name="TEXT_SUBSCRIBE_NO_APPROVAL_REQUIRED">
 				</option>
@@ -27,7 +23,7 @@
 		</p>
 		<p>
 			<tmpl_var name="TEXT_POSTING_CONTROL">
-			<select name="POSTING_CONTROL" id="POSTING_CONTROL">
+			<select name="posting_control" id="POSTING_CONTROL">
 				<option value="<tmpl_var name="VALUE_POSTING_OPEN_ALL">" <tmpl_var name="SELECTED_POSTING_OPEN_ALL">>
 					<tmpl_var name="TEXT_POSTING_OPEN_ALL">
 				</option>
@@ -49,60 +45,45 @@
 			</select>
 		</p>
 		<p>
-			<input type="checkbox" name="OPENARCHIVE" id="OPENARCHIVE"  value="1" <tmpl_var name="CHECK_OPENARCHIVE"> />
-			<label for="OPENARCHIVE">
-				<tmpl_var name="TEXT_OPENARCHIVE">
+			<input type="checkbox" name="public_archive" id="public_archive"
+                <TMPL_IF NAME="PUBLIC_ARCHIVE">checked="checked" </TMPL_IF>class="labeled"/>
+			<label for="public_archive">
+				<TMPL_VAR NAME="TEXT_OPENARCHIVE">
 			</label>
 		</p>
 		<p>
-			<input type="checkbox" name="REPLYTO"  id="REPLYTO" value="1" <tmpl_var name="CHECK_REPLYTO"> />
-			<label for="REPLYTO">
+			<input type="checkbox" name="reply_to"  id="reply_to"
+              <TMPL_IF NAME="REPLY_TO">checked="checked" </TMPL_IF>class="labeled" />
+			<label for="reply_to">
 				<tmpl_var name="TEXT_REPLYTO">
 			</label>
 		</p>
-
-	</fieldset>
-	
-	<p class="button" id="buttonSubmitPref">
-		<input type="hidden" name="DOMAIN" value="<tmpl_var name="VALUE_DOMAIN">" />
-		<input type="hidden" name="LOCALPART" value="<tmpl_var name="VALUE_LOCALPART">" />
-		<input type="submit" value="<tmpl_var name="TEXT_SUBMIT_PREFS">"/>
+    <p><TMPL_I18N KEY="Signature"></p>
+    <p><textarea name="signature" rows="7" cols="50"><tmpl_var escape=HTML name="VALUE_SIGNATURE"></textarea></p>
+        <input type="hidden" name="domain" value="<tmpl_var name="VALUE_DOMAIN">" />
+		<input type="hidden" name="local" value="<tmpl_var name="VALUE_LOCALPART">" />
+		<input type="submit" name="options_submit" value="<tmpl_var name="TEXT_SUBMIT_PREFS">"/>
 	</p>
+    </fieldset>
 </form>
 
-<h2><tmpl_var name="TITLE_SIGNATURE"></h2>
-<form action="save_sig.pl" method="post">
-    <p><textarea name="signature" rows="7" cols="50"><tmpl_var name="VALUE_SIGNATURE"></textarea>
-    </p>
-    <input type="hidden" name="DOMAIN" value="<tmpl_var name="VALUE_DOMAIN">" />
-    <input type="hidden" name="LOCALPART" value="<tmpl_var name="VALUE_LOCALPART">" />
-    <input type="submit" value="<tmpl_var name="TEXT_SUBMIT_SIGNATURE">"/>
-</form>
-
 <h2><tmpl_var name="TITLE_MEMBERS"></h2>
 <h3><tmpl_var name="TITLE_LIST_MEMBERS"> (<tmpl_var name="HOWMANY_MEMBERS">)</h3>
 
-<table>
-	<tmpl_var name="LIST_MEMBERS">
-</table>
+<TMPL_INCLUDE NAME="list_part.tmpl">
 
 <h3><tmpl_var name="TITLE_ADD_MEMBERS"></h3>
 
-<form method="post" action="add_sub.pl">
+<form method="post" action="prefs.pl">
 
-	<div style="z-index: 666; position: absolute; visibility: hidden;">
+	<div style="display:none;">
 		<textarea name="projectmembers" id="projectmembers"><tmpl_var name="PROJECT_MEMBERS_LIST"></textarea>
 	</div>
 
-<script language="JavaScript"><!-- 
+<script type="text/javascript"><!-- 
 
 function fill_with_project_members() {
-  if (document.getElementById("fill_members").checked == true) {
-    document.getElementById("MEMBERS").value = document.getElementById("projectmembers").value;
-  }
-  else {
-    document.getElementById("MEMBERS").value = "";
-  };
+    document.getElementById("members").value = document.getElementById("projectmembers").value;
 };
 
 // --></script>
@@ -111,13 +92,15 @@
 		<label for="USERNAME">
 			<tmpl_var name="TEXT_ADD_MEMBERS">
 		</label>
-		<textarea name="MEMBERS" id="MEMBERS" rows="7" cols="50"></textarea>
+		<textarea name="members" id="members" rows="7" cols="50"></textarea>
 	</p>
 	<p class="button">
-		<input type="hidden" name="DOMAIN" value="<tmpl_var name="VALUE_DOMAIN">" />
-		<input type="hidden" name="LOCALPART" value="<tmpl_var name="VALUE_LOCALPART">" />
-		<input type="submit" value="<tmpl_var name="BUTTON_ADD_MEMBERS">" />
-		<input type="checkbox" name="fill_members" id="fill_members" value="yes" label="" onClick="javascript:fill_with_project_members();"> <tmpl_var name="FILL_MEMBERS_TEXT">
+		<input type="hidden" name="domain" value="<tmpl_var name="VALUE_DOMAIN">" />
+		<input type="hidden" name="local" value="<tmpl_var name="VALUE_LOCALPART">" />
+		<input type="submit" value="<tmpl_var name="BUTTON_ADD_MEMBERS">" name="add_members_submit" />
+		<input type="button" name="fill_members" id="fill_members" value="<TMPL_I18N KEY="Fill with project's members emails">" onclick="javascript:fill_with_project_members();"/>
+    </p>
+    <p>
 	</p>
 </form>
 


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