Commit 96207ab1 authored by Clément OUDOT's avatar Clément OUDOT

Support URL for application logo (#183)

parent 15cfb0ed
......@@ -38,7 +38,7 @@
<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" />
<img src="<TMPL_VAR NAME="icon">" class="glyphicon" />
<TMPL_ELSE>
<i class="glyphicon glyphicon-chevron-right"></i>
</TMPL_IF>
......
......@@ -210,14 +210,30 @@ sub extractFormInfo {
# IDP list
my @list = ();
my $portalPath = $self->{portal};
$portalPath =~ s#^https?://[^/]+/?#/#;
$portalPath =~ s#[^/]+\.pl$##;
foreach (@oplist) {
my $name = $self->{oidcOPMetaDataOptions}->{$_}
->{oidcOPMetaDataOptionsDisplayName};
my $icon = $self->{oidcOPMetaDataOptions}->{$_}
->{oidcOPMetaDataOptionsIcon};
my $img_src;
if ($icon) {
$img_src =
( $icon =~ m#^https?://# )
? $icon
: $portalPath . "skins/common/" . $icon;
}
push @list,
{
val => $_,
name => $self->{oidcOPMetaDataOptions}->{$_}
->{oidcOPMetaDataOptionsDisplayName},
icon => $self->{oidcOPMetaDataOptions}->{$_}
->{oidcOPMetaDataOptionsIcon},
val => $_,
name => $name,
icon => $img_src,
class => "openidconnect",
};
}
......
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