[vhffs-dev] [533] Started to add a generic error handling to improve navigation. |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 533
Author: beuss
Date: 2007-03-28 13:11:45 +0000 (Wed, 28 Mar 2007)
Log Message:
-----------
Started to add a generic error handling to improve navigation.
Modified Paths:
--------------
branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Main.pm
branches/vhffs_4.1/vhffs-panel/auth.pl
branches/vhffs_4.1/vhffs-panel/logout.pl
branches/vhffs_4.1/vhffs-panel/templates/main/auth.tmpl
branches/vhffs_4.1/vhffs-panel/templates/user/create.tmpl
branches/vhffs_4.1/vhffs-panel/themes/vhffs/main.css
branches/vhffs_4.1/vhffs-panel/themes/vhffs-ng/main.css
Added Paths:
-----------
branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Commons.pm
branches/vhffs_4.1/vhffs-panel/templates/misc/errors.tmpl
Removed Paths:
-------------
branches/vhffs_4.1/vhffs-panel/login.pl
Added: branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Commons.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Commons.pm 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Commons.pm 2007-03-28 13:11:45 UTC (rev 533)
@@ -0,0 +1,78 @@
+#!/usr/bin/perl
+# 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.
+
+package Vhffs::Panel::Commons;
+
+use strict;
+use DBI;
+use POSIX qw(locale_h);
+use locale;
+use Locale::gettext;
+
+sub display_login($$)
+{
+ my ($vhffs, $panel) = @_;
+
+ my $hostname = $vhffs->get_config->get_host_name;
+
+ my $templatedir = $panel->{templatedir};
+ my $template = new HTML::Template( filename => $templatedir."/main/auth.tmpl" );
+
+ $template->param( TITLE => gettext("VHFFS Login") );
+ $template->param( TEXT_WELCOME => sprintf( gettext("Welcome on %s") , $hostname ) );
+ $template->param( VHFFS_INFO => sprintf( "Run VHFFS %s (%s)" , Vhffs::Constants::VHFFS_VERSION , Vhffs::Constants::VHFFS_RELEASE_NAME ) );
+ $template->param( TEXT_PLEASEIDENTIFY => gettext("Please enter your username and password") );
+ $template->param( TEXT_USERNAME => gettext("Username") );
+ $template->param( TEXT_PASSWORD => gettext("Password") );
+ $template->param( TEXT_LOGIN => gettext("Access to panel") );
+ $template->param( TEXT_LOSTPASSWORD => gettext("I've lost my password") );
+ $template->param( TEXT_SUBSCRIBE => gettext("Subscribe") );
+
+ $template->param( LANGS => Vhffs::Panel::Main::select_lang( $vhffs ) );
+
+
+ if( $vhffs->get_config->stats_on_home == 1 ) {
+ use Vhffs::Stats;
+ my $stats = new Vhffs::Stats( $vhffs );
+ my $users = $stats->get_user_total;
+ my $groups = $stats->get_groups_total;
+
+ $template->param( TEXT_STATS => sprintf( gettext( "Woah, %s users and %s groups already trust %s" ) , $users, $groups , $hostname ) );
+ }
+
+ if( $vhffs->get_config->get_panel_public == 1 ) {
+ $template->param( TEXT_PUBLIC => gettext( "Go to public area" ) );
+ }
+
+ $panel->display_light( $template );
+}
+
+1;
Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Main.pm 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Main.pm 2007-03-28 13:11:45 UTC (rev 533)
@@ -18,8 +18,23 @@
use Vhffs::Group;
use Vhffs::Panel::Menu;
use Vhffs::Panel::User;
+use Vhffs::Panel::Commons;
+=pod
+=head1 NAME
+
+Vhffs::Panel::Main - Provides acces to common VHFFS
+functionnalities from Vhffs Panel.
+
+=head1 SYNOPSIS
+
+TODO
+
+=head1 METHODS
+
+=cut
+
sub check
{
my $vhffs = shift;
@@ -187,6 +202,7 @@
sub new
{
+ my $class = ref($_[0]) || $_[0];
my $bad_news;
my $session;
my $user;
@@ -210,44 +226,46 @@
my $config = $vhffs->get_config;
my $templatedir = $vhffs->get_config->get_templatedir;
+ my $this = {};
+ $this->{vhffs} = $vhffs;
+ $this->{templatedir} = $templatedir;
+ $this->{cgi} = $cgi;
+ $this->{config} = $config;
+ $this->{lang} = $lang;
+ $this->{langcookie} = $langcookie;
+ $this->{theme} = $theme;
+ $this->{themecookie} = $themecookie;
+ $this->{errors} = [];
+ $this->{infos} = [];
+ bless($this, $class);
+
+
# fetch the cookie which contain the sessions ID and the session
- my $sid = CGI->cookie("session");
- if( ! defined $sid )
- {
+ # if sarge didn't use out of date package (CGI::Session 3.95 is
+ # FOUR years old!) we could simply use CGI::Session->load an see
+ # id the session is expired.
+ my $sid = $cgi->cookie(CGI::Session::name());
+ if( ! defined $sid ) {
$bad_news = gettext("No cookie found, please accept the cookie and then please login again !");
- }
-
- if( ! defined $bad_news )
- {
+ } else {
$session = new CGI::Session(undef, $sid, {Directory=>'/tmp'});
$username = $session->param("username");
$uid = $session->param("uid");
- if(!$username || !$uid || $session->id() ne $sid) {
+ if(!$username || !$uid || $session->is_new()) {
$bad_news = gettext("Expired session ! Please login again");
$session->delete();
- }
- }
-
- if( ! defined $bad_news )
- {
- #Try to verify if the user exist and is allowed to browse panel
- #Then, set some preferences
- if( ! defined($user = Vhffs::User::get_by_uid($vhffs, $uid)) ) {
+ } elsif( ! defined($user = Vhffs::User::get_by_uid($vhffs, $uid)) ) {
$bad_news = gettext("User does not exist");
} elsif( $user->get_status != Vhffs::Constants::ACTIVATED ) {
$bad_news = gettext("You're are not allowed to browse panel");
}
}
- if( defined $bad_news )
- {
- my $template = new HTML::Template( filename => $templatedir."/main/login_failed.tmpl" );
- $template->param( TEXT_LOGINFAILED => $bad_news);
- $template->param( TEXT_LOGIN => gettext("Go to Login") );
- $template->param( THEME => get_theme( $vhffs ) );
- print CGI->header( -type=>"text/html", -charset=>"utf-8" ), $template->output;
- return 0;
+ if( defined $bad_news ) {
+ $this->add_error($bad_news);
+ Vhffs::Panel::Commons::display_login($vhffs, $this);
+ exit(0);
}
@@ -280,30 +298,38 @@
}
$maintemplate->param( JSCRIPTS => \@jscripts );
- my $data = {};
- $data->{'vhffs'} = $vhffs;
- $data->{'session'} = $session;
- $data->{'template'} = $maintemplate;
- $data->{'templatedir'} = $templatedir;
- $data->{'user'} = $user;
- $data->{'cgi'} = $cgi;
- $data->{'config'} = $config;
- $data->{'lang'} = $lang;
- $data->{'langcookie'} = $langcookie;
- $data->{'theme'} = $theme;
- $data->{'themecookie'} = $themecookie;
+ $this->{session} = $session;
+ $this->{template} = $maintemplate;
+ $this->{user} = $user;
if( defined $group ) {
- $data->{'group'} = $group;
- $data->{'groupname'} = $projectname;
+ $this->{'group'} = $group;
+ $this->{'groupname'} = $projectname;
}
- my $menutemplate = new Vhffs::Panel::Menu($data);
+ my $menutemplate = new Vhffs::Panel::Menu($this);
$maintemplate->param( MENU => $menutemplate->output );
- return $data;
+ return $this;
}
+sub has_errors
+{
+ my $self = shift;
+ return (@{$self->{errors}} > 0);
+}
+sub add_error
+{
+ my ($self, $error) = @_;
+ push(@{$self->{errors}}, {msg => $error});
+}
+
+sub add_info
+{
+ my ($self, $info) = @_;
+ push(@{$self->{infos}}, {msg => $info});
+}
+
sub right_first
{
my ( $class , $vhffs , $session , $user ) = @_;
@@ -607,6 +633,11 @@
my $maintemplate = $panel->{'template'};
$maintemplate->param( CENTRE => $content );
+ if(@{$panel->{errors}} > 0) {
+ my $tmplerrors = new HTML::Template( filename => $panel->{templatedir}."/misc/errors.tmpl" );
+ $tmplerrors->param( ERRORS => $panel->{errors} );
+ $maintemplate->param( ERRORS => $tmplerrors->output );
+ }
if( defined $panel->{'group'} )
{
@@ -628,6 +659,7 @@
sub new_light
{
+ my $class = ref($_[0]) || $_[0];
my $cgi = new CGI;
my $vhffs = init Vhffs::Main;
if ( ! defined $vhffs ) {
@@ -642,17 +674,19 @@
Vhffs::Panel::Main::check( $vhffs );
- my $data = {};
- $data->{'vhffs'} = $vhffs;
- $data->{'templatedir'} = $templatedir;
- $data->{'cgi'} = $cgi;
- $data->{'config'} = $config;
- $data->{'lang'} = $lang;
- $data->{'langcookie'} = $langcookie;
- $data->{'theme'} = $theme;
- $data->{'themecookie'} = $themecookie;
+ my $this = {};
+ $this->{vhffs} = $vhffs;
+ $this->{templatedir} = $templatedir;
+ $this->{cgi} = $cgi;
+ $this->{config} = $config;
+ $this->{lang} = $lang;
+ $this->{langcookie} = $langcookie;
+ $this->{theme} = $theme;
+ $this->{themecookie} = $themecookie;
+ $this->{errors} = [];
+ bless($this, $class);
- return $data;
+ return $this;
}
@@ -660,6 +694,13 @@
{
my ( $class, $panel, $template, $cookie ) = @_;
+ #FIXME temporary hack
+ if(ref($class)) {
+ $cookie = $template;
+ $template = $panel;
+ $panel = $class;
+ }
+
my $langcookie = "";
$langcookie = $panel->{'langcookie'} if ( defined $panel->{'langcookie'} );
my $themecookie = "";
@@ -670,9 +711,36 @@
my $theme = get_theme( $panel->{'vhffs'} );
$template->param( THEME => $theme );
+ if(@{$panel->{errors}} > 0) {
+ my $tmplerrors = new HTML::Template( filename => $panel->{templatedir}."/misc/errors.tmpl" );
+ $tmplerrors->param( ERRORS => $panel->{errors} );
+ $template->param( ERRORS => $tmplerrors->output );
+ }
+
print $template->output;
return;
}
+=pod
+
+=head2 redirect
+
+ $panel->redirect($page, $cookie);
+
+Issues a redirection header sending to $page
+(you can specify an additional cookie to be send).
+
+This function never returns.
+
+B<C<$page> should be an absolute path>
+
+=cut
+sub redirect {
+ my ($self, $dest, $cookie) = @_;
+ print "Set-Cookie: $cookie\n";
+ print CGI::redirect($dest);
+ exit(0);
+}
+
1;
Modified: branches/vhffs_4.1/vhffs-panel/auth.pl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/auth.pl 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/auth.pl 2007-03-28 13:11:45 UTC (rev 533)
@@ -40,43 +40,47 @@
use lib "/usr/share/vhffs/api/";
use Vhffs::Main;
use Vhffs::Panel::Main;
+use Vhffs::Panel::Commons;
use Vhffs::Constants;
my $panel = new_light Vhffs::Panel::Main();
my $vhffs = $panel->{'vhffs'};
my $templatedir = $panel->{'templatedir'};
+my $cgi = $panel->{cgi};
+my $submitted = defined($cgi->param('login_submit'));
-my $hostname = $vhffs->get_config->get_host_name;
+if($submitted) {
+ # User tried to log in
+ # we try to clean the previous session
+ my $oldsid = CGI->cookie('session');
+ if( $oldsid ) {
+ my $oldsession = new CGI::Session(undef, $oldsid, {Directory=>'/tmp'});
+ $oldsession->delete();
+ }
-#my $template = new HTML::Template( filename => $templatedir."/main/auth.tmpl", associate => $cgi );
-my $template = new HTML::Template( filename => $templatedir."/main/auth.tmpl" );
+ my $username = $cgi->param('username');
+ my $password = $cgi->param('password');
+ my $user;
+ $user = Vhffs::User::get_by_username($vhffs, $username) if(defined $username);
-$template->param( TITLE => gettext("VHFFS Login") );
-$template->param( TEXT_WELCOME => sprintf( gettext("Welcome on %s") , $hostname ) );
-$template->param( VHFFS_INFO => sprintf( "Run VHFFS %s (%s)" , Vhffs::Constants::VHFFS_VERSION , Vhffs::Constants::VHFFS_RELEASE_NAME ) );
-$template->param( TEXT_PLEASEIDENTIFY => gettext("Please enter your username and password") );
-$template->param( TEXT_USERNAME => gettext("Username") );
-$template->param( TEXT_PASSWORD => gettext("Password") );
-$template->param( TEXT_LOGIN => gettext("Access to panel") );
-$template->param( TEXT_LOSTPASSWORD => gettext("I've lost my password") );
-$template->param( TEXT_SUBSCRIBE => gettext("Subscribe") );
+ #Incomplete input
+ if( ! defined( $username ) || ! defined ( $password ) || !defined $user
+ || !$user->check_password( $password )) {
+ $panel->add_error( gettext('Login failed !') );
+ } elsif($user->get_status != Vhffs::Constants::ACTIVATED) {
+ $panel->add_error( gettext('User is not active yet') );
+ } else {
+ # Creates the new session
+ my $session = new CGI::Session("driver:File", undef, {Directory=>'/tmp'});
+ $session->expires("+1h");
+ $session->param("username", $user->get_username);
+ $session->param("uid", $user->get_uid);
-$template->param( LANGS => Vhffs::Panel::Main::select_lang( $vhffs ) );
-
-
-if( $vhffs->get_config->stats_on_home == 1 )
-{
- use Vhffs::Stats;
- my $stats = new Vhffs::Stats( $vhffs );
- my $users = $stats->get_user_total;
- my $groups = $stats->get_groups_total;
-
- $template->param( TEXT_STATS => sprintf( gettext( "Woah, %s users and %s groups already trust %s" ) , $users, $groups , $hostname ) );
+ my $cookie = new CGI::Cookie(-name => $session->name, -value => $session->id);
+ $panel->redirect('/panel.pl', $cookie);
+ }
}
-if( $vhffs->get_config->get_panel_public == 1 )
-{
- $template->param( TEXT_PUBLIC => gettext( "Go to public area" ) );
+if(!$submitted || $panel->has_errors) {
+ Vhffs::Panel::Commons::display_login($vhffs, $panel);
}
-
-display_light Vhffs::Panel::Main( $panel , $template );
Deleted: branches/vhffs_4.1/vhffs-panel/login.pl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/login.pl 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/login.pl 2007-03-28 13:11:45 UTC (rev 533)
@@ -1,120 +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 HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use strict;
-use Crypt::PasswdMD5;
-use lib "/usr/share/vhffs/api/";
-use Vhffs::Misc::Salt;
-
-use Vhffs::User;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-
-my $panel = new_light Vhffs::Panel::Main();
-my $vhffs = $panel->{'vhffs'};
-
-# we try to clean the previous session
-my $oldsid = CGI->cookie("session");
-if( $oldsid ) {
- my $oldsession = new CGI::Session(undef, $oldsid, {Directory=>'/tmp'});
- $oldsession->delete();
-}
-
-
-# fetch user login and password
-my $cgi = $panel->{'cgi'};
-my $username = $cgi->param("username");
-my $password = $cgi->param("password");
-my $user = Vhffs::User::get_by_username( $vhffs, $username );
-
-my $templatedir = $panel->{'templatedir'};
-my $template;
-
-
-#If platform is closed, the user cannot log in
-if( $vhffs->get_config->get_panel_open == 0 )
-{
- $template = new HTML::Template( filename => $templatedir."/main/close.tmpl" );
- $template->param( TITLE => gettext("Platform temporary closed") );
- $template->param( TEXT_CLOSE => gettext("Platform temporary closed.") );
- $template->param( TEXT_EXPLAIN => gettext("This platform is temporary closed. Administrators are performing some maintenances tasks. Please come back in a few minutes to log in.") );
- display_light Vhffs::Panel::Main( $panel , $template );
- exit 0;
-}
-
-
-#Incomplete input
-if( ( ! defined( $username ) ) || ( ! defined ( $password ) ) || ( ! defined $user ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/main/login_failed.tmpl" );
- $template->param( TITLE => gettext("VHFFS Login failed") );
- $template->param( TEXT_LOGINFAILED => gettext("Login failed !") );
- $template->param( TEXT_LOGIN => gettext("Login") );
-
- display_light Vhffs::Panel::Main( $panel , $template );
- exit 0;
-}
-
-#Validate password and user
-if( $user->check_password( $password ) && $user->get_status == Vhffs::Constants::ACTIVATED )
-{
- my $session = new CGI::Session("driver:File", undef, {Directory=>'/tmp'});
- $session->expires("+1h");
- $session->param("username", $user->get_username);
- $session->param("uid", $user->get_uid);
-
- my $sid = $session->id();
- my $cookie = CGI->cookie(session => $sid);
-
- $template = new HTML::Template( filename => $templatedir."/main/login_ok.tmpl" );
- $template->param( TITLE => gettext("VHFFS Login OK") );
- $template->param( TEXT_PLEASEWAIT => gettext("Login OK, please wait...") );
- $template->param( TEXT_PANEL => gettext("Panel Access") );
-
- display_light Vhffs::Panel::Main( $panel , $template , $cookie);
- exit 0;
-}
-
-
-$template = new HTML::Template( filename => $templatedir."/main/login_failed.tmpl" );
-$template->param( TITLE => gettext("VHFFS Login failed") );
-$template->param( TEXT_LOGINFAILED => gettext("Login failed !") );
-$template->param( TEXT_LOGIN => gettext("Login") );
-
-display_light Vhffs::Panel::Main( $panel , $template );
Modified: branches/vhffs_4.1/vhffs-panel/logout.pl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/logout.pl 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/logout.pl 2007-03-28 13:11:45 UTC (rev 533)
@@ -45,7 +45,7 @@
my $templatedir = $panel->{'templatedir'};
#clean session
-my $sid = CGI->cookie("session");
+my $sid = CGI->cookie(CGI::Session::name());
if( $sid )
{
my $session = new CGI::Session(undef, $sid, {Directory=>'/tmp'});
Modified: branches/vhffs_4.1/vhffs-panel/templates/main/auth.tmpl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/templates/main/auth.tmpl 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/templates/main/auth.tmpl 2007-03-28 13:11:45 UTC (rev 533)
@@ -22,8 +22,9 @@
- <form action="/login.pl" method="post">
+ <form action="/auth.pl" method="post">
<h2><tmpl_var name="TEXT_PLEASEIDENTIFY"></h2>
+ <tmpl_var name="errors">
<p>
<label for="username">
<tmpl_var name="TEXT_USERNAME">
@@ -37,7 +38,7 @@
<input type="password" name="password" id="password" maxlength="32" />
</p>
<p class="button">
- <input type="submit" value="<tmpl_var name="TEXT_LOGIN">" />
+ <input type="submit" value="<tmpl_var name="TEXT_LOGIN">" id="login_submit" name="login_submit"/>
</p>
</form>
<div id="sub_opts">
Added: branches/vhffs_4.1/vhffs-panel/templates/misc/errors.tmpl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/templates/misc/errors.tmpl 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/templates/misc/errors.tmpl 2007-03-28 13:11:45 UTC (rev 533)
@@ -0,0 +1,5 @@
+<div id="errors">
+<tmpl_loop name="errors">
+<p class="error"><tmpl_var name="msg"></p>
+</tmpl_loop>
+</div>
Modified: branches/vhffs_4.1/vhffs-panel/templates/user/create.tmpl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/templates/user/create.tmpl 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/templates/user/create.tmpl 2007-03-28 13:11:45 UTC (rev 533)
@@ -19,9 +19,11 @@
<div class="subscribe">
<form method="post" action="subscribe.pl">
- <tmpl_loop name="ERRORS">
- <p style="font-weight:bold;color:red;"><tmpl_var name="ERROR"></p>
- </tmpl_loop>
+ <div id="errors">
+ <tmpl_loop name="ERRORS">
+ <p class="error"><tmpl_var name="ERROR"></p>
+ </tmpl_loop>
+ </div>
<h2><tmpl_var name="TEXT_INFOS"></h2>
<p>
Modified: branches/vhffs_4.1/vhffs-panel/themes/vhffs/main.css
===================================================================
--- branches/vhffs_4.1/vhffs-panel/themes/vhffs/main.css 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/themes/vhffs/main.css 2007-03-28 13:11:45 UTC (rev 533)
@@ -680,6 +680,7 @@
color:red;
text-align: center;
width: 50%;
+ font-weight: bold;
}
Modified: branches/vhffs_4.1/vhffs-panel/themes/vhffs-ng/main.css
===================================================================
--- branches/vhffs_4.1/vhffs-panel/themes/vhffs-ng/main.css 2007-03-27 17:14:04 UTC (rev 532)
+++ branches/vhffs_4.1/vhffs-panel/themes/vhffs-ng/main.css 2007-03-28 13:11:45 UTC (rev 533)
@@ -474,6 +474,7 @@
color:red;
text-align: center;
width: 50%;
+ font-weight:bold;
}