Commit ce188e62 authored by Clément OUDOT's avatar Clément OUDOT

Manage logo customization in Choice (#911)

parent 7fd1813e
......@@ -70,8 +70,8 @@
<div class="form">
<TMPL_IF NAME="module">
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="module">.png" alt="<TMPL_VAR NAME="module">" class="img-thumbnail" />
<TMPL_IF NAME="logoFile">
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="logoFile">" alt="<TMPL_VAR NAME="module">" class="img-thumbnail" />
</TMPL_IF>
<TMPL_INCLUDE NAME="checklogins.tpl">
......
......@@ -66,9 +66,9 @@
<TMPL_IF NAME="logo">
<TMPL_IF NAME="module">
<TMPL_IF NAME="logoFile">
<div class="authLogo">
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="module">.png" />
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="logoFile">" alt="<TMPL_VAR NAME="module">" />
</div>
</TMPL_IF>
......
......@@ -49,9 +49,9 @@
<h3><lang en="Please enter your credentials" fr="Merci de vous authentifier"/></h3>
<table>
<TMPL_IF NAME="module">
<TMPL_IF NAME="logoFile">
<tr class="authLogo"><td>
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="module">.png" alt="" />
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="logoFile">" alt="<TMPL_VAR NAME="module">" />
</td></tr>
</TMPL_IF>
......@@ -136,7 +136,7 @@
<table>
<TMPL_IF NAME="module">
<tr class="authLogo"><td>
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="module">.png" alt="" />
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/<TMPL_VAR NAME="module">.png" alt="<TMPL_VAR NAME="module">" />
</td></tr>
</TMPL_IF>
......
......@@ -9,7 +9,7 @@ package Lemonldap::NG::Portal::_Choice;
use Lemonldap::NG::Portal::Simple;
use Scalar::Util 'weaken';
our $VERSION = '1.4.0';
our $VERSION = '1.9.0';
## @cmethod Lemonldap::NG::Portal::_Choice new(Lemonldap::NG::Portal::Simple portal)
# Constructor
......@@ -213,6 +213,14 @@ sub _buildAuthLoop {
'debug' );
$optionsLoop->{$displayType} = 1;
# If displayType is logo, check if key.png is available
if (
-e $self->getApacheHtdocsPath . "/skins/common/" . $_ . ".png" )
{
$optionsLoop->{logoFile} = $_ . ".png";
}
else { $optionsLoop->{logoFile} = $auth . ".png"; }
# Register item in loop
push @authLoop, $optionsLoop;
......
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