[vhffs-dev] [1679] subscribe.pl converted to Template::Toolkit |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1679
Author: beuss
Date: 2011-05-01 08:40:43 +0200 (Sun, 01 May 2011)
Log Message:
-----------
subscribe.pl converted to Template::Toolkit
Modified Paths:
--------------
trunk/vhffs-panel/subscribe.pl
trunk/vhffs-panel/templates/Makefile.am
Added Paths:
-----------
trunk/vhffs-panel/templates/anonymous/account_created.tt
trunk/vhffs-panel/templates/anonymous/subscribe.tt
trunk/vhffs-panel/templates/misc/message.tt
Removed Paths:
-------------
trunk/vhffs-panel/templates/user/create.tmpl
trunk/vhffs-panel/templates/user/create_complete.tmpl
Modified: trunk/vhffs-panel/subscribe.pl
===================================================================
--- trunk/vhffs-panel/subscribe.pl 2011-05-01 06:39:50 UTC (rev 1678)
+++ trunk/vhffs-panel/subscribe.pl 2011-05-01 06:40:43 UTC (rev 1679)
@@ -43,7 +43,6 @@
use CGI;
use locale;
use Locale::gettext;
-use HTML::Template;
use Encode;
use Authen::Captcha;
@@ -53,7 +52,6 @@
use Vhffs::Functions;
use Vhffs::Constants;
use Vhffs::Panel::Main;
-use Vhffs::Services::Newsletter;
my $panel = new Vhffs::Panel::Main();
exit 0 unless $panel;
@@ -63,7 +61,6 @@
my $cgi = $panel->{'cgi'};
my $submitted = $cgi->param( 'CREATE_SUBMIT' );
-my @errors = ();
my $template;
my $message;
@@ -73,13 +70,11 @@
if( $vhffs->get_config->get_allow_subscribe == 0 )
{
# Subscribe isn't allowed, inform user
- $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl');
- $template->param( MESSAGE => gettext('You cannot subscribe to VHFFS') );
- $panel->light( $template );
- $panel->display;
+ $panel->render('misc/message.tt', { message => gettext('You cannot subscribe to VHFFS') }, 'anonymous.tt');
exit 0;
}
+my $vars = {};
if( defined $submitted ) {
# don't check if form hasn't been submitted
@@ -97,83 +92,82 @@
$newslettercheckbox = ( defined $newslettercheckbox && $newslettercheckbox eq 'on' );
if( $usecaptcha ) {
- my $codeuser = $cgi->param('CONFIRMATION');
+ my $codeuser = $cgi->param('CONFIRMATION');
my $hexcode = $cgi->param('CODE');
my $code = pack('H12', $hexcode);
$code ^= pack('H12', $captchakey) if defined $captchakey;
if( ( ! defined $code ) || ( $codeuser ne $code ) )
{
- push(@errors, {error => gettext("Codes do not match")});
+ $panel->add_error( gettext("Codes do not match"));
}
}
if( ! defined $username )
{
- push(@errors, {error => gettext("You must declare your username")});
+ $panel->add_error( gettext("You must declare your username"));
}
if( ! Vhffs::User::check_username($username) )
{
- push(@errors, {error => gettext('Invalid username, it must contain between 3 and 12 alphanumeric characters, all in lowercase')});
+ $panel->add_error( gettext('Invalid username, it must contain between 3 and 12 alphanumeric characters, all in lowercase'));
}
if( ! defined $country )
{
- push(@errors, {error => gettext("You must declare your country")});
+ $panel->add_error( gettext("You must declare your country"));
}
if( ! defined $city )
{
- push(@errors, {error => gettext("You must declare your city")});
+ $panel->add_error( gettext("You must declare your city"));
}
if( ! defined $zipcode )
{
- push(@errors, {error => gettext("You must declare your zipcode")});
+ $panel->add_error( gettext("You must declare your zipcode"));
}
if( ! defined $firstname )
{
- push(@errors, {error => gettext("You must declare your firstname")});
+ $panel->add_error( gettext("You must declare your firstname"));
}
if( ! defined $lastname )
{
- push(@errors, {error => gettext("You must declare your lastname")});
+ $panel->add_error( gettext("You must declare your lastname"));
}
if( ( ! defined $mail ) || ( length( $mail ) < 6 ) )
{
- push(@errors, {error => gettext("You must declare your mail address")});
+ $panel->add_error( gettext("You must declare your mail address"));
}
if( ! Vhffs::Functions::valid_mail( $mail ) )
{
- push(@errors, {error => gettext("You must declare a valid mail address")});
+ $panel->add_error( gettext("You must declare a valid mail address"));
}
if( $zipcode !~ /^[\w\d\s\-]+$/ )
{
- push(@errors, {error => gettext("Your zipcode is not correct! Please enter a correct zipcode")});
+ $panel->add_error( gettext("Your zipcode is not correct! Please enter a correct zipcode"));
}
if( $firstname !~ /^[^<>"]+$/ )
{
- push(@errors, {error => gettext("Please enter a correct firstname")});
+ $panel->add_error( gettext("Please enter a correct firstname"));
}
if( $lastname !~ /^[^<>"]+$/ )
{
- push(@errors, {error => gettext("Please enter a correct lastname")});
+ $panel->add_error( gettext("Please enter a correct lastname"));
}
if( $city !~ /^[^<>"]+$/ )
{
- push(@errors, {error => gettext("Please enter a correct city")});
+ $panel->add_error( gettext("Please enter a correct city"));
}
if( $country =~ /^[<>"]+$/ )
{
- push(@errors, {error => gettext("Please enter a correct country")});
+ $panel->add_error( gettext("Please enter a correct country"));
}
- if( ( scalar @errors ) == 0)
+ if( !$panel->has_errors )
{
- my $retour;
my $user = Vhffs::User::create( $vhffs, $username, &Vhffs::Functions::generate_random_password(),
0, $mail, $firstname, $lastname, $city, $zipcode, $country, $address, "");
if(! defined $user )
{
- push( @errors, {error => gettext("Cannot create user, the username you entered already exists")});
+ $panel->add_error( gettext("Cannot create user, the username you entered already exists") );
}
else
{
@@ -181,101 +175,68 @@
$user->set_status( Vhffs::Constants::WAITING_FOR_CREATION );
#Commit all the changes for the current user
- if( ( $retour = $user->commit ) < 0 )
+ if( $user->commit < 0 )
{
- push ( @errors, { error => gettext("Cannot apply changes to the user") } );
+ $panel->add_error( gettext("Cannot apply changes to the user") );
}
else
{
- my $good_news = gettext("User Successfully created");
- my $good_news2 = gettext("Please wait while we are creating the account, it will take some minutes");
- $template = new HTML::Template( filename => $templatedir."/panel/user/create_complete.tmpl" );
- $template->param( TEXT_BACK => gettext("Back to Login") );
- $template->param( GOOD_NEWS => $good_news );
- $template->param( GOOD_NEWS2 => $good_news2 );
+ Vhffs::Acl::add_acl( $user , $user , Vhffs::Constants::ACL_DELETE , $vhffs );
+ Vhffs::Acl::add_acl( $user->get_group , $user , Vhffs::Constants::ACL_DENIED , $vhffs );
- Vhffs::Acl::add_acl( $user , $user , Vhffs::Constants::ACL_DELETE , $vhffs );
- Vhffs::Acl::add_acl( $user->get_group , $user , Vhffs::Constants::ACL_DENIED , $vhffs );
-
- # Newsletter
- my $newsletter = init Vhffs::Services::Newsletter( $vhffs , $user );
- if( $newsletter ) {
- if( ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::ACTIVE_OPTIN && $newslettercheckbox )
- || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::PASSIVE_OPTIN && $newslettercheckbox )
- || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::ACTIVE_OPTOUT && !$newslettercheckbox )
- || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::PASSIVE_OPTOUT )
- || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::PERMANENT )
- ) {
- $newsletter->add;
- }
- }
+ # Newsletter
+ if( $vhffs->get_config->get_service_availability('newsletter') ) {
+ require Vhffs::Services::Newsletter;
+ my $newsletter = init Vhffs::Services::Newsletter( $vhffs , $user );
+ if( $newsletter ) {
+ if( ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::ACTIVE_OPTIN && $newslettercheckbox )
+ || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::PASSIVE_OPTIN && $newslettercheckbox )
+ || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::ACTIVE_OPTOUT && !$newslettercheckbox )
+ || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::PASSIVE_OPTOUT )
+ || ( $newsletter->get_collectmode == Vhffs::Services::Newsletter::PERMANENT )
+ ) {
+ $newsletter->add;
+ }
+ }
+ }
+ $panel->render('anonymous/account_created.tt', $vars, 'anonymous.tt');
+ exit 0;
}
}
}
- if ( ( scalar @errors ) > 0 ) {
- $template = new HTML::Template( filename => $templatedir."/panel/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 );
- $template->param( NEWSLETTER_CHECKED => $newslettercheckbox );
+ if ( $panel->has_errors ) {
+ $vars->{username} = $username;
+ $vars->{mail} = $mail;
+ $vars->{firstname} = $firstname;
+ $vars->{lastname} = $lastname;
+ $vars->{zipcode} = $zipcode;
+ $vars->{city} = $city;
+ $vars->{country} = $country;
+ $vars->{address} = $address;
+ $vars->{newsletter_checked} = $newslettercheckbox;
}
-} else {
- $template = new HTML::Template( filename => $templatedir."/panel/user/create.tmpl" );
}
-if( ( ! defined $submitted ) || (scalar @errors) != 0 ) {
-# $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( USECAPTCHA => $usecaptcha );
+if( ( ! defined $submitted ) || $panel->has_errors ) {
if( $usecaptcha ) {
my $captcha = Authen::Captcha->new;
my $code = $captcha->generate_random_string( 6 );
$code ^= pack('H12', $captchakey) if defined $captchakey;
my $hex = unpack('H12', $code);
- $template->param( CODE => $hex );
-
- $template->param( CONFIRMATION_TEXT => gettext('Code confirmation') );
- $template->param( REPEAT_CONFIRMATION_TEXT => gettext('Recopy the code') );
- $template->param( CONFIRMATION_ALT => gettext('Confirmation code, contact administrator team if you can\'t read it') );
- $template->param( CONFIRMATION_SOUND_TEXT => gettext('Or listen to the code') );
+ $vars->{captcha} = {
+ code => $hex
+ };
}
if( $vhffs->get_config->get_service_availability('newsletter') ) {
my $conf = $vhffs->get_config->get_service('newsletter');
- if( $conf->{'collectmode'} eq 'active_optin' ) {
- $template->param( NEWSLETTER_TEXT => gettext('Subscribe to the newsletter') );
- } elsif ( $conf->{'collectmode'} eq 'passive_optin' ) {
- $template->param( NEWSLETTER_TEXT => gettext('Subscribe to the newsletter') );
- $template->param( NEWSLETTER_CHECKED => 1 ) unless defined $submitted;
- } elsif ( $conf->{'collectmode'} eq 'active_optout' ) {
- $template->param( NEWSLETTER_TEXT => gettext('Don\'t subscribe to the newsletter') );
- }
+ $vars->{newsletter} = {
+ prompt => ($conf->{'collectmode'} eq 'active_optout' ? gettext('Don\'t subscribe to the newsletter') : gettext('Subscribe to the newsletter') )
+ };
+ $vars->{newsletter_checked} = 1 if($conf->{'collectmode'} eq 'passive_optin' and !defined $submitted);
}
- $template->param( USERNAME_TIP_TEXT => gettext('Your username. It must contains only alphanumeric characters in lowercase, its length must be between 3 and 12 chars') );
- $template->param( EMAIL_TIP_TEXT => gettext('Your email address. It will be used to contact you when needed and as a destination address if you use our email forwarding service') );
+ $panel->render('anonymous/subscribe.tt', $vars, 'anonymous.tt');
+ exit 0;
}
-
-$panel->light( $template );
-$panel->display;
Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am 2011-05-01 06:39:50 UTC (rev 1678)
+++ trunk/vhffs-panel/templates/Makefile.am 2011-05-01 06:40:43 UTC (rev 1679)
@@ -128,8 +128,6 @@
bazaar/prefs.tmpl \
bazaar/user_part.tmpl \
user/admin.tmpl \
- user/create_complete.tmpl \
- user/create.tmpl \
user/ircnick.tmpl \
user/mailuserspam.tmpl \
user/mailuser.tmpl \
@@ -141,8 +139,11 @@
web/prefs.tmpl \
cron/create.tmpl \
cron/prefs.tmpl \
+ anonymous/account_created.tt \
anonymous/login.tt \
+ anonymous/subscribe.tt \
layouts/anonymous.tt \
misc/errors.tt \
misc/infos.tt \
- misc/languages.tt
+ misc/languages.tt \
+ misc/message.tt
Added: trunk/vhffs-panel/templates/anonymous/account_created.tt
===================================================================
--- trunk/vhffs-panel/templates/anonymous/account_created.tt (rev 0)
+++ trunk/vhffs-panel/templates/anonymous/account_created.tt 2011-05-01 06:40:43 UTC (rev 1679)
@@ -0,0 +1,6 @@
+<div class="logo"></div>
+<div class="login">
+ <h1>[% 'Account successfully created' | i18n | html %]</h1>
+ <p class="info">[% 'Your registration request as been sent. Please wait while we\'re creating you account, it may take several minutes.' | i18n | html %]</p>
+ <p class="button"><a href="/auth.pl">[% 'Back to login' %]</a></p>
+</div>
Added: trunk/vhffs-panel/templates/anonymous/subscribe.tt
===================================================================
--- trunk/vhffs-panel/templates/anonymous/subscribe.tt (rev 0)
+++ trunk/vhffs-panel/templates/anonymous/subscribe.tt 2011-05-01 06:40:43 UTC (rev 1679)
@@ -0,0 +1,102 @@
+<div class="logo">
+</div>
+<div id="subscribe">
+ <div id="content">
+ <h1>[% 'Subscription' | i18n | html %]</h1>
+ <p class="info">[% 'Please fill in all fields, you\'ll be sent a mail containing your password' | i18n | html %]</p>
+ <div class="subscribe">
+ <form method="post" action="subscribe.pl" accept-charset="utf-8">
+ [% INCLUDE 'misc/errors.tt' %]
+ <p>
+ <label for="USERNAME">
+ [% 'Username:' | i18n | html %]
+ </label>
+ <span><input type="text" name="USERNAME" id="USERNAME" maxlength="12" value="[% username | html %]" onchange="javascript:check(this.id, validIdentifier, 12);" onkeyup="javascript:check(this.id, validIdentifier, 12);"/> </span> <img src="/themes/[% theme %]/images/tip.png" alt="tip" id="username_tip_trigger"/>
+ </p>
+ <p>
+ <label for="MAIL">
+ [% 'Email:' | i18n | html %]
+ </label>
+ <span><input type="text" name="MAIL" id="MAIL" maxlength="200" value="[% mail | html %]" onkeyup="javascript:check(this.id, validEmail);"/> </span> <img src="/themes/[% theme %]/images/tip.png" alt="tip" id="email_tip_trigger"/>
+ </p>
+ <p>
+ <label for="FIRSTNAME">
+ [% 'Firstname:' | i18n | html %]
+ </label>
+ <span><input type="text" name="FIRSTNAME" id="FIRSTNAME" maxlength="256" value="[% firstname | html %]" onkeyup="javascript:check('FIRSTNAME', validString);" /> </span>
+ </p>
+ <p>
+ <label for="LASTNAME">
+ [% 'Lastname: ' | i18n | html %]
+ </label>
+ <span><input type="text" name="LASTNAME" id="LASTNAME" maxlength="256" value="[% lastname | html %]" onkeyup="javascript:check('LASTNAME', validString);"/> </span>
+ </p>
+ <p>
+ <label for="ADDRESS">
+ [% 'Address:' | i18n | html %]
+ </label>
+ <span><input type="text" name="ADDRESS" id="ADDRESS" maxlength="512" value="[% address | html %]" onkeyup="javascript:check('ADDRESS', validString);"/> </span>
+ </p>
+ <p>
+ <label for="CITY">
+ [% 'City:' | i18n | html %]
+ </label>
+ <span><input type="text" name="CITY" id="CITY" maxlength="64" value="[% city | html %]" onkeyup="javascript:check('CITY', validString);"/> </span>
+ </p>
+ <p>
+ <label for="COUNTRY">
+ [% 'Country:' | i18n | html %]
+ </label>
+ <span><input type="text" name="COUNTRY" id="COUNTRY" maxlength="32" value="[% country | html %]" onkeyup="javascript:check('COUNTRY', validString);"/> </span>
+ </p>
+ <p>
+ <label for="ZIPCODE">
+ [% 'Zipcode' | i18n | html %]
+ </label>
+ <span><input type="text" name="ZIPCODE" id="ZIPCODE" maxlength="16" value="[% zipcode | html %]" onkeyup="javascript:check(this.id, validZip);" onchange="javascript:check(this.id, validZip);"/> </span>
+ </p>
+[% IF newsletter %]
+ <p>
+ <label for="NEWSLETTER">
+ [% newsletter.prompt | html %]
+ </label>
+ <span><input type="checkbox" name="NEWSLETTER" id="NEWSLETTER"[% ' checked="checked"' IF newsletter_checked %]/></span>
+ </p>
+[% END %]
+[% IF captcha.defined() %]
+ <p>
+ <label for="CONFIRMATION">
+ [% 'Confirmation code:' | i18n | html %]
+ </label>
+ <img src="show_code.pl?code=[% captcha.code %]" alt="[% 'Confirmation code, contact administrator team if you can\'t read it' | i18n | html %]"/> <a href="play_code.pl?code=[% captcha.code %]">[% 'Or listen to the code' | i18n | html %]</a>
+ </p>
+ <p>
+ <label for="CONFIRMATION">
+ [% 'Recopy the code:' | i18n | html %]
+ </label>
+ <input type="text" name="CONFIRMATION" id="CONFIRMATION" maxlength="16"/>
+ </p>
+ <input type="hidden" name="CODE" id="CODE" value="[% captcha.code %]"/>
+[% END %]
+ <p class="button">
+ <input type="submit" value="[% 'Subscribe' | i18n | html %]" name="CREATE_SUBMIT"/>
+ </p>
+ </form>
+ </div>
+ <p class="home"><a href="/auth.pl">[% 'Back to login' %]</a></p>
+ </div>
+ <div id="email_tooltip" class="tooltip">[% 'Your email address. It will be used to contact you when needed and as a destination address if you use our email forwarding service' | i18n | html %]</div>
+ <div id="username_tooltip" class="tooltip">[% 'Your username. It must contains only alphanumeric characters in lowercase, its length must be between 3 and 12 chars' | i18n | html %]</div>
+ <script type="text/javascript">
+ new Tooltip('username_tip_trigger', 'username_tooltip', { delta_x: 5, delta_y: 5 });
+ new Tooltip('email_tip_trigger', 'email_tooltip', { delta_x: 5, delta_y: 5 });
+ check('USERNAME', validIdentifier, 12);
+ check('MAIL', validEmail);
+ check('FIRSTNAME', validString);
+ check('LASTNAME', validString);
+ check('ADDRESS', validString);
+ check('CITY', validString);
+ check('COUNTRY', validString);
+ check('ZIPCODE', validZip);
+ </script>
+</div>
Added: trunk/vhffs-panel/templates/misc/message.tt
===================================================================
--- trunk/vhffs-panel/templates/misc/message.tt (rev 0)
+++ trunk/vhffs-panel/templates/misc/message.tt 2011-05-01 06:40:43 UTC (rev 1679)
@@ -0,0 +1 @@
+<h1 class="message">[% message %]</h1>
Deleted: trunk/vhffs-panel/templates/user/create.tmpl
===================================================================
--- trunk/vhffs-panel/templates/user/create.tmpl 2011-05-01 06:39:50 UTC (rev 1678)
+++ trunk/vhffs-panel/templates/user/create.tmpl 2011-05-01 06:40:43 UTC (rev 1679)
@@ -1,107 +0,0 @@
-<div class="logo">
-</div>
-<div id="subscribe">
- <div id="content">
- <h1><TMPL_VAR ESCAPE=1 NAME="TEXT_SUBSCRIBE"></h1>
- <p class="info"><TMPL_VAR ESCAPE=1 NAME="TEXT_INFOS"></p>
- <div class="subscribe">
- <form method="post" action="subscribe.pl" accept-charset="utf-8">
- <div id="errors">
- <TMPL_LOOP NAME="ERRORS">
- <p class="error"><TMPL_VAR ESCAPE=1 NAME="ERROR"></p>
- </TMPL_LOOP>
- </div>
-
- <p>
- <label for="USERNAME">
- <TMPL_VAR ESCAPE=1 NAME="USERNAME_TEXT">
- </label>
- <span><input type="text" name="USERNAME" id="USERNAME" maxlength="12" value="<TMPL_VAR ESCAPE=1 NAME="USERNAME_VALUE">" onchange="javascript:check(this.id, validIdentifier, 12);" onkeyup="javascript:check(this.id, validIdentifier, 12);"/> </span> <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/tip.png" alt="tip" id="username_tip_trigger"/>
- </p>
- <p>
- <label for="MAIL">
- <TMPL_VAR ESCAPE=1 NAME="MAIL_TEXT">
- </label>
- <span><input type="text" name="MAIL" id="MAIL" maxlength="200" value="<TMPL_VAR ESCAPE=1 NAME="MAIL_VALUE">" onkeyup="javascript:check(this.id, validEmail);"/> </span> <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/tip.png" alt="tip" id="email_tip_trigger"/>
- </p>
- <p>
- <label for="FIRSTNAME">
- <TMPL_VAR ESCAPE=1 NAME="FIRSTNAME_TEXT">
- </label>
- <span><input type="text" name="FIRSTNAME" id="FIRSTNAME" maxlength="256" value="<TMPL_VAR ESCAPE=1 NAME="FIRSTNAME_VALUE">" onkeyup="javascript:check('FIRSTNAME', validString);" /> </span>
- </p>
- <p>
- <label for="LASTNAME">
- <TMPL_VAR ESCAPE=1 NAME="LASTNAME_TEXT">
- </label>
- <span><input type="text" name="LASTNAME" id="LASTNAME" maxlength="256" value="<TMPL_VAR ESCAPE=1 NAME="LASTNAME_VALUE">" onkeyup="javascript:check('LASTNAME', validString);"/> </span>
- </p>
- <p>
- <label for="ADDRESS">
- <TMPL_VAR ESCAPE=1 NAME="ADDRESS_TEXT">
- </label>
- <span><input type="text" name="ADDRESS" id="ADDRESS" maxlength="512" value="<TMPL_VAR ESCAPE=1 NAME="ADDRESS_VALUE">" onkeyup="javascript:check('ADDRESS', validString);"/> </span>
- </p>
- <p>
- <label for="CITY">
- <TMPL_VAR ESCAPE=1 NAME="CITY_TEXT">
- </label>
- <span><input type="text" name="CITY" id="CITY" maxlength="64" value="<TMPL_VAR ESCAPE=1 NAME="CITY_VALUE">" onkeyup="javascript:check('CITY', validString);"/> </span>
- </p>
- <p>
- <label for="COUNTRY">
- <TMPL_VAR ESCAPE=1 NAME="COUNTRY_TEXT">
- </label>
- <span><input type="text" name="COUNTRY" id="COUNTRY" maxlength="32" value="<TMPL_VAR ESCAPE=1 NAME="COUNTRY_VALUE">" onkeyup="javascript:check('COUNTRY', validString);"/> </span>
- </p>
- <p>
- <label for="ZIPCODE">
- <TMPL_VAR ESCAPE=1 NAME="ZIPCODE_TEXT">
- </label>
- <span><input type="text" name="ZIPCODE" id="ZIPCODE" maxlength="16" value="<TMPL_VAR ESCAPE=1 NAME="ZIPCODE_VALUE">" onkeyup="javascript:check(this.id, validZip);" onchange="javascript:check(this.id, validZip);"/> </span>
- </p>
-<TMPL_IF NAME="NEWSLETTER_TEXT">
- <p>
- <label for="NEWSLETTER">
- <TMPL_VAR ESCAPE=1 NAME="NEWSLETTER_TEXT">
- </label>
- <span><input type="checkbox" name="NEWSLETTER" id="NEWSLETTER" <TMPL_IF NAME="NEWSLETTER_CHECKED">checked="checked"</TMPL_IF>/></span>
- </p>
-</TMPL_IF>
-<TMPL_IF NAME="USECAPTCHA">
- <p>
- <label for="CONFIRMATION">
- <TMPL_VAR ESCAPE=1 NAME="CONFIRMATION_TEXT">
- </label>
- <img src="show_code.pl?code=<TMPL_VAR ESCAPE=1 NAME="CODE">" alt="<TMPL_VAR ESCAPE=1 NAME="CONFIRMATION_ALT">"/> <a href="play_code.pl?code=<TMPL_VAR ESCAPE=1 NAME="CODE">"><TMPL_VAR ESCAPE=1 NAME="CONFIRMATION_SOUND_TEXT"></a>
- </p>
- <p>
- <label for="CONFIRMATION">
- <TMPL_VAR ESCAPE=1 NAME="REPEAT_CONFIRMATION_TEXT">
- </label>
- <input type="text" name="CONFIRMATION" id="CONFIRMATION" maxlength="16"/>
- </p>
- <input type="hidden" name="CODE" id="CODE" value="<TMPL_VAR ESCAPE=1 NAME="CODE">"/>
-</TMPL_IF>
- <p class="button">
- <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="SEND">" name="CREATE_SUBMIT"/>
- </p>
- </form>
- </div>
- <p class="home"><a href="/auth.pl"><TMPL_VAR ESCAPE=1 NAME="BACK"></a></p>
- </div>
- <div id="email_tooltip" class="tooltip"><TMPL_VAR ESCAPE=1 NAME="EMAIL_TIP_TEXT"></div>
- <div id="username_tooltip" class="tooltip"><TMPL_VAR ESCAPE=1 NAME="USERNAME_TIP_TEXT"></div>
- <script type="text/javascript">
- new Tooltip('username_tip_trigger', 'username_tooltip', { delta_x: 5, delta_y: 5 });
- new Tooltip('email_tip_trigger', 'email_tooltip', { delta_x: 5, delta_y: 5 });
- check('USERNAME', validIdentifier, 12);
- check('MAIL', validEmail);
- check('FIRSTNAME', validString);
- check('LASTNAME', validString);
- check('ADDRESS', validString);
- check('CITY', validString);
- check('COUNTRY', validString);
- check('ZIPCODE', validZip);
- </script>
-</div>
Deleted: trunk/vhffs-panel/templates/user/create_complete.tmpl
===================================================================
--- trunk/vhffs-panel/templates/user/create_complete.tmpl 2011-05-01 06:39:50 UTC (rev 1678)
+++ trunk/vhffs-panel/templates/user/create_complete.tmpl 2011-05-01 06:40:43 UTC (rev 1679)
@@ -1,8 +0,0 @@
-<div class="logo"></div>
-<div class="login">
-<h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
-<h2><TMPL_VAR ESCAPE=1 NAME="GOOD_NEWS"></h2>
-<h2><TMPL_VAR ESCAPE=1 NAME="GOOD_NEWS2"></h2>
-<h2 class="error"><TMPL_VAR ESCAPE=1 NAME="BAD_NEWS"></h2>
-<p class="button"><a href="/auth.pl"><TMPL_VAR ESCAPE=1 NAME="TEXT_BACK"></a></p>
-</div>