[vhffs-dev] [1763] No more HTML::Toolkit in mailinglists/prefs.pl

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


Revision: 1763
Author:   beuss
Date:     2011-05-17 13:22:43 +0200 (Tue, 17 May 2011)
Log Message:
-----------
No more HTML::Toolkit in mailinglists/prefs.pl

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm
    trunk/vhffs-panel/Makefile.am
    trunk/vhffs-panel/mailinglist/prefs.pl
    trunk/vhffs-panel/templates/Makefile.am

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

Removed Paths:
-------------
    trunk/vhffs-panel/templates/mailinglist/list_part.tmpl
    trunk/vhffs-panel/templates/mailinglist/prefs.tmpl

Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-05-17 11:22:35 UTC (rev 1762)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-05-17 11:22:43 UTC (rev 1763)
@@ -618,6 +618,22 @@
                 MODIFY                      => Vhffs::Constants::ACL_MODIFY,
                 MANAGEACL                   => Vhffs::Constants::ACL_MANAGEACL,
                 DELETE                      => Vhffs::Constants::ACL_DELETE
+            },
+            mailinglist => {
+                SUBSCRIBE_NO_APPROVAL_REQUIRED          => Vhffs::Constants::ML_SUBSCRIBE_NO_APPROVAL_REQUIRED,
+                SUBSCRIBE_APPROVAL_REQUIRED             => Vhffs::Constants::ML_SUBSCRIBE_APPROVAL_REQUIRED,
+                SUBSCRIBE_CLOSED                        => Vhffs::Constants::ML_SUBSCRIBE_CLOSED,
+                POSTING_OPEN_ALL                        => Vhffs::Constants::ML_POSTING_OPEN_ALL,
+                POSTING_MODERATED_ALL                   => Vhffs::Constants::ML_POSTING_MODERATED_ALL,
+                POSTING_OPEN_MEMBERS_MODERATED_OTHERS   => Vhffs::Constants::ML_POSTING_OPEN_MEMBERS_MODERATED_OTHERS,
+                POSTING_MEMBERS_ONLY                    => Vhffs::Constants::ML_POSTING_MEMBERS_ONLY,
+                POSTING_MEMBERS_ONLY_MODERATED          => Vhffs::Constants::ML_POSTING_MEMBERS_ONLY_MODERATED,
+                POSTING_ADMINS_ONLY                     => Vhffs::Constants::ML_POSTING_ADMINS_ONLY,
+                RIGHT_SUB_WAITING_FOR_REPLY             => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY,
+                RIGHT_SUB_WAITING_FOR_VALIDATION        => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_VALIDATION,
+                RIGHT_SUB                               => Vhffs::Constants::ML_RIGHT_SUB,
+                RIGHT_SUB_WAITING_FOR_DEL               => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL,
+                RIGHT_ADMIN                             => Vhffs::Constants::ML_RIGHT_ADMIN
             }
         },
 		FILTERS => {

Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am	2011-05-17 11:22:35 UTC (rev 1762)
+++ trunk/vhffs-panel/Makefile.am	2011-05-17 11:22:43 UTC (rev 1763)
@@ -889,7 +889,6 @@
 	mail/index.pl \
 	mail/prefs.pl \
 	mailinglist/create.pl \
-	mailinglist/delete.pl \
 	mailinglist/index.pl \
 	mailinglist/prefs.pl \
 	mysql/create.pl \

Modified: trunk/vhffs-panel/mailinglist/prefs.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/prefs.pl	2011-05-17 11:22:35 UTC (rev 1762)
+++ trunk/vhffs-panel/mailinglist/prefs.pl	2011-05-17 11:22:43 UTC (rev 1763)
@@ -33,7 +33,6 @@
 use strict;
 use utf8;
 use POSIX qw(locale_h);
-use HTML::Template;
 use locale;
 use Locale::gettext;
 use CGI;
@@ -41,15 +40,9 @@
 use Encode;
 
 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::Template;
-use Vhffs::Panel::Object;
 use Vhffs::Services::MailingList;
-use Vhffs::Acl;
 use Vhffs::Constants;
 
 my $panel = new Vhffs::Panel::Main();
@@ -60,14 +53,11 @@
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
 my $cgi = $panel->{'cgi'};
-my $templatedir = $panel->{'templatedir'};
 
 my $domain = $cgi->param("domain");
 my $lpart = $cgi->param("local");
 my $name = $cgi->param("name");
 
-my $template;
-
 #defined name in CGI overwrite lpart and domain cgi
 if( defined $name ) {
 	( $lpart , $domain ) =  ( $name =~ /(.+)\@(.+)/ );
@@ -76,11 +66,9 @@
 my $list = Vhffs::Services::MailingList::get_by_mladdress( $vhffs , $lpart , $domain );
 
 unless( defined $list ) {
-	$template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
-	$template->param( MESSAGE => sprintf( gettext('Mailing list %s@%s not found'), $lpart, $domain) );
+    $panel->render('misc/message.tt', { message => sprintf( gettext('Mailing list %s@%s not found'), $lpart, $domain) } );
 } elsif( !$user->can_view( $list ) ) {
-	$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' ) );
+    $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 {
     if(defined $cgi->param('options_submit')) {
         update_ml_options();
@@ -92,109 +80,19 @@
         add_members();
     }
     
-	$template = new Vhffs::Panel::Template( filename => $templatedir."/panel/mailinglist/prefs.tmpl",
-        die_on_bad_params => 0, global_var => 1);
+    my $vars = {
+        list => $list
+    };
 
+	my $group = Vhffs::Group::get_by_gid( $vhffs , $list->get_owner_gid );
+    $vars->{group_emails} = join("\n", map { $_->{mail} } @{$group->get_users});
+
     $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 );
-	
-	$template->param( SUBTITLE_OPTIONS => gettext("Options") );
-	$template->param( TEXT_SUBSCRIBE_CONTROL => gettext("Subscribe control:") );
-	$template->param( TEXT_SUBSCRIBE_NO_APPROVAL_REQUIRED => gettext("Open, no approval required") );
-	$template->param( TEXT_SUBSCRIBE_APPROVAL_REQUIRED => gettext("Open, approval required") );
-	$template->param( TEXT_SUBSCRIBE_CLOSED => gettext("Closed") );
-	$template->param( TEXT_POSTING_CONTROL => gettext("Posting control:") );
-	$template->param( TEXT_POSTING_OPEN_ALL => gettext("Open for everyone") );
-	$template->param( TEXT_POSTING_MODERATED_ALL => gettext("Moderated for everyone") );
-	$template->param( TEXT_POSTING_OPEN_MEMBERS_MODERATED_OTHERS => gettext("Open for members, moderated for non-members") );
-	$template->param( TEXT_POSTING_MEMBERS_ONLY => gettext("Members only") );
-	$template->param( TEXT_POSTING_MEMBERS_ONLY_MODERATED => gettext("Members only and moderated") );
-	$template->param( TEXT_POSTING_ADMINS_ONLY => gettext("Admins only") );
-	$template->param( VALUE_SUBSCRIBE_NO_APPROVAL_REQUIRED => Vhffs::Constants::ML_SUBSCRIBE_NO_APPROVAL_REQUIRED );
-	$template->param( VALUE_SUBSCRIBE_APPROVAL_REQUIRED => Vhffs::Constants::ML_SUBSCRIBE_APPROVAL_REQUIRED );
-	$template->param( VALUE_SUBSCRIBE_CLOSED => Vhffs::Constants::ML_SUBSCRIBE_CLOSED );
-	$template->param( VALUE_POSTING_OPEN_ALL => Vhffs::Constants::ML_POSTING_OPEN_ALL );
-	$template->param( VALUE_POSTING_MODERATED_ALL => Vhffs::Constants::ML_POSTING_MODERATED_ALL );
-	$template->param( VALUE_POSTING_OPEN_MEMBERS_MODERATED_OTHERS => Vhffs::Constants::ML_POSTING_OPEN_MEMBERS_MODERATED_OTHERS );
-	$template->param( VALUE_POSTING_MEMBERS_ONLY => Vhffs::Constants::ML_POSTING_MEMBERS_ONLY );
-	$template->param( VALUE_POSTING_MEMBERS_ONLY_MODERATED => Vhffs::Constants::ML_POSTING_MEMBERS_ONLY_MODERATED );
-	$template->param( VALUE_POSTING_ADMINS_ONLY => Vhffs::Constants::ML_POSTING_ADMINS_ONLY );
-	$template->param( SELECTED_SUBSCRIBE_NO_APPROVAL_REQUIRED => "selected" ) if( $list->{sub_ctrl} == Vhffs::Constants::ML_SUBSCRIBE_NO_APPROVAL_REQUIRED );
-	$template->param( SELECTED_SUBSCRIBE_APPROVAL_REQUIRED => "selected" ) if( $list->{sub_ctrl} == Vhffs::Constants::ML_SUBSCRIBE_APPROVAL_REQUIRED );
-	$template->param( SELECTED_SUBSCRIBE_CLOSED => "selected" ) if( $list->{sub_ctrl} == Vhffs::Constants::ML_SUBSCRIBE_CLOSED );
-	$template->param( SELECTED_POSTING_OPEN_ALL => "selected" ) if( $list->{post_ctrl} == Vhffs::Constants::ML_POSTING_OPEN_ALL );
-	$template->param( SELECTED_POSTING_MODERATED_ALL => "selected" ) if( $list->{post_ctrl} == Vhffs::Constants::ML_POSTING_MODERATED_ALL );
-	$template->param( SELECTED_POSTING_OPEN_MEMBERS_MODERATED_OTHERS => "selected" ) if( $list->{post_ctrl} == Vhffs::Constants::ML_POSTING_OPEN_MEMBERS_MODERATED_OTHERS );
-	$template->param( SELECTED_POSTING_MEMBERS_ONLY => "selected" ) if( $list->{post_ctrl} == Vhffs::Constants::ML_POSTING_MEMBERS_ONLY );
-	$template->param( SELECTED_POSTING_MEMBERS_ONLY_MODERATED => "selected" ) if( $list->{post_ctrl} == Vhffs::Constants::ML_POSTING_MEMBERS_ONLY_MODERATED );
-	$template->param( SELECTED_POSTING_ADMINS_ONLY => "selected" ) if( $list->{post_ctrl} == Vhffs::Constants::ML_POSTING_ADMINS_ONLY );
+    $panel->render('mailinglist/prefs.tt', $vars);
 
-	$template->param( TEXT_OPENARCHIVE => gettext("Public archives") );
-	$template->param( TEXT_REPLYTO => gettext("Reply to: on list") );
-	$template->param( TEXT_PREFIX  => gettext("Prefix on subject") );
-	$template->param( VALUE_PREFIX  => $list->get_prefix );
-
-	$template->param( TEXT_SUBMIT_PREFS => gettext("Save options") );
-
-	$template->param( VALUE_SIGNATURE => $list->get_signature );
-	$template->param( TEXT_SUBMIT_SIGNATURE => gettext("Update signature") );
-	
-	$template->param( TITLE_MEMBERS => gettext("Manage members") );
-	$template->param( TITLE_LIST_MEMBERS => gettext("List all members") );
-	$template->param( TITLE_ADD_MEMBERS => gettext("Add members") );
-	$template->param( TEXT_ADD_MEMBERS => gettext("Addresses (one per line)") );
-	$template->param( BUTTON_ADD_MEMBERS => gettext("Add them !") );
-
-	my $emaillist = '';
-	my $group = Vhffs::Group::get_by_gid( $vhffs , $list->get_owner_gid );
-	if( defined $group )  {
-		foreach ( @{$group->get_users} )  {
-			$emaillist .= $_->{'mail'}."\n";
-		}
-	}
-	$template->param( PROJECT_MEMBERS_LIST => $emaillist );
-	$template->param( PUBLIC_ARCHIVE => $list->get_open_archive == 1 );
-	$template->param( REPLY_TO => $list->get_replyto == 1 );
-
-	my @subs = values(%{$list->get_members});
-    
-    $template->param( LOCAL_PART => $list->get_localpart );
-    $template->param( DOMAIN => $list->get_domain );
-
-    $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( HOWMANY_MEMBERS => scalar(@subs) );
-
-    $template->param( TEXT_DELETE_LIST => gettext("Delete this list") );
-    $template->param( TEXT_BEFORE_DELETE => gettext("This action is non-reversible. This mailing list 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." );
-    $template->param( ADMIN_ACL => "Ok, go to ACL admin" );
-
-	my $adminpart = Vhffs::Panel::Object::admin_part( $panel, $list );
-	$template->param( ADMIN_PART => $adminpart->output ) if( defined $adminpart );
 }
 
-$panel->build( $template );
-$panel->display;
-
-
 sub update_ml_options {
     my $prefix = Encode::decode_utf8( $cgi->param('prefix') );
     my $sub_ctrl = $cgi->param('subscribe_control');

Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am	2011-05-17 11:22:35 UTC (rev 1762)
+++ trunk/vhffs-panel/templates/Makefile.am	2011-05-17 11:22:43 UTC (rev 1763)
@@ -69,8 +69,6 @@
 	dns/list_txt_sub.tmpl \
 	dns/prefs.tmpl \
 	mail/create.tmpl \
-	mailinglist/list_part.tmpl \
-	mailinglist/prefs.tmpl \
 	mail/prefs_boxes.tmpl \
 	mail/prefs_forwards.tmpl \
 	mail/prefs.tmpl \
@@ -110,6 +108,7 @@
 	layouts/anonymous.tt \
 	layouts/panel.tt \
 	mailinglist/create.tt \
+	mailinglist/prefs.tt \
 	menu/admin.tt \
 	menu/context.tt \
 	menu/group.tt \

Deleted: trunk/vhffs-panel/templates/mailinglist/list_part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/mailinglist/list_part.tmpl	2011-05-17 11:22:35 UTC (rev 1762)
+++ trunk/vhffs-panel/templates/mailinglist/list_part.tmpl	2011-05-17 11:22:43 UTC (rev 1763)
@@ -1,19 +0,0 @@
-<TMPL_LOOP NAME="MEMBERS">
-<fieldset>
-<legend><TMPL_VAR ESCAPE=1 NAME="MEMBER"></legend>
-    <form method="post" action="prefs.pl" accept-charset="utf-8">
-        <p><select name="right">
-            <option value="<TMPL_VAR ESCAPE=1 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 ESCAPE=1 NAME="ML_RIGHT_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 ESCAPE=1 NAME="ML_RIGHT_SUB">" <TMPL_IF EXPR="perm==ML_RIGHT_SUB">selected="selected"</TMPL_IF>><TMPL_I18N KEY="Subscribed"></option>
-            <option value="<TMPL_VAR ESCAPE=1 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 ESCAPE=1 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 ESCAPE=1 NAME="MEMBER">" />
-        <input type="hidden" name="local" value="<TMPL_VAR ESCAPE=1 NAME="LOCAL_PART">" />
-        <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 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>

Deleted: trunk/vhffs-panel/templates/mailinglist/prefs.tmpl
===================================================================
--- trunk/vhffs-panel/templates/mailinglist/prefs.tmpl	2011-05-17 11:22:35 UTC (rev 1762)
+++ trunk/vhffs-panel/templates/mailinglist/prefs.tmpl	2011-05-17 11:22:43 UTC (rev 1763)
@@ -1,150 +0,0 @@
-<form method="post" action="/mailinglist/prefs.pl" accept-charset="utf-8">
-	<fieldset>
-		<legend>
-			<TMPL_VAR ESCAPE=1 NAME="SUBTITLE_OPTIONS">
-		</legend>
-		<p>
-			<TMPL_VAR ESCAPE=1 NAME="TEXT_PREFIX">
-			<input type="text" size=20 name="prefix" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_PREFIX">"/>
-		</p>
-		<p>
-			<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBSCRIBE_CONTROL">
-			<select name="subscribe_control" id="SUBSCRIBE_CONTROL">
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_SUBSCRIBE_NO_APPROVAL_REQUIRED">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_SUBSCRIBE_NO_APPROVAL_REQUIRED">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBSCRIBE_NO_APPROVAL_REQUIRED">
-				</option>
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_SUBSCRIBE_APPROVAL_REQUIRED">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_SUBSCRIBE_APPROVAL_REQUIRED">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBSCRIBE_APPROVAL_REQUIRED">
-				</option>
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_SUBSCRIBE_CLOSED">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_SUBSCRIBE_CLOSED">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBSCRIBE_CLOSED">
-				</option>
-			</select>
-		</p>
-		<p>
-			<TMPL_VAR ESCAPE=1 NAME="TEXT_POSTING_CONTROL">
-			<select name="posting_control" id="POSTING_CONTROL">
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_POSTING_OPEN_ALL">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_POSTING_OPEN_ALL">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_POSTING_OPEN_ALL">
-				</option>
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_POSTING_MODERATED_ALL">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_POSTING_MODERATED_ALL">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_POSTING_MODERATED_ALL">
-				</option>
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_POSTING_OPEN_MEMBERS_MODERATED_OTHERS">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_POSTING_OPEN_MEMBERS_MODERATED_OTHERS">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_POSTING_OPEN_MEMBERS_MODERATED_OTHERS">
-				</option>
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_POSTING_MEMBERS_ONLY">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_POSTING_MEMBERS_ONLY">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_POSTING_MEMBERS_ONLY">					
-				</option>
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_POSTING_MEMBERS_ONLY_MODERATED">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_POSTING_MEMBERS_ONLY_MODERATED">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_POSTING_MEMBERS_ONLY_MODERATED">
-				</option>
-				<option value="<TMPL_VAR ESCAPE=1 NAME="VALUE_POSTING_ADMINS_ONLY">" <TMPL_VAR ESCAPE=1 NAME="SELECTED_POSTING_ADMINS_ONLY">>
-					<TMPL_VAR ESCAPE=1 NAME="TEXT_POSTING_ADMINS_ONLY">
-				</option>
-			</select>
-		</p>
-		<p>
-			<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 ESCAPE=1 NAME="TEXT_OPENARCHIVE">
-			</label>
-		</p>
-		<p>
-			<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 ESCAPE=1 NAME="TEXT_REPLYTO">
-			</label>
-		</p>
-    <p><TMPL_I18N KEY="Signature"></p>
-    <p><textarea name="signature" rows="7" cols="50"><TMPL_VAR ESCAPE=1 NAME="VALUE_SIGNATURE"></textarea></p>
-        <input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_DOMAIN">" />
-		<input type="hidden" name="local" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_LOCALPART">" />
-		<input type="submit" name="options_submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT_PREFS">"/>
-	</p>
-    </fieldset>
-</form>
-
-<h2><TMPL_VAR ESCAPE=1 NAME="TITLE_MEMBERS"></h2>
-<h3><TMPL_VAR ESCAPE=1 NAME="TITLE_LIST_MEMBERS"> (<TMPL_VAR ESCAPE=1 NAME="HOWMANY_MEMBERS">)</h3>
-
-<TMPL_INCLUDE NAME="list_part.tmpl">
-
-<h3><TMPL_VAR ESCAPE=1 NAME="TITLE_ADD_MEMBERS"></h3>
-
-<form method="post" action="prefs.pl" accept-charset="utf-8">
-
-	<div style="display:none;">
-		<textarea name="projectmembers" id="projectmembers"><TMPL_VAR ESCAPE=1 NAME="PROJECT_MEMBERS_LIST"></textarea>
-	</div>
-
-<script type="text/javascript"><!-- 
-
-function fill_with_project_members() {
-    document.getElementById("members").value = document.getElementById("projectmembers").value;
-};
-
-// --></script>
-
-	<p>
-		<label for="USERNAME">
-			<TMPL_VAR ESCAPE=1 NAME="TEXT_ADD_MEMBERS">
-		</label>
-		<textarea name="members" id="members" rows="7" cols="50"></textarea>
-	</p>
-	<p class="button">
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_DOMAIN">" />
-		<input type="hidden" name="local" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_LOCALPART">" />
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 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>
-
-<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_LIST"></h2>
-
-<form method="post" action="delete.pl" accept-charset="utf-8">
-	<fieldset class="delete">
-		<legend>
-			<TMPL_VAR ESCAPE=1 NAME="ASK_DELETE_WEB">:
-		</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" id="buttonDelete">
-		<input type="hidden" name="local" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_LOCALPART">" />
-		<input type="hidden" name="domain" value="<TMPL_VAR ESCAPE=1 NAME="VALUE_DOMAIN">" />
-		<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/mailinglist/prefs.tt
===================================================================
--- trunk/vhffs-panel/templates/mailinglist/prefs.tt	                        (rev 0)
+++ trunk/vhffs-panel/templates/mailinglist/prefs.tt	2011-05-17 11:22:43 UTC (rev 1763)
@@ -0,0 +1,127 @@
+<form method="post" action="/mailinglist/prefs.pl" accept-charset="utf-8">
+	<fieldset>
+		<legend>[% 'Options' | i18n | html %]</legend>
+		<p>[% 'Prefix on subject:' | i18n | html %]
+			<input type="text" size=20 name="prefix" value="[% list.get_prefix %]"/>
+		</p>
+		<p>[% 'Subscribe control:' | i18n | html %]
+			<select name="subscribe_control" id="SUBSCRIBE_CONTROL">
+				<option value="[% constants.mailinglist.SUBSCRIBE_NO_APPROVAL_REQUIRED %]"[% ' selected="selected"' IF list.sub_ctrl == constants.mailinglist.SUBSCRIBE_NO_APPROVAL_REQUIRED %]>
+					[% 'Open, no approval required' | i18n | html %]
+				</option>
+				<option value="[% constants.mailinglist.SUBSCRIBE_APPROVAL_REQUIRED %]"[% ' selected="selected"' IF list.sub_ctrl == constants.mailinglist.SUBSCRIBE_APPROVAL_REQUIRED %]>
+                    [% 'Open, approval required' | i18n | html %]
+				</option>
+				<option value="[% constants.mailinglist.SUBSCRIBE_CLOSED %]"[% ' selected="selected"' IF list.sub_ctrl == constants.mailinglist.SUBSCRIBE_CLOSED %]>
+                    [% 'Closed' | i18n | html %]
+				</option>
+			</select>
+		</p>
+		<p>[% 'Posting control:' | i18n | html %]
+			<select name="posting_control" id="POSTING_CONTROL">
+				<option value="[% constants.mailinglist.POSTING_OPEN_ALL %]"[% ' selected="selected"' IF list.post_ctrl == constants.mailinglist.POSTING_OPEN_ALL %]>
+                    [% 'Open for everyone' | i18n | html %]
+				</option>
+				<option value="[% constants.mailinglist.POSTING_MODERATED_ALL %]"[% ' selected="selected"' IF list.post_ctrl == constants.mailinglist.POSTING_MODERATED_ALL %]>
+                    [% 'Moderated for everyone' | i18n | html %]
+				</option>
+				<option value="[% constants.mailinglist.POSTING_OPEN_MEMBERS_MODERATED_OTHERS %]"[% ' selected="selected"' IF list.post_ctrl == constants.mailinglist.POSTING_OPEN_MEMBERS_MODERATED_OTHERS %]>
+                    [% 'Open for members, moderated for non-members' | i18n | html %]
+				</option>
+				<option value="[% constants.mailinglist.POSTING_MEMBERS_ONLY %]"[% ' selected="selected"' IF list.post_ctrl == constants.mailinglist.POSTING_MEMBERS_ONLY %]>
+                    [% 'Members only' | i18n | html %]
+				</option>
+				<option value="[% constants.mailinglist.POSTING_MEMBERS_ONLY_MODERATED %]"[% ' selected="selected"' IF list.post_ctrl == constants.mailinglist.POSTING_MEMBERS_ONLY_MODERATED %]>
+                    [% 'Members only, moderated' | i18n | html %]
+				</option>
+				<option value="[% constants.mailinglist.POSTING_ADMINS_ONLY %]"[% ' selected="selected"' IF list.post_ctrl == constants.mailinglist.POSTING_ADMINS_ONLY %]>
+                    [% 'Admins only' | i18n | html %]
+				</option>
+			</select>
+		</p>
+		<p>
+			<input type="checkbox" name="public_archive" id="public_archive"[% ' checked="checked"' IF list.get_open_archive %] class="labeled"/>
+			<label for="public_archive">[% 'Public archives' | i18n | html %]</label>
+		</p>
+		<p>
+			<input type="checkbox" name="reply_to"  id="reply_to"[% ' checked="checked"' IF list.get_replyto %] class="labeled"/>
+			<label for="reply_to">[% 'Add "Reply-To" header:' | i18n | html %]</label>
+		</p>
+    <p>[% 'Signature:' | i18n | html %]</p>
+    <p><textarea name="signature" rows="7" cols="50">[% list.get_signature | html %]</textarea></p>
+        <input type="hidden" name="domain" value="[% list.get_domain | html %]" />
+		<input type="hidden" name="local" value="[% list.get_localpart | html %]" />
+		<input type="submit" name="options_submit" value="[% 'Save options' | i18n | html %]"/>
+	</p>
+    </fieldset>
+</form>
+
+<h2>[% 'Manage members' | i18n | html %]</h2>
+<h3>[% 'Current members' | i18n | html %] ([% list.get_members.size() %])</h3>
+
+[% FOREACH m IN list.get_members.values() %]
+<fieldset>
+<legend>[% m.member | html %]</legend>
+    <form method="post" action="prefs.pl" accept-charset="utf-8">
+        <p><select name="right">
+            <option value="[% constants.mailinglist.RIGHT_SUB_WAITING_FOR_REPLY %]"[% ' selected="selected"' IF m.perm == constants.mailinglist.RIGHT_SUB_WAITING_FOR_REPLY %]>
+                [% 'Waiting for confirmation' | i18n | html %]</option>
+            <option value="[% constants.mailinglist.RIGHT_SUB_WAITING_FOR_VALIDATION %]"[% ' selected="selected"' IF m.perm == constants.mailinglist.RIGHT_SUB_WAITING_FOR_VALIDATION %]>
+                [% 'Waiting for approval' | i18n | html %]</option>
+            <option value="[% constants.mailinglist.RIGHT_SUB %]"[% ' selected="selected"' IF m.perm == constants.mailinglist.RIGHT_SUB %]>
+                [% 'Member' | i18n | html %]</option>
+            <option value="[% constants.mailinglist.RIGHT_SUB_WAITING_FOR_DEL %]"[% ' selected="selected"' IF m.perm == constants.mailinglist.RIGHT_SUB_WAITING_FOR_DEL %]>
+                [% 'Waiting for deletion' | i18n | html %]</option>
+            <option value="[% constants.mailinglist.RIGHT_ADMIN %]"[% ' selected="selected"' IF m.perm == constants.mailinglist.RIGHT_ADMIN %]>
+                [% 'Admin' | i18n | html %]</option>
+       	</select></p>
+        <input type="hidden" name="member" value="[% m.member | html  %]" />
+        <input type="hidden" name="local" value="[% list.get_localpart | html %]" />
+        <input type="hidden" name="domain" value="[% list.get_domain | html %]" />
+        <input type="submit" name="change_rights_submit" value="[% 'Update permissions' | i18n | html %]" />
+		<input type="submit" name="delete_submit" value="[% 'Delete from list' | i18n | html %]" />
+	</form>
+</fieldset>
+[% END %]
+
+<h3>[% 'Add members' | i18n | html %]</h3>
+
+<form method="post" action="prefs.pl" accept-charset="utf-8">
+	<div style="display:none;">
+		<textarea name="projectmembers" id="projectmembers">[% group_emails | html %]</textarea>
+	</div>
+
+<script type="text/javascript"><!-- 
+
+function fill_with_project_members() {
+    document.getElementById("members").value = document.getElementById("projectmembers").value;
+};
+
+// --></script>
+
+	<p>
+		<label for="members">[% 'Addresses (one per line):' | i18n | html %]</label>
+		<textarea name="members" id="members" rows="7" cols="50"></textarea>
+	</p>
+	<p class="button">
+		<input type="hidden" name="domain" value="[% list.get_domain | html %]" />
+		<input type="hidden" name="local" value="[% list.get_localpart | html %]" />
+		<input type="submit" value="[% 'Add them!' | i18n | html %]" name="add_members_submit" />
+		<input type="button" name="fill_members" id="fill_members" value="[% 'Fill with project\'s members emails' | i18n | html %]" onclick="javascript:fill_with_project_members();"/>
+    </p>
+    <p>
+	</p>
+</form>
+
+[% INCLUDE 'acl/form.tt' 
+    object = list %]
+
+[% INCLUDE 'object/delete.tt'
+    type = 'mailinglist'
+    oid = list.get_oid %]
+
+[% IF current_user.is_admin %]
+    [% INCLUDE 'admin/object/edit.tt' 
+        object = list %]
+[% END %]
+


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