Login form is displayed (#595)
This commit is contained in:
parent
6fad31a608
commit
479a3fac28
|
@ -1,5 +1,17 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
# TODO: remove this
|
||||
BEGIN {
|
||||
$pwd = `pwd`;
|
||||
chomp $pwd;
|
||||
eval qq{
|
||||
use lib "$pwd/../../lemonldap-ng-common/blib/lib";
|
||||
use lib "$pwd/../../lemonldap-ng-handler/blib/lib";
|
||||
use lib "$pwd/../../lemonldap-ng-portal/blib/lib";
|
||||
use lib "$pwd/../../lemonldap-ng-manager/blib/lib";
|
||||
};
|
||||
die $@ if ($@);
|
||||
}
|
||||
use Plack::Handler::FCGI;
|
||||
use Lemonldap::NG::Portal::Main;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="form">
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i> </span>
|
||||
<input name="user" type="text" value="<TMPL_VAR NAME="LOGIN">" trplaceholder="login" required />
|
||||
<input name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN">" trplaceholder="login" required />
|
||||
</div>
|
||||
|
||||
<div class="form-group input-group">
|
||||
|
|
|
@ -44,6 +44,7 @@ sub display {
|
|||
|
||||
# 1.1 Image mode
|
||||
if ( $req->{error} == PE_IMG_OK || $req->{error} == PE_IMG_NOK ) {
|
||||
$self->lmLog( 'Request for file', 'debug' );
|
||||
return staticFile( "common/"
|
||||
. ( $req->{error} == PE_IMG_OK ? 'ok.png' : 'warning.png' ) );
|
||||
}
|
||||
|
@ -181,12 +182,14 @@ sub display {
|
|||
|
||||
# 2.5 Authentication has been refused OR this is the first access
|
||||
else {
|
||||
$skinfile = 'login';
|
||||
$skinfile = 'login';
|
||||
my $login = $self->userId($req);
|
||||
$login = '' if ( $login eq 'anonymous' );
|
||||
%templateParams = (
|
||||
AUTH_ERROR => $req->error,
|
||||
AUTH_ERROR_TYPE => $req->error_type,
|
||||
AUTH_URL => $self->get_url,
|
||||
LOGIN => $self->user($req),
|
||||
LOGIN => $login,
|
||||
CHECK_LOGINS => $self->conf->{portalCheckLogins},
|
||||
ASK_LOGINS => $self->conf->{checkLogins},
|
||||
DISPLAY_RESETPASSWORD => $self->conf->{portalDisplayResetPassword},
|
||||
|
@ -322,6 +325,7 @@ sub display {
|
|||
%templateParams = ( %templateParams, %$customParams );
|
||||
}
|
||||
|
||||
$self->lmLog( "Skin returned: $skinfile", 'debug' );
|
||||
return $self->sendHtml( $req, "$skinfile", params => \%templateParams );
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user