Commit 128ead46 authored by Jérome Perrin's avatar Jérome Perrin Committed by Gabriel Monnerat

web_renderjs_ui: move login_page tal:define to <html>

This way we don't need to define absolute_url multiple times
parent f12be98e
<html> <html tal:define="form_action string:WebSite_login;
absolute_url context/absolute_url;
portal context/getPortalObject">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title tal:content="python: here.getPortalObject().getTitle()"></title> <title tal:content="portal/getTitle"></title>
<link rel="stylesheet" href="gadget_erp5_nojqm.css"> <link rel="stylesheet" href="gadget_erp5_nojqm.css">
</head> </head>
<body tal:define="form_action string:WebSite_login; <body>
portal here/getPortalObject">
<div data-gadget-scope='header'> <div data-gadget-scope='header'>
<div class="ui-header"> <div class="ui-header">
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
</section> </section>
<section tal:condition="portal/portal_membership/isAnonymousUser"> <section tal:condition="portal/portal_membership/isAnonymousUser">
<form method="post" tal:attributes="action python: '%s/' % context.absolute_url()"> <form method="post" tal:attributes="action python: '%s/' % absolute_url">
<div class="ui-field-contain"> <div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="" >Login</label> <label i18n:domain="ui" i18n:translate="" >Login</label>
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
</div> </div>
<div class="ui-field-contain"> <div class="ui-field-contain">
<label></label> <label></label>
<div tal:define="absolute_url python:context.absolute_url()"> <div>
<a i18n:domain="ui" i18n:translate="" tal:attributes="href python: '%s/WebSite_viewRecoverAccount?came_from=%s' % (absolute_url, absolute_url)">I forgot my password!</a> <a i18n:domain="ui" i18n:translate="" tal:attributes="href python: '%s/WebSite_viewRecoverAccount?came_from=%s' % (absolute_url, absolute_url)">I forgot my password!</a>
</div> </div>
</div><br/> </div><br/>
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
</div> </div>
<input type="hidden" name="url" tal:attributes="value python: context.absolute_url()" /> <input type="hidden" name="url" tal:attributes="value absolute_url" />
<input tal:condition="exists: request/came_from" <input tal:condition="exists: request/came_from"
type="hidden" name="came_from" type="hidden" name="came_from"
tal:attributes="value request/came_from" /> tal:attributes="value request/came_from" />
......
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