Updated login form template
authortflorac@dagon.home
Sun, 11 Nov 2018 16:16:32 +0100
changeset 148 cbe0696a02de
parent 147 63b6d0d445f6
child 149 6dde0920a74f
Updated login form template
src/pyams_security/views/templates/login-header.pt
--- a/src/pyams_security/views/templates/login-header.pt	Fri Nov 09 10:42:37 2018 +0100
+++ b/src/pyams_security/views/templates/login-header.pt	Sun Nov 11 16:16:32 2018 +0100
@@ -3,14 +3,18 @@
 		tal:define="back_config tales:back_configuration;">
 		<tal:switch switch="bool(back_config.login_logo)">
 			<tal:if case="True">
-				<div class="text-center">
-					<img tal:define="href tales:absolute_url(back_config.login_logo)"
-						 src="${href}?_=${tales:timestamp(back_config.login_logo)}" />
+				<div class="text-center"
+					 tal:define="logo back_config.login_logo">
+					<img tal:define="href tales:absolute_url(login_logo)"
+						 src="${href}?_=${tales:timestamp(logo)}" />
 				</div>
 			</tal:if>
 			<tal:if case="False">
-				<img tal:define="href tales:absolute_url(back_config.logo)"
-					 src="${href}?_=${tales:timestamp(back_config.logo)}" />
+				<tal:var define="logo back_config.logo"
+						 condition="logo">
+					<img tal:define="href tales:absolute_url(logo)"
+						 src="${href}?_=${tales:timestamp(logo)}" />
+				</tal:var>
 				<span class="title" tal:content="i18n:back_config.title">Title</span>
 			</tal:if>
 		</tal:switch>