[vhffs-dev] Patch pour l'inscription

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


Salut,
voici un patch qui permet d'éviter d'avoir une page intermédiaire
lorsque l'inscritpion se déroule mal :
avant lorsqu'il y avait une erreur, l'utilisateur devait cliquer sur un
lien puis reremplir tout le formulaire
Maintenant, les erreurs s'affichent directement sur le formulaire et les
champs sont préremplis
subscribe_complete.pl disparait et subscribe contient maintenant tout se
qu'il faut (plus simple pour le préremplissage)
Dites-moi s'il y a des trucs à changer
Beuss
PJ : le patch (y a des choses où seule l'indentation a changé
apparemment)...
Index: vhffs-panel/subscribe_complete.pl
===================================================================
--- vhffs-panel/subscribe_complete.pl	(révision 226)
+++ vhffs-panel/subscribe_complete.pl	(copie de travail)
@@ -1,251 +0,0 @@
-#!/usr/bin/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 CGI;
-use locale;
-use Locale::gettext;
-use HTML::Template;
-
-use Vhffs::User;
-use Vhffs::Main;
-use Vhffs::Functions;
-use Vhffs::Constants;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Confirmation;
-
-#Get some basics informations with CGI
-my $cgi;
-my $uid;
-my $good_news;
-my $bad_news;
-my $vhffs;
-my $templatedir;
-my $cid;
-my $realcode;
-my $code;
-
-$cgi = new CGI;
-
-#Initialize vars
-$bad_news = "";
-$good_news = "";
-
-#Init the Vhffs Main System
-$vhffs = init Vhffs::Main;
-$templatedir = $vhffs->get_config->get_templatedir;
-
-Vhffs::Panel::Main::check( $vhffs );
-Vhffs::Panel::Main::cook_lang( $vhffs );
-
-
-$mail 		= $cgi->param( "MAIL" );
-$username 	= $cgi->param( "USERNAME" );
-$firstname 	= $cgi->param( "FIRSTNAME");
-$lastname 	= $cgi->param( "LASTNAME" );
-$city 		= $cgi->param("CITY");
-$zipcode 	= $cgi->param("ZIPCODE");
-$country 	= $cgi->param("COUNTRY");
-$address 	= $cgi->param("ADDRESS");
-$cid 		= $cgi->param("CID");
-$code 		= $cgi->param("CONFIRMATION");
-$realcode	= Vhffs::Panel::Confirmation::get_code( $vhffs , $cid );
-
-my $template;
-my $message;
-
-if( $vhffs->get_config->get_allow_subscribe == 0 )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You cannot subscribe to VHFFS");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ( ! defined $cid ) || ( ! defined $code ) || ( $code ne $realcode ) )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$template->param( TEXT_CREATEFAILED => gettext("Codes do not match") );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! defined $username )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare your username");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ( length ( $username ) < 3 ) || ( length ( $username ) > 12 ) )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("Username must contain between 3 and 12 characters");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! defined $country )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare your country");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! defined $city )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare your city");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! defined $zipcode )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare your zipcode");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! defined $firstname )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare your firstname");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! defined $lastname )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare your lastname");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ( ! defined $mail ) || ( length( $mail ) < 6 ) )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare your mail address");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( Vhffs::Functions::valid_mail( $mail ) == -1 )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("You must declare a valid mail address");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! ( $zipcode =~ /^[\d]+$/ ) )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("Your zipcode is not correct! Please enter a correct zipcode");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! ( $firstname =~ /^[\w\d\s\-]+$/ ) )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("Please enter a correct firstname");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! ( $lastname =~ /^[\w\d\s\-]+$/ ) )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("Please enter a correct firstname");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! ( $city =~ /^[^(\(\)\\\.\_\e\'\")]+$/ ) )
-{
-	$template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-	$message = gettext("Please enter a correct city");
-	$template->param( TEXT_CREATEFAILED => $message );
-	$template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-elsif( ! ( $country =~ /^[\w\d\s\-\s]+$/ ) )
-{
-    $template = new HTML::Template( filename => $templatedir."/user/create_failed.tmpl");
-    $message = gettext("Please enter a correct country");
-    $template->param( TEXT_CREATEFAILED => $message );
-    $template->param( TEXT_CREATE => gettext("Subscribe"));
-}
-else
-{
-    $template = new HTML::Template( filename => $templatedir."/user/create_complete.tmpl" );
-    my $retour;
-    my $user = new Vhffs::User( $vhffs , $username , '401' );
-    if( defined $user )
-    {
-	$uid = $user->create;
-	
-	if( $uid < 0 )
-	{
-	    #If the API returns a negative value as uid, the user cannot be created !
-	    $bad_news = gettext("Cannot create user, the username you entered already exists");
-	}
-	else
-	{
-	    #Get user information
-	    $user->fetch;
-	    
-	    #We set informations user fill in the form
-	    $user->set_mail( $mail );
-	    $user->set_firstname( $firstname );
-	    $user->set_lastname( $lastname );
-	    $user->set_city( $city );
-	    $user->set_zipcode( $zipcode );
-	    $user->set_country( $country );
-	    $user->set_address( $address );
-	    $user->set_status( Vhffs::Constants::WAITING_FOR_CREATION );
-	    $user->set_password( Vhffs::Functions::generate_random_password );			
-	    
-	    #Commit all the changes for the current user
-	    if( ( $retour = $user->commit ) < 0 )
-	    {
-		$bad_news = gettext("Cannot apply changes to the user");
-	    }
-	    else
-	    {
-		$good_news = gettext("User Successfully created");
-		$good_news2 = gettext("Please wait while we are creating the account, it will take some minutes");
-	    }
-	}
-	
-    }
-    else
-    {
-	$bad_news = gettext("Cannot create user. Your username should contain at least 3 characters which are only lower case and digits.");
-    }
-    $template->param( TEXT_BACK => gettext("Back to Login") );
-    $template->param( GOOD_NEWS => $good_news );
-    $template->param( GOOD_NEWS2 => $good_news2 );
-    $template->param( BAD_NEWS => $bad_news );
-}
-
-$template->param( TITLE => gettext("Subscribe") );
-display_light Vhffs::Panel::Main($template);
Index: vhffs-panel/subscribe.pl
===================================================================
--- vhffs-panel/subscribe.pl	(révision 226)
+++ vhffs-panel/subscribe.pl	(copie de travail)
@@ -29,53 +29,223 @@
 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
 # POSSIBILITY OF SUCH DAMAGE.
 
+# subscribe.pl
+# Handle subscription for VHFFS
+# If the subscribe form has been submitted
+# we try to create the user, else display
+# the form. If there is an error we inform the
+# user and redisplay the form (already filled)
+#
 
-
-use strict;
+use POSIX qw(locale_h);
 use CGI;
 use locale;
+use Locale::gettext;
+use HTML::Template;
+
+use Vhffs::User;
 use Vhffs::Main;
+use Vhffs::Functions;
 use Vhffs::Constants;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Confirmation;
-use POSIX qw(locale_h);
-use HTML::Template;
-use Locale::gettext;
 
-my $vhffs 			= init Vhffs::Main;
-my $templatedir 	= $vhffs->get_config->get_templatedir;
-my $template;
-my $confirmation;
+#Get some basics informations with CGI
+my $cgi;
+my $uid;
+my $good_news;
+my $vhffs;
+my $templatedir;
+my $cid;
+my $realcode;
+my $code;
 
+$cgi = new CGI;
+
+#Initialize vars
+$good_news = "";
+
+#Init the Vhffs Main System
+$vhffs = init Vhffs::Main;
+$templatedir = $vhffs->get_config->get_templatedir;
+
 Vhffs::Panel::Main::check( $vhffs );
 Vhffs::Panel::Main::cook_lang( $vhffs );
 
+
+$submitted	= $cgi->param( "CREATE_SUBMIT" );
+$mail 		= $cgi->param( "MAIL" );
+$username 	= $cgi->param( "USERNAME" );
+$firstname 	= $cgi->param( "FIRSTNAME");
+$lastname 	= $cgi->param( "LASTNAME" );
+$city 		= $cgi->param("CITY");
+$zipcode 	= $cgi->param("ZIPCODE");
+$country 	= $cgi->param("COUNTRY");
+$address 	= $cgi->param("ADDRESS");
+$cid 		= $cgi->param("CID");
+$code 		= $cgi->param("CONFIRMATION");
+$realcode	= Vhffs::Panel::Confirmation::get_code( $vhffs , $cid );
+
+my $template;
+my $message;
+
 if( $vhffs->get_config->get_allow_subscribe == 0 )
 {
-	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl");
-	$template->param( MESSAGE => gettext("You cannot subscribe to VHFFS") );
+# Subscribe isn't allow, inform user
+        $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl");
+        $template->param( MESSAGE => gettext("You cannot subscribe to VHFFS") );
+} elsif( defined $submitted ) {
+# don't check if form hasn't been submitted
+	@errors = ();
+	if( ( ! defined $cid ) || ( ! defined $code ) || ( $code ne $realcode ) )
+	{
+		push(@errors, {error => gettext("Codes do not match")});
+	}
+	if( ! defined $username )
+	{
+		push(@errors, {error => gettext("You must declare your username")});
+	}
+	if( ( length ( $username ) < 3 ) || ( length ( $username ) > 12 ) )
+	{
+		push(@errors, {error => gettext("Username must contain between 3 and 12 characters")});
+	}
+	if( ! defined $country )
+	{
+		push(@errors, {error => gettext("You must declare your country")});
+	}
+	if( ! defined $city )
+	{
+		push(@errors, {error => gettext("You must declare your city")});
+	}
+	if( ! defined $zipcode )
+	{
+		push(@errors, {error => gettext("You must declare your zipcode")});
+	}
+	if( ! defined $firstname )
+	{
+		push(@errors, {error => gettext("You must declare your firstname")});
+	}
+	if( ! defined $lastname )
+	{
+		push(@errors, {error => gettext("You must declare your lastname")});
+	}
+	if( ( ! defined $mail ) || ( length( $mail ) < 6 ) )
+	{
+		push(@errors, {error => gettext("You must declare your mail address")});
+	}
+	if( Vhffs::Functions::valid_mail( $mail ) == -1 )
+	{
+		push(@errors, {error => gettext("You must declare a valid mail address")});
+	}
+	if( ! ( $zipcode =~ /^[\d]+$/ ) )
+	{
+		push(@errors, {error => gettext("Your zipcode is not correct! Please enter a correct zipcode")});
+	}
+	if( ! ( $firstname =~ /^[\w\d\s\-]+$/ ) )
+	{
+                push(@errors, {error => gettext("Please enter a correct firstname")});
+	}
+	if( ! ( $lastname =~ /^[\w\d\s\-]+$/ ) )
+	{
+                push(@errors, {error => gettext("Please enter a correct firstname")});
+	}
+	if( ! ( $city =~ /^[^(\(\)\\\.\_\e\'\")]+$/ ) )
+	{
+                push(@errors, {error => gettext("Please enter a correct city")});
+	}
+	if( ! ( $country =~ /^[\w\d\s\-\s]+$/ ) )
+	{
+            push(@errors, {error => gettext("Please enter a correct country")});
+	}
+
+	if( ( scalar @errors )  == 0)
+	{
+	    my $retour;
+	    my $user = new Vhffs::User( $vhffs , $username , '401' );
+	    if( defined $user )
+	    {
+		$uid = $user->create;
+		
+		if( $uid < 0 )
+		{
+		    #If the API returns a negative value as uid, the user cannot be created !
+		    push( @errors, {error => gettext("Cannot create user, the username you entered already exists")});
+		}
+		else
+		{
+		    #Get user information
+		    $user->fetch;
+		    
+		    #We set informations user fill in the form
+		    $user->set_mail( $mail );
+		    $user->set_firstname( $firstname );
+		    $user->set_lastname( $lastname );
+		    $user->set_city( $city );
+		    $user->set_zipcode( $zipcode );
+		    $user->set_country( $country );
+		    $user->set_address( $address );
+		    $user->set_status( Vhffs::Constants::WAITING_FOR_CREATION );
+		    $user->set_password( Vhffs::Functions::generate_random_password );			
+		    
+		    #Commit all the changes for the current user
+		    if( ( $retour = $user->commit ) < 0 )
+		    {
+			push ( @errors, { error => gettext("Cannot apply changes to the user") } );
+		    }
+		    else
+		    {
+			$good_news = gettext("User Successfully created");
+			$good_news2 = gettext("Please wait while we are creating the account, it will take some minutes");
+			$template = new HTML::Template( filename => $templatedir."/user/create_complete.tmpl" );
+	    		$template->param( TEXT_BACK => gettext("Back to Login") );
+			$template->param( GOOD_NEWS => $good_news );
+			$template->param( GOOD_NEWS2 => $good_news2 );
+		    }
+		}
+		
+	    } else {
+		push ( @errors, { error => gettext("Cannot create user. Your username should contain at least 3 characters which are only lower case and digits.") } );
+	    }
+	}
+	if ( ( scalar @errors ) > 0 ) {
+	    $template = new HTML::Template( filename => $templatedir."/user/create.tmpl" );
+	    # There was an error, fill the template parameter
+	    $template->param( ERRORS => \@errors );
+	    $template->param( USERNAME_VALUE         => $username );
+	    $template->param( MAIL_VALUE             => $mail );
+	    $template->param( FIRSTNAME_VALUE        => $firstname );
+	    $template->param( LASTNAME_VALUE         => $lastname );
+	    $template->param( ZIPCODE_VALUE          => $zipcode );
+	    $template->param( CITY_VALUE             => $city );
+	    $template->param( COUNTRY_VALUE          => $country );
+	    $template->param( ADDRESS_VALUE          => $address );
+
+	}
+} else {
+    $template = new HTML::Template( filename => $templatedir."/user/create.tmpl" );
 }
-else
-{
-	$template 		= new HTML::Template( filename => $templatedir."/user/create.tmpl" );
-	$confirmation	=	Vhffs::Panel::Confirmation::create_code( $vhffs );
-	
-	$template->param( TITLE 			=> gettext("Subscription ") );
-	$template->param( TEXT_SUBSCRIBE 	=> gettext("Subscription") );
-	$template->param( TEXT_INFOS 		=> gettext("Please fill in all fields, a mail containing your password will be sent to you") );
-	$template->param( USERNAME_TEXT 	=> gettext("Username") );
-	$template->param( MAIL_TEXT 		=> gettext("mail") );
-	$template->param( FIRSTNAME_TEXT 	=> gettext("Firstname") );
-	$template->param( LASTNAME_TEXT 	=> gettext("Lastname") );
-	$template->param( ZIPCODE_TEXT 		=> gettext("Zipcode") );
-	$template->param( CITY_TEXT 		=> gettext("City") );
-	$template->param( COUNTRY_TEXT 		=> gettext("Country") );
-	$template->param( ADDRESS_TEXT 		=> gettext("Address") );
-	$template->param( SEND 				=> gettext("Subscribe") );
-	$template->param( BACK 				=> gettext("Back to Login") );
-	$template->param( CONFIRMATION_TEXT	=> gettext("Code confirmation") );
-	$template->param( REPEAT_CONFIRMATION_TEXT	=> gettext("Recopy the code") );
-	$template->param( CID				=> $confirmation->[0] );
+
+if( ( ! defined $submitted ) || ( ( defined @errors) && ( (scalar @errors) != 0 ) ) ) {
+    $confirmation  = Vhffs::Panel::Confirmation::create_code( $vhffs );
+
+# $template is defined in every cases
+
+    $template->param( TEXT_SUBSCRIBE        => gettext("Subscription") );
+    $template->param( TEXT_INFOS            => gettext("Please fill in all fields, a mail containing your password will be sent to you") );
+    $template->param( USERNAME_TEXT         => gettext("Username") );
+    $template->param( MAIL_TEXT             => gettext("mail") );
+    $template->param( FIRSTNAME_TEXT        => gettext("Firstname") );
+    $template->param( LASTNAME_TEXT         => gettext("Lastname") );
+    $template->param( ZIPCODE_TEXT          => gettext("Zipcode") );
+    $template->param( CITY_TEXT             => gettext("City") );
+    $template->param( COUNTRY_TEXT          => gettext("Country") );
+    $template->param( ADDRESS_TEXT          => gettext("Address") );
+    $template->param( SEND                  => gettext("Subscribe") );
+    $template->param( BACK                  => gettext("Back to Login") );
+    $template->param( CONFIRMATION_TEXT     => gettext("Code confirmation") );
+    $template->param( REPEAT_CONFIRMATION_TEXT      => gettext("Recopy the code") );
+    $template->param( CID                   => $confirmation->[0] );
+
 }
-
+$template->param( TITLE => gettext("Subscribe") );
 display_light Vhffs::Panel::Main($template);
Index: vhffs-panel/templates/user/create.tmpl
===================================================================
--- vhffs-panel/templates/user/create.tmpl	(révision 226)
+++ vhffs-panel/templates/user/create.tmpl	(copie de travail)
@@ -18,71 +18,75 @@
 			<h1><tmpl_var name="TEXT_SUBSCRIBE"></h1>
 			
 			<div class="subscribe">
-			<form method="post" action="subscribe_complete.pl">
+			<form method="post" action="subscribe.pl">
+                        <tmpl_loop name="ERRORS">
+                                <p style="font-weight:bold;color:red;"><tmpl_var name="ERROR"></p>
+                        </tmpl_loop>
 			<h2><tmpl_var name="TEXT_INFOS"></h2>
+
 				<p>
 					<label for="USERNAME">
 						<TMPL_VAR NAME="USERNAME_TEXT">
 					</label>
-					<input type="text" name="USERNAME" id="USERNAME" maxlength="32"/>
+					<input type="text" name="USERNAME" id="USERNAME" maxlength="32" value="<TMPL_VAR NAME="USERNAME_VALUE">"/>
 				</p>
 				<p>
 					<label for="MAIL">
 						<TMPL_VAR NAME="MAIL_TEXT">
 					</label>
-					<input type="text" name="MAIL" id="MAIL" maxlength="32" />
+					<input type="text" name="MAIL" id="MAIL" maxlength="32" value="<TMPL_VAR NAME="MAIL_VALUE">"/>
 				</p>
 				<p>
 					<label for="FIRSTNAME">
 						<TMPL_VAR NAME="FIRSTNAME_TEXT">
 					</label>
-					<input type="text" name="FIRSTNAME" id="FIRSTNAME" maxlength="256" />
+					<input type="text" name="FIRSTNAME" id="FIRSTNAME" maxlength="256" value="<TMPL_VAR NAME="FIRSTNAME_VALUE">" />
 				</p>
 				<p>
 					<label for="LASTNAME">
 						<TMPL_VAR NAME="LASTNAME_TEXT">
 					</label>
-					<input type="text" name="LASTNAME" id="LASTNAME" maxlength="256"/>
+					<input type="text" name="LASTNAME" id="LASTNAME" maxlength="256" value="<TMPL_VAR NAME="LASTNAME_VALUE">"/>
 				</p>
 				<p>
 					<label for="ADDRESS">
 						<TMPL_VAR NAME="ADDRESS_TEXT">
 					</label>
-					<input type="text" name="ADDRESS" id="ADDRESS" maxlength="512"/>
+					<input type="text" name="ADDRESS" id="ADDRESS" maxlength="512" value="<TMPL_VAR NAME="ADDRESS_VALUE">"/>
 				</p>
 				<p>
 					<label for="CITY">
 						<TMPL_VAR NAME="CITY_TEXT">
 					</label>
-					<input type="text" name="CITY" id="CITY" maxlength="64"/>
+					<input type="text" name="CITY" id="CITY" maxlength="64" value="<TMPL_VAR NAME="CITY_VALUE">"/>
 				</p>
 				<p>
 					<label for="COUNTRY">
 						<TMPL_VAR NAME="COUNTRY_TEXT">
 					</label>
-					<input type="text" name="COUNTRY" id="COUNTRY" maxlength="32"/>
+					<input type="text" name="COUNTRY" id="COUNTRY" maxlength="32" value="<TMPL_VAR NAME="COUNTRY_VALUE">"/>
 				</p>
 				<p>
 					<label for="ZIPCODE">
 						<TMPL_VAR NAME="ZIPCODE_TEXT">
 					</label>
-					<input type="text" name="ZIPCODE" id="ZIPCODE" maxlength="16"/>
+					<input type="text" name="ZIPCODE" id="ZIPCODE" maxlength="16" value="<TMPL_VAR NAME="ZIPCODE_VALUE">"/>
 				</p>
 				<p>
-					<label for="ZIPCODE">
+					<label for="CONFIRMATION">
 						<TMPL_VAR NAME="CONFIRMATION_TEXT">
 					</label>
 						<img src="show_code.pl?cid=<TMPL_VAR NAME="CID">"/>
 				</p>
 				<p>
-					<label for="ZIPCODE">
+					<label for="CONFIRMATION">
 						<TMPL_VAR NAME="REPEAT_CONFIRMATION_TEXT">
 					</label>
-					<input type="text" name="CONFIRMATION"  maxlength="16"/>
+					<input type="text" name="CONFIRMATION"  id="CONFIRMATION" maxlength="16"/>
 				</p>
 				<p class="button">
 					<input type="hidden" name="CID" value="<TMPL_VAR NAME="CID">"/>
-					<input type="submit" value="<TMPL_VAR NAME="SEND">" />
+					<input type="submit" value="<TMPL_VAR NAME="SEND">" name="CREATE_SUBMIT"/>
 				</p>
 			
 			</form>


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