Commit eea1fedd authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Better look of OpenID Provider list (#183)

parent 44c64ea6
......@@ -17,7 +17,13 @@
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title"><lang en="Confirmation" fr="Confirmation"/></h3>
<h3 class="panel-title">
<TMPL_IF NAME="LIST">
<lang en="Select your Identity Provider" fr="Choisissez votre fournisseur d'identité"/>
<TMPL_ELSE>
<lang en="Confirmation" fr="Confirmation"/>
</TMPL_IF>
</h3>
</div>
<div class="panel-body form">
......@@ -25,22 +31,31 @@
<TMPL_IF NAME="LIST">
<h3><lang en="Select your Identity Provider" fr="Choisissez votre fournisseur d'identité"/></h3>
<input type="hidden" id="idp" name="idp"/>
<div class="row">
<TMPL_LOOP NAME="LIST">
<button type="submit" class="positive btn btn-info" onclick="$('#idp').val('<TMPL_VAR NAME="VAL">')">
<span class="glyphicon glyphicon-chevron-right"></span>
<div class="col-sm-6 <TMPL_VAR NAME="class">">
<button type="submit" class="btn btn-info" onclick="$('#idp').val('<TMPL_VAR NAME="VAL">')">
<TMPL_IF NAME="icon">
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="icon">" class="glyphicon" />
<TMPL_ELSE>
<i class="glyphicon glyphicon-chevron-right"></i>
</TMPL_IF>
<TMPL_VAR NAME="NAME">
</button>
</div>
</TMPL_LOOP>
</div>
<TMPL_IF NAME="REMEMBER">
<div class="checkbox">
<label for="remember">
<input type="checkbox" id="remember" name="cookie_type" value="1">
<lang en="Remember my choice" fr="Se souvenir de mon choix"/>
</label>
</div>
</TMPL_IF>
<TMPL_ELSE>
......@@ -66,6 +81,8 @@
</TMPL_IF>
<hr />
<TMPL_INCLUDE NAME="checklogins.tpl">
</div>
......
......@@ -90,6 +90,17 @@ p.notifCheck label {
display: inline-block;
}
/* OpenID Connect list */
div.openidconnect button {
height: 60px;
width: 160px;
margin-bottom: 5px;
}
div.openidconnect button img {
height: 30px;
}
@media (min-width: 768px) {
div.application {
height: 80px;
......
......@@ -184,15 +184,19 @@ sub extractFormInfo {
# IDP list
my @list = ();
foreach ( keys %{ $self->{_oidcOPList} } ) {
foreach ( sort keys %{ $self->{_oidcOPList} } ) {
push @list,
{
val => $_,
name => $self->{oidcOPMetaDataOptions}->{$_}
->{oidcOPMetaDataOptionsDisplayName},
icon => $self->{oidcOPMetaDataOptions}->{$_}
->{oidcOPMetaDataOptionsIcon},
class => "openidconnect",
};
}
$self->{list} = \@list;
$self->{list} = \@list;
$self->{confirmRemember} = 0;
$self->{login} = 1;
return PE_CONFIRM;
......
......@@ -11,7 +11,7 @@ use Lemonldap::NG::Portal::Simple;
use Lemonldap::NG::Portal::_SAML; #inherits
use Lemonldap::NG::Common::Conf::SAML::Metadata;
our $VERSION = '1.4.2';
our $VERSION = '2.00';
our @ISA = qw(Lemonldap::NG::Portal::_SAML);
## @apmethod int authInit()
......@@ -801,7 +801,8 @@ sub extractFormInfo {
name => $self->{_idpList}->{$_}->{name}
};
}
$self->{list} = \@list;
$self->{list} = \@list;
$self->{confirmRemember} = 1;
# Delete existing IDP resolution cookie
push @{ $self->{cookie} },
......
......@@ -9,7 +9,7 @@ use strict;
use Lemonldap::NG::Portal::Simple;
use utf8;
our $VERSION = '1.4.0';
our $VERSION = '2.00';
## @method array display()
# Call portal process and set template parameters
......@@ -152,6 +152,7 @@ sub display {
ASK_LOGINS => $self->{checkLogins},
CONFIRMKEY => $self->stamp(),
LIST => $self->{list} || [],
REMEMBER => $self->{confirmRemember},
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment