summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-22 18:24:28 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-22 18:24:28 +0000
commita663c75503f551857d72354d984970a61fd8cf0f (patch)
tree2ed9bac45e3991f572a9940531603a1e7b029dc3
parent65b8d681240c07dbe5b335082061625d132ccfa5 (diff)
Request handler now working to the point that it properly handles a password that needs to be re-entered.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1305 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB.pm8
-rw-r--r--UI/get_password.html2
-rw-r--r--lsmb-request.pl4
3 files changed, 8 insertions, 6 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index 193e258d..9c082693 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -163,6 +163,7 @@ sub new {
my $locale = LedgerSMB::Locale->get_handle($self->{_user}->{countrycode})
or $self->error(__FILE__.':'.__LINE__.": Locale not loaded: $!\n");
$self->{_locale} = $locale;
+ $self->{stylesheet} = $self->{_user}->{stylesheet};
if ( $self->{password} ) {
if (
!Session::password_check(
@@ -212,7 +213,7 @@ sub new {
sub _get_password {
my ($self) = shift @_;
$self->{sessionexpired} = shift @_;
- @{$self->{hidden}};
+ @{$self->{hidden}} = [];
for (keys %$self){
next if $_ =~ /(^script$|^endsession$|^password$)/;
my $attr = {};
@@ -220,14 +221,15 @@ sub _get_password {
$attr->{value} = $self->{$_};
push @{$self->{hidden}}, $attr;
}
- my $template = Template->new(
+ my $template = LedgerSMB::Template->new(
user =>$self->{_user},
locale => $self->{_locale},
path => 'UI',
- template => 'get_password.html',
+ template => 'get_password',
format => 'HTML'
);
$template->render($self);
+ $template->output('http');
exit;
}
diff --git a/UI/get_password.html b/UI/get_password.html
index 4f3bfc9a..774caea3 100644
--- a/UI/get_password.html
+++ b/UI/get_password.html
@@ -7,7 +7,6 @@
<meta http-equiv="Expires" content="-1" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/<?lsmb stylesheet ?>" type="text/css" />
- <link rel="stylesheet" href="UI/employee.css" type="text/css" />
<meta http-equiv="content-type"
content="text/html; charset=utf-8" />
@@ -39,6 +38,7 @@ function focus_input(){
<?lsmb FOREACH var = hidden ?>
<input name="<?lsmb var.name ?>" type="hidden" value="<?lsmb var.value ?>" />
+<?lsmb END ?>
</form>
</body>
diff --git a/lsmb-request.pl b/lsmb-request.pl
index 66978712..afc3f2a8 100644
--- a/lsmb-request.pl
+++ b/lsmb-request.pl
@@ -52,11 +52,11 @@ if (!$script){
}
eval { require "scripts/$script" }
- || $request->error($locale->text('Unable to open script' . ": $!";
+ || $request->error($locale->text('Unable to open script') . ": $!");
$script =~ s/\.pl$//;
$script = "LedgerSMB::Scripts::$script";
$script->can($request->{action})
- || $request->error($locale->text("Action Not Defined: ") . $request->{action};
+ || $request->error($locale->text("Action Not Defined: ") . $request->{action});
$script->can($request->{action})->($request);