Commit 6cb331f8 authored by Gabriel Monnerat's avatar Gabriel Monnerat Committed by Jérome Perrin

erp5_credential: Add link to login in ERP5 with Google Account and use...

erp5_credential: Add link to login in ERP5 with Google Account and use zocial.min.css to display it nicely
parent f31612ef
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
xmlns:i18n="http://xml.zope.org/namespaces/i18n"> xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block tal:define="form_action string:logged_in; <tal:block tal:define="form_action string:logged_in;
global form_id string:login_form; global form_id string:login_form;
enable_google_login python: getattr(context.getPortalObject().portal_skins, 'erp5_oauth_google_login', None) is not None;
css_list python: enable_google_login and ['%s/zocial.min.css' % here.portal_url()] or [];
js_list python: ['%s/login_form.js' % (here.portal_url(), ), '%s/erp5.js' % (here.portal_url(), )]"> js_list python: ['%s/login_form.js' % (here.portal_url(), ), '%s/erp5.js' % (here.portal_url(), )]">
<tal:block metal:use-macro="here/main_template/macros/master"> <tal:block metal:use-macro="here/main_template/macros/master">
<tal:block metal:fill-slot="main"> <tal:block metal:fill-slot="main">
...@@ -45,7 +47,17 @@ ...@@ -45,7 +47,17 @@
<a tal:attributes="href string:${here/portal_url}/ERP5Site_viewCredentialRecoveryLoginDialog" <a tal:attributes="href string:${here/portal_url}/ERP5Site_viewCredentialRecoveryLoginDialog"
i18n:translate="" i18n:domain="ui">Can't access your account ?</a> i18n:translate="" i18n:domain="ui">Can't access your account ?</a>
</div> </div>
<p class="clear"></p>
</div> </div>
<tal:block tal:condition="enable_google_login">
<div class="field">
<label>&nbsp;</label>
<div class="input">
<a tal:attributes="href string:${here/portal_url}/ERP5Site_redirectToGoogleLoginPage"
i18n:translate="" i18n:domain="ui" class="zocial google">Login with Google</a>
</div>
</div>
</tal:block>
</fieldset> </fieldset>
<script type="text/javascript">setFocus()</script> <script type="text/javascript">setFocus()</script>
<p i18n:translate="" i18n:domain="ui">Having trouble logging in? Make sure to enable cookies in your web browser.</p> <p i18n:translate="" i18n:domain="ui">Having trouble logging in? Make sure to enable cookies in your web browser.</p>
......
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