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

Support URL for application logo (#183)

parent 15cfb0ed
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="col-sm-6 <TMPL_VAR NAME="class">"> <div class="col-sm-6 <TMPL_VAR NAME="class">">
<button type="submit" class="btn btn-info" onclick="$('#idp').val('<TMPL_VAR NAME="VAL">')"> <button type="submit" class="btn btn-info" onclick="$('#idp').val('<TMPL_VAR NAME="VAL">')">
<TMPL_IF NAME="icon"> <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> <TMPL_ELSE>
<i class="glyphicon glyphicon-chevron-right"></i> <i class="glyphicon glyphicon-chevron-right"></i>
</TMPL_IF> </TMPL_IF>
......
...@@ -210,14 +210,30 @@ sub extractFormInfo { ...@@ -210,14 +210,30 @@ sub extractFormInfo {
# IDP list # IDP list
my @list = (); my @list = ();
my $portalPath = $self->{portal};
$portalPath =~ s#^https?://[^/]+/?#/#;
$portalPath =~ s#[^/]+\.pl$##;
foreach (@oplist) { 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, push @list,
{ {
val => $_, val => $_,
name => $self->{oidcOPMetaDataOptions}->{$_} name => $name,
->{oidcOPMetaDataOptionsDisplayName}, icon => $img_src,
icon => $self->{oidcOPMetaDataOptions}->{$_}
->{oidcOPMetaDataOptionsIcon},
class => "openidconnect", 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