[vhffs-dev] [1686] alert.pl uses Template::Toolkit.

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


Revision: 1686
Author:   beuss
Date:     2011-05-01 17:15:05 +0200 (Sun, 01 May 2011)
Log Message:
-----------
alert.pl uses Template::Toolkit.

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

Added Paths:
-----------
    trunk/vhffs-panel/templates/misc/alert.tt

Removed Paths:
-------------
    trunk/vhffs-panel/templates/misc/alert.tmpl

Modified: trunk/vhffs-panel/alert.pl
===================================================================
--- trunk/vhffs-panel/alert.pl	2011-05-01 15:14:58 UTC (rev 1685)
+++ trunk/vhffs-panel/alert.pl	2011-05-01 15:15:05 UTC (rev 1686)
@@ -32,7 +32,6 @@
 use strict;
 use utf8;
 use POSIX qw(locale_h);
-use HTML::Template;
 use locale;
 use Locale::gettext;
 use CGI;
@@ -47,17 +46,4 @@
 my $session = $panel->get_session;
 exit 0 unless $session;
 
-my $vhffs = $panel->{'vhffs'};
-my $cgi = $panel->{'cgi'};
-my $templatedir = $panel->{'templatedir'};
-
-my $template = new HTML::Template( filename => $templatedir.'/panel/misc/alert.tmpl' );
-
-$template->param( TITLE => gettext('Warn the admin team') );
-$template->param( EXPLAIN => gettext('Here, you can send a message to the admin team') );
-$template->param( SUBJECT_TEXT => gettext('Subject') );
-$template->param( YOUR_MESSAGE_TEXT => gettext('Your message') );
-$template->param( SEND => gettext('Send') );
-
-$panel->build( $template );
-$panel->display;
+$panel->render('misc/alert.tt')

Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am	2011-05-01 15:14:58 UTC (rev 1685)
+++ trunk/vhffs-panel/templates/Makefile.am	2011-05-01 15:15:05 UTC (rev 1686)
@@ -97,7 +97,6 @@
 	main/main.tmpl \
 	menu/main.tmpl \
 	menu/user.tmpl \
-	misc/alert.tmpl \
 	misc/errors.tmpl \
 	misc/group_service.tmpl \
 	misc/history_part.tmpl \
@@ -146,6 +145,7 @@
 	menu/context.tt \
 	menu/group.tt \
 	menu/moderator.tt \
+	misc/alert.tt \
 	misc/closed.tt \
 	misc/errors.tt \
 	misc/header.tt \

Deleted: trunk/vhffs-panel/templates/misc/alert.tmpl
===================================================================
--- trunk/vhffs-panel/templates/misc/alert.tmpl	2011-05-01 15:14:58 UTC (rev 1685)
+++ trunk/vhffs-panel/templates/misc/alert.tmpl	2011-05-01 15:15:05 UTC (rev 1686)
@@ -1,25 +0,0 @@
-<h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
-
-<h2><TMPL_VAR ESCAPE=1 NAME="EXPLAIN"></h2>
-
-<form method="post" action="alert_submit.pl" accept-charset="utf-8">
-	<p>
-		<label for="MESSAGE" style="float:none">
-			<TMPL_VAR ESCAPE=1 NAME="SUBJECT_TEXT">:
-		</label>
-	</p>
-	<p>
-		<input type="text" name="SUBJECT" id="SUBJECT" size="90" value=""/>
-	</p>
-	<p>
-		<label for="MESSAGE" style="float:none">
-			<TMPL_VAR ESCAPE=1 NAME="YOUR_MESSAGE_TEXT">:
-		</label>
-    </p>
-    <p>
-		<textarea name="MESSAGE" id="MESSAGE" cols="90" rows="15" style="width:auto"></textarea>
-	</p>
-	<p class="button" id="sendButton">
-		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="SEND">" />
-	</p>
-</form>

Copied: trunk/vhffs-panel/templates/misc/alert.tt (from rev 1685, trunk/vhffs-panel/templates/misc/alert.tmpl)
===================================================================
--- trunk/vhffs-panel/templates/misc/alert.tt	                        (rev 0)
+++ trunk/vhffs-panel/templates/misc/alert.tt	2011-05-01 15:15:05 UTC (rev 1686)
@@ -0,0 +1,25 @@
+<h1>[% 'Warn the admin team ' | i18n | html %]</h1>
+
+<h2>[% 'Here, you can send a message to the admin team' | i18n | html %]</h2>
+
+<form method="post" action="alert_submit.pl" accept-charset="utf-8">
+	<p>
+		<label for="MESSAGE" style="float:none">
+            [% 'Subject:' | i18n | html %]
+		</label>
+	</p>
+	<p>
+		<input type="text" name="SUBJECT" id="SUBJECT" size="90" value=""/>
+	</p>
+	<p>
+		<label for="MESSAGE" style="float:none">
+			[% 'Your message:' | i18n | html %]
+		</label>
+    </p>
+    <p>
+		<textarea name="MESSAGE" id="MESSAGE" cols="90" rows="15" style="width:auto"></textarea>
+	</p>
+	<p class="button" id="sendButton">
+		<input type="submit" value="[% 'Send' | i18n | html %]" />
+	</p>
+</form>


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