Commit 1833f952 authored by Jérome Perrin's avatar Jérome Perrin

Make ERP5JS login pages look like ERP5JS Dialogs

![login](/uploads/d270b602f784466dcc8d0806ec0ab9e1/image.png)

![recover](/uploads/da5bca427e6053a4724a4f7171db71db/image.png)

![reset password](/uploads/27e3519dfaf96cd66ce3adf9d6184ba8/image.png)


See merge request !1165
parents c432df4b bfaa2863
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div data-gadget-scope='header'> <div data-gadget-scope='header'>
<div class="ui-header"> <div class="ui-header">
<h1><span i18n:domain="ui" i18n:translate="">Recover your account</span></h1> <h1><span i18n:domain="ui" i18n:translate="">Recover your Account</span></h1>
</div> </div>
</div> </div>
...@@ -27,21 +27,29 @@ ...@@ -27,21 +27,29 @@
<article> <article>
<section> <section>
<form method="post" tal:attributes="action python: context.absolute_url()"> <form method="post" tal:attributes="action python: context.absolute_url()" class="field_container">
<section class="ui-content-header-plain">
<h3 class="ui-content-title ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-life-ring"></span>
<tal:block i18n:domain="ui" i18n:translate="">Recover your Account</tal:block>
</h3>
</section>
<div>
<div>
<div class="ui-field-contain"> <div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="">Username</label> <label i18n:domain="ui" i18n:translate="">Username</label>
<div><input autofocus type="text" name="user_login" value="" required=""></div> <div><input autofocus type="text" name="user_login" value="" required=""></div>
</div> </div>
<br/> <div class="dialog_button_container">
<div class="ui-field-contain"> <input type="submit" value="Recover your Account" i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/>
<label></label>
<div><input type="submit" value="Validate" i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/></div>
</div> </div>
<input type="hidden" name="url" tal:attributes="value python: context.absolute_url()" /> <input type="hidden" name="url" tal:attributes="value python: context.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" />
</div>
</div>
</form> </form>
</section> </section>
</article> </article>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div data-gadget-scope='header'> <div data-gadget-scope='header'>
<div class="ui-header"> <div class="ui-header">
<h1><span>Reset your password</span></h1> <h1><span i18n:domain="ui" i18n:translate="">Reset Password</span></h1>
</div> </div>
</div> </div>
...@@ -26,22 +26,30 @@ ...@@ -26,22 +26,30 @@
<article class="ui-content"> <article class="ui-content">
<section> <section>
<form method="post" tal:attributes="action python: context.absolute_url()"> <form method="post" tal:attributes="action python: context.absolute_url()" class="field_container">
<section class="ui-content-header-plain">
<h3 class="ui-content-title ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-key"></span>
<tal:block i18n:domain="ui" i18n:translate="">Reset Password</tal:block>
</h3>
</section>
<div>
<div>
<div class="ui-field-contain"> <div class="ui-field-contain">
<label data-i18n="New Password">New Password<span></span></label> <label i18n:domain="ui" i18n:translate="">New Password<span></span></label>
<div><input autofocus name="password" type="password" value="" required=""></div> <div><input autofocus name="password" type="password" value="" required=""></div>
</div> </div>
<div class="ui-field-contain"> <div class="ui-field-contain">
<label data-i18n="New Password Confirmation">New Password Confirmation<span></span></label> <label i18n:domain="ui" i18n:translate="">New Password Confirmation<span></span></label>
<div><input name="password_confirm" type="password" value="" required=""></div> <div><input name="password_confirm" type="password" value="" required=""></div>
</div> </div>
<div class="ui-field-contain"> <div class="dialog_button_container">
<label></label> <input type="submit" value="Reset Password" i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/>
<div><input type="submit" value="Validate" tal:attributes="name python: '%s:method' % (form_action, )"/></div>
</div> </div>
<input type="hidden" name="came_from" tal:attributes="value python: context.absolute_url()" /> <input type="hidden" name="came_from" tal:attributes="value python: context.absolute_url()" />
<input type="hidden" name="password_key" tal:attributes="value python: request.get('reset_key') or ''" /> <input type="hidden" name="password_key" tal:attributes="value python: request.get('reset_key') or ''" />
</div>
</div>
</form> </form>
</section> </section>
</article> </article>
......
<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">
<h1><span i18n:domain="ui" i18n:translate="">Connect</span></h1> <h1><span i18n:domain="ui" i18n:translate="">Log in</span></h1>
</div> </div>
</div> </div>
...@@ -26,9 +27,9 @@ ...@@ -26,9 +27,9 @@
<div class="gadget-content"> <div class="gadget-content">
<article> <article>
<section> <section>
<tal:block tal:condition="exists: request/portal_status_message"> <div class="visible" data-gadget-scope="notification" tal:condition="exists: request/portal_status_message">
<span tal:attributes="data-i18n request/portal_status_message"><span tal:content="request/portal_status_message"></span></span> <button type="submit" class="error" tal:attributes="data-i18n request/portal_status_message"><span tal:content="request/portal_status_message"></span></button>
</tal:block> </div>
</section> </section>
<section tal:condition="not: portal/portal_membership/isAnonymousUser"> <section tal:condition="not: portal/portal_membership/isAnonymousUser">
...@@ -38,8 +39,15 @@ ...@@ -38,8 +39,15 @@
</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()"> <section class="ui-content-header-plain">
<h3 class="ui-content-title ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-sign-in"></span>
<tal:block i18n:domain="ui" i18n:translate="">Log in</tal:block>
</h3>
</section>
<form method="post" tal:attributes="action python: '%s/' % absolute_url" class="field_container">
<div>
<div>
<div class="ui-field-contain"> <div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="" >Username</label> <label i18n:domain="ui" i18n:translate="" >Username</label>
<div><input autofocus type="text" name="__ac_name" value="" required=""></div> <div><input autofocus type="text" name="__ac_name" value="" required=""></div>
...@@ -48,19 +56,15 @@ ...@@ -48,19 +56,15 @@
<label i18n:domain="ui" i18n:translate="" >Password</label> <label i18n:domain="ui" i18n:translate="" >Password</label>
<div><input type="password" name="__ac_password" value="" required="" autocomplete="off" /></div> <div><input type="password" name="__ac_password" value="" required="" autocomplete="off" /></div>
</div> </div>
<div class="ui-field-contain"> <div class="dialog_button_container">
<label></label> <input type="submit" value="Login" i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/>
<div tal:define="absolute_url python:context.absolute_url()">
<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>
<div class="ui-field-contain">
<label></label>
<div><input type="submit" value='Login' i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/></div>
</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" />
......
...@@ -87,14 +87,14 @@ ...@@ -87,14 +87,14 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@value="yanzhen"]</td> <td>//input[@value="tëjju barabu këllu jëfandikookat"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>verifyElementPresent</td>
<td>//input[@value="yanzhen"]</td> <td>//input[@value="tëjju barabu këllu jëfandikookat"]</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@value='Validate']</td> <td>//input[@value='Recover your Account']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//input[@value='Validate']</td> <td>//input[@value='Recover your Account']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@value='Validate']</td> <td>//input[@value='Recover your Account']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//input[@value='Validate']</td> <td>//input[@value='Recover your Account']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@value='Validate']</td> <td>//input[@value='Reset Password']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//input[@value='Validate']</td> <td>//input[@value='Reset Password']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -30,6 +30,7 @@ param_dict = [ ...@@ -30,6 +30,7 @@ param_dict = [
{ 'message': 'Logout', 'translation': 'tuichu', 'language': 'wo'}, { 'message': 'Logout', 'translation': 'tuichu', 'language': 'wo'},
{ 'message': 'User', 'translation': 'yonghu', 'language': 'wo'}, { 'message': 'User', 'translation': 'yonghu', 'language': 'wo'},
{ 'message': 'Username', 'translation': u'turu jëfandikookat', 'language': 'wo'}, { 'message': 'Username', 'translation': u'turu jëfandikookat', 'language': 'wo'},
{ 'message': 'Recover your Account', 'translation': u'tëjju barabu këllu jëfandikookat', 'language': 'wo'},
{ 'message': 'Sort Editor', 'translation': 'paixubianyiqi', 'language': 'wo'}, { 'message': 'Sort Editor', 'translation': 'paixubianyiqi', 'language': 'wo'},
{ 'message': 'Home', 'translation': 'zhuye', 'language': 'wo'}, { 'message': 'Home', 'translation': 'zhuye', 'language': 'wo'},
{ 'message': 'State', 'translation': 'zhuangtai', 'language': 'wo'}, { 'message': 'State', 'translation': 'zhuangtai', 'language': 'wo'},
......
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