Updated login form template
authorThierry Florac <tflorac@ulthar.net>
Wed, 26 Sep 2018 16:59:23 +0200
changeset 143 1f7c69bb2e25
parent 142 ab435a3efe2f
child 144 8487f9c9fab0
Updated login form template
src/pyams_security/views/templates/login-header.pt
--- a/src/pyams_security/views/templates/login-header.pt	Tue Sep 18 16:25:33 2018 +0200
+++ b/src/pyams_security/views/templates/login-header.pt	Wed Sep 26 16:59:23 2018 +0200
@@ -1,11 +1,18 @@
 <tal:var i18n:domain="pyams_security">
 	<h3 class="modal-title"
-		tal:define="config tales:configuration;
-					back_config tales:back_configuration;">
-		<tal:if condition="config.logo">
-			<img tal:define="href tales:absolute_url(config.logo)"
-				 tal:attributes="src string:${href}/++thumb++200x70.png;">
-		</tal:if>
-		<span class="title" tal:content="i18n:back_config.title">Title</span>
+		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>
+			</tal:if>
+			<tal:if case="False">
+				<img tal:define="href tales:absolute_url(back_config.logo)"
+					 src="${href}?_=${tales:timestamp(back_config.logo)}" />
+				<span class="title" tal:content="i18n:back_config.title">Title</span>
+			</tal:if>
+		</tal:switch>
 	</h3>
 </tal:var>