Commit 851a2824 authored by Jérome Perrin's avatar Jérome Perrin

web_renderjs_ui: make login pages use same DOM as dialogs

This way, the padding between fields will be applied and the visual
result would be similar as on all other ERP5JS dialogs
parent 073708c2
......@@ -27,21 +27,23 @@
<article>
<section>
<form method="post" tal:attributes="action python: context.absolute_url()">
<div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="">Username</label>
<div><input autofocus type="text" name="user_login" value="" required=""></div>
</div>
<br/>
<div class="ui-field-contain">
<label></label>
<div><input type="submit" value="Validate" i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/></div>
</div>
<form method="post" tal:attributes="action python: context.absolute_url()" class="field_container">
<div>
<div>
<div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="">Username</label>
<div><input autofocus type="text" name="user_login" value="" required=""></div>
</div>
<div class="dialog_button_container">
<input type="submit" value="Validate" i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/>
</div>
<input type="hidden" name="url" tal:attributes="value python: context.absolute_url()" />
<input tal:condition="exists: request/came_from"
type="hidden" name="came_from"
tal:attributes="value request/came_from" />
<input type="hidden" name="url" tal:attributes="value python: context.absolute_url()" />
<input tal:condition="exists: request/came_from"
type="hidden" name="came_from"
tal:attributes="value request/came_from" />
</div>
</div>
</form>
</section>
</article>
......
......@@ -26,22 +26,24 @@
<article class="ui-content">
<section>
<form method="post" tal:attributes="action python: context.absolute_url()">
<div class="ui-field-contain">
<label data-i18n="New Password">New Password<span></span></label>
<div><input autofocus name="password" type="password" value="" required=""></div>
<form method="post" tal:attributes="action python: context.absolute_url()" class="field_container">
<div>
<div>
<div class="ui-field-contain">
<label data-i18n="New Password">New Password<span></span></label>
<div><input autofocus name="password" type="password" value="" required=""></div>
</div>
<div class="ui-field-contain">
<label data-i18n="New Password Confirmation">New Password Confirmation<span></span></label>
<div><input name="password_confirm" type="password" value="" required=""></div>
</div>
<div class="dialog_button_container">
<input type="submit" value="Validate" tal:attributes="name python: '%s:method' % (form_action, )"/>
</div>
<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 ''" />
</div>
</div>
<div class="ui-field-contain">
<label data-i18n="New Password Confirmation">New Password Confirmation<span></span></label>
<div><input name="password_confirm" type="password" value="" required=""></div>
</div>
<div class="ui-field-contain">
<label></label>
<div><input type="submit" value="Validate" tal:attributes="name python: '%s:method' % (form_action, )"/></div>
</div>
<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 ''" />
</form>
</section>
</article>
......
......@@ -39,25 +39,23 @@
</section>
<section tal:condition="portal/portal_membership/isAnonymousUser">
<form method="post" tal:attributes="action python: '%s/' % absolute_url">
<form method="post" tal:attributes="action python: '%s/' % absolute_url" class="field_container">
<div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="" >Username</label>
<div><input autofocus type="text" name="__ac_name" value="" required=""></div>
</div>
<div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="" >Password</label>
<div><input type="password" name="__ac_password" value="" required="" autocomplete="off" /></div>
</div>
<div class="ui-field-contain">
<label></label>
<div>
<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>
<div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="" >Username</label>
<div><input autofocus type="text" name="__ac_name" value="" required=""></div>
</div>
<div class="ui-field-contain">
<label i18n:domain="ui" i18n:translate="" >Password</label>
<div><input type="password" name="__ac_password" value="" required="" autocomplete="off" /></div>
</div>
<div class="dialog_button_container">
<input type="submit" value="Validate" i18n:attributes="value" i18n:domain="ui" tal:attributes="name python: '%s:method' % (form_action, )"/>
<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 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>
......
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