[vhffs-dev] [1689] Lost password form uses Template::Toolkit.

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


Revision: 1689
Author:   beuss
Date:     2011-05-01 17:27:16 +0200 (Sun, 01 May 2011)
Log Message:
-----------
Lost password form uses Template::Toolkit.

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

Added Paths:
-----------
    trunk/vhffs-panel/templates/anonymous/lost-password.tt

Removed Paths:
-------------
    trunk/vhffs-panel/templates/main/lost.tmpl

Modified: trunk/vhffs-panel/lost.pl
===================================================================
--- trunk/vhffs-panel/lost.pl	2011-05-01 15:15:19 UTC (rev 1688)
+++ trunk/vhffs-panel/lost.pl	2011-05-01 15:27:16 UTC (rev 1689)
@@ -36,27 +36,11 @@
 use strict;
 use locale;
 use Locale::gettext;
-use HTML::Template;
 use CGI;
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::Panel::Main;
 
-
 my $panel = new Vhffs::Panel::Main();
 exit 0 unless $panel;
 
-my $vhffs = $panel->{'vhffs'};
-my $templatedir = $panel->{'templatedir'};
-my $cgi = $panel->{'cgi'};
-
-my $template = new HTML::Template( filename => $templatedir.'/panel/main/lost.tmpl', associate => $cgi );
-
-#$template->param( TITLE => gettext('VHFFS Password Lost') );
-$template->param( TEXT_LOSTPASS => gettext('You lost your password? You\'re a bad guy!') );
-$template->param( TEXT_BLABLA => gettext('But fortunately we\'re smart, so just type your login here<br/>and a new password will be sent to you by email!') );
-$template->param( TEXT_USERNAME => gettext('Username') );
-$template->param( TEXT_BUTTON => gettext('Give me a new password') );
-$template->param( TEXT_BACK => gettext('Back to login page') );
-
-$panel->light( $template );
-$panel->display;
+$panel->render('anonymous/lost-password.tt', undef, 'anonymous.tt');

Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am	2011-05-01 15:15:19 UTC (rev 1688)
+++ trunk/vhffs-panel/templates/Makefile.am	2011-05-01 15:27:16 UTC (rev 1689)
@@ -92,7 +92,6 @@
 	menu/context-modo.tmpl \
 	main/lost_failed.tmpl \
 	main/lost_ok.tmpl \
-	main/lost.tmpl \
 	main/panel.tmpl \
 	main/main.tmpl \
 	menu/main.tmpl \
@@ -137,6 +136,7 @@
 	cron/prefs.tmpl \
 	anonymous/account_created.tt \
 	anonymous/login.tt \
+	anonymous/lost-password.tt \
 	anonymous/subscribe.tt \
 	layouts/anonymous.tt \
 	layouts/panel.tt \

Added: trunk/vhffs-panel/templates/anonymous/lost-password.tt
===================================================================
--- trunk/vhffs-panel/templates/anonymous/lost-password.tt	                        (rev 0)
+++ trunk/vhffs-panel/templates/anonymous/lost-password.tt	2011-05-01 15:27:16 UTC (rev 1689)
@@ -0,0 +1,25 @@
+<div class="logo">
+</div>
+
+<div class="misc" id="misc">
+		
+<h1>[% 'You lost your password? You\'re a bad guy!' | i18n | html %]</h1>
+
+<form action="/lost_ack.pl" method="post" accept-charset="utf-8">
+<h2>[% 'But fortunately we\'re smart, so just type your login here<br/>and a new password will be sent to you by email!' | i18n | html %]</h2>
+<p>
+	<label for="username">
+        [% 'Username:' | i18n | html %]
+	</label>
+	<input type="text" name="username" id="username" maxlength="32"/>
+</p>
+<p class="button">
+	<input type="submit" value="[% 'Give me a new password!' | i18n | html %]" />
+</p>
+</form>
+
+<p>
+	<a href="/auth.pl">[% 'Back to login page' | i18n | html %]</a>
+</p>
+
+</div>

Deleted: trunk/vhffs-panel/templates/main/lost.tmpl
===================================================================
--- trunk/vhffs-panel/templates/main/lost.tmpl	2011-05-01 15:15:19 UTC (rev 1688)
+++ trunk/vhffs-panel/templates/main/lost.tmpl	2011-05-01 15:27:16 UTC (rev 1689)
@@ -1,25 +0,0 @@
-<div class="logo">
-</div>
-
-<div class="misc" id="misc">
-		
-<h1><TMPL_VAR ESCAPE=1 NAME="TEXT_LOSTPASS"></h1>
-
-<form action="/lost_ack.pl" method="post" accept-charset="utf-8">
-<h2><TMPL_VAR NAME="TEXT_BLABLA"></h2>
-<p>
-	<label for="username">
-	<TMPL_VAR ESCAPE=1 NAME="TEXT_USERNAME">
-	</label>
-	<input type="text" name="username" id="username" maxlength="32"/>
-</p>
-<p class="button">
-	<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_BUTTON">" />
-</p>
-</form>
-
-<p>
-	<a href="/auth.pl"><TMPL_VAR ESCAPE=1 NAME="TEXT_BACK"></a>
-</p>
-
-</div>


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