Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
41bbb2be
Commit
41bbb2be
authored
Jan 07, 2016
by
Gabriel Monnerat
Committed by
Kirill Smelkov
Jan 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Extend code to be possible recover password from WebSite using new ERP5 UI
parent
820314a5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
847 additions
and
2 deletions
+847
-2
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/PasswordTool_changeUserPassword.xml
.../erp5_web_renderjs_ui/PasswordTool_changeUserPassword.xml
+81
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/PasswordTool_getSiteUrl.xml
...al_skins/erp5_web_renderjs_ui/PasswordTool_getSiteUrl.xml
+68
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_viewRecoverAccount.xml
...skins/erp5_web_renderjs_ui/WebSite_viewRecoverAccount.xml
+113
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_viewResetPassword.xml
..._skins/erp5_web_renderjs_ui/WebSite_viewResetPassword.xml
+114
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/login_form.xml
...lateItem/portal_skins/erp5_web_renderjs_ui/login_form.xml
+9
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testRenderjsRecoverPassword.xml
...l_tests/renderjs_ui_zuite/testRenderjsRecoverPassword.xml
+293
-0
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/ERP5Site_createPersonToAskAccountRecover.xml
...erjs_ui_test/ERP5Site_createPersonToAskAccountRecover.xml
+87
-0
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.xml
...rjs_ui_test/MailHost_redirectPageToURLFromLastMessage.xml
+82
-0
No files found.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/PasswordTool_changeUserPassword.xml
0 → 100644
View file @
41bbb2be
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
"""\n
The method changeUserPassword ignore came_from if you are in the Web Site context.\n
"""\n
REQUEST = context.REQUEST\n
next_url = context.portal_password.changeUserPassword(password=REQUEST[\'password\'],\n
password_confirmation=REQUEST[\'password_confirm\'],\n
password_key=REQUEST[\'password_key\'],\n
user_login=REQUEST.get(\'user_login\', None),\n
REQUEST=REQUEST)\n
root_url = "%s/" % context.getWebSiteValue().absolute_url()\n
return REQUEST.RESPONSE.redirect("%s&came_from=%s" % (next_url, root_url))\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
*args, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PasswordTool_changeUserPassword
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/PasswordTool_getSiteUrl.xml
0 → 100644
View file @
41bbb2be
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
base_url = context.REQUEST.get("url") or context.absolute_url()\n
return "%s/WebSite_viewResetPassword" % base_url\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PasswordTool_getSiteUrl
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_viewRecoverAccount.xml
0 → 100644
View file @
41bbb2be
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<html class="ui-mobile">
\n
<head>
\n
<meta
charset=
"UTF-8"
>
\n
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no"
>
\n
<title
tal:content=
"python: here.getPortalObject().getTitle()"
></title>
\n
<link
rel=
"stylesheet"
href=
"gadget_erp5.css"
>
\n
<link
rel=
"stylesheet"
href=
"jquerymobile.css"
>
\n
</head>
\n
<body
class=
"ui-mobile-viewport ui-overlay-a"
tal:define=
"form_action string:portal_password/mailPasswordResetRequest;"
>
\n
<div
class=
"ui-hidden-accessible gadget-container"
></div>
\n
<div
data-role=
"page"
data-url=
"/"
tabindex=
"0"
class=
"ui-page ui-page-theme-a ui-page-header-fixed ui-page-active"
style=
"padding-top: 36px; min-height: 939px;"
>
\n
<div
data-role=
"header"
class=
"gadget-header ui-header ui-bar-a ui-header-fixed slidedown"
data-theme=
"a"
data-position=
"fixed"
data-tap-toggle=
"false"
role=
"banner"
>
\n
<span>
\n
<h1
class=
"ui-title"
tal:content=
"python: here.getPortalObject().getTitle()"
></h1>
\n
<div
class=
"ui-controlgroup ui-controlgroup-horizontal ui-btn-right"
>
\n
<div
class=
"ui-controlgroup-controls"
>
\n
</div>
\n
</div>
\n
</span>
\n
<div
class=
"ui-navbar ui-subheader ui-grid-container ui-body-a"
role=
"navigation"
>
\n
\t\t
<ul
class=
"ui-grid-d"
></ul>
\n
</div>
\n
</div>
\n
<div
role=
"main"
class=
"ui-content gadget-content"
>
\n
<article
class=
"ui-content ui-body-c"
>
\n
<section
class=
"ui-content-header-plain"
>
\n
<h3
class=
"ui-content-title ui-body-c"
data-i18n=
"Reset your password"
>
Reset your password
</h3>
\n
</section>
\n
<section
class=
"ui-body-c ui-content-section"
>
\n
<form
class=
"login-form"
method=
"post"
tal:attributes=
"action python: context.absolute_url()"
>
\n
<div
class=
"ui-field-contain"
>
\n
<label
data-i18n=
"Login"
>
Login
<span></span></label>
\n
<div
class=
"ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"
><input
autofocus
type=
"text"
name=
"user_login"
placeholder=
"Ex: john"
value=
""
required=
""
></div>
\n
</div>
\n
<br/>
\n
<div
class=
"ui-btn ui-input-btn ui-btn-b ui-corner-all ui-shadow ui-btn-inline"
>
Validate
<input
data-theme=
"b"
data-inline=
"true"
type=
"submit"
data-i18n=
"[value]Validate"
value=
"Validate"
data-icon=
"check"
tal:attributes=
"name python: \'%s:method\' % (form_action, )"
/></div>
\n
<input
type=
"hidden"
name=
"url"
tal:attributes=
"value python: context.absolute_url()"
/>
\n
<input
tal:condition=
"exists: request/came_from"
\n
type=
"hidden"
name=
"came_from"
\n
tal:attributes=
"value request/came_from"
/>
\n
</form>
\n
</section>
\n
</article>
\n
</div>
\n
</div>
\n
<div
class=
"ui-loader ui-corner-all ui-body-a ui-loader-default"
><h1>
loading
</h1></div><div
class=
"ui-panel-dismiss"
></div>
\n
</body>
\n
</html>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebSite_viewRecoverAccount
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_viewResetPassword.xml
0 → 100644
View file @
41bbb2be
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<html class="ui-mobile">
\n
<head>
\n
<meta
charset=
"UTF-8"
>
\n
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no"
>
\n
<title
tal:content=
"python: here.getPortalObject().getTitle()"
></title>
\n
<link
rel=
"stylesheet"
href=
"gadget_erp5.css"
>
\n
<link
rel=
"stylesheet"
href=
"jquerymobile.css"
>
\n
</head>
\n
<body
class=
"ui-mobile-viewport ui-overlay-a"
tal:define=
"form_action string:portal_password/PasswordTool_changeUserPassword;"
>
\n
<div
class=
"ui-hidden-accessible gadget-container"
></div>
\n
<div
data-role=
"page"
data-url=
"/"
tabindex=
"0"
class=
"ui-page ui-page-theme-a ui-page-header-fixed ui-page-active"
style=
"padding-top: 36px; min-height: 939px;"
>
\n
<div
data-role=
"header"
class=
"gadget-header ui-header ui-bar-a ui-header-fixed slidedown"
data-theme=
"a"
data-position=
"fixed"
data-tap-toggle=
"false"
role=
"banner"
>
\n
<span>
\n
<h1
class=
"ui-title"
tal:content=
"python: here.getPortalObject().getTitle()"
></h1>
\n
<div
class=
"ui-controlgroup ui-controlgroup-horizontal ui-btn-right"
>
\n
<div
class=
"ui-controlgroup-controls"
>
\n
</div>
\n
</div>
\n
</span>
\n
<div
class=
"ui-navbar ui-subheader ui-grid-container ui-body-a"
role=
"navigation"
>
\n
\t\t
<ul
class=
"ui-grid-d"
></ul>
\n
</div>
\n
</div>
\n
<div
role=
"main"
class=
"ui-content gadget-content"
>
\n
<article
class=
"ui-content ui-body-c"
>
\n
<section
class=
"ui-content-header-plain"
>
\n
<h3
class=
"ui-content-title ui-body-c"
data-i18n=
"Reset your password"
>
Reset your password
</h3>
\n
</section>
\n
<section
class=
"ui-body-c ui-content-section"
>
\n
<form
class=
"login-form"
method=
"post"
tal:attributes=
"action python: context.absolute_url()"
>
\n
<div
class=
"ui-field-contain"
>
\n
<label
data-i18n=
"New Password"
>
New Password
<span></span></label>
\n
<div
class=
"ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"
><input
autofocus
type=
"text"
name=
"password"
type=
"password"
placeholder=
"Ex: A1bcF$99"
value=
""
required=
""
></div>
\n
</div>
\n
<div
class=
"ui-field-contain"
>
\n
<label
data-i18n=
"Retype New Password"
>
Retype New Password
<span></span></label>
\n
<div
class=
"ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"
><input
type=
"text"
name=
"password_confirm"
type=
"password"
placeholder=
"Ex: A1bcF$99"
value=
""
required=
""
></div>
\n
</div>
\n
<div
class=
"ui-btn ui-input-btn ui-btn-b ui-corner-all ui-shadow ui-btn-inline"
>
Validate
<input
data-theme=
"b"
data-inline=
"true"
type=
"submit"
data-i18n=
"[value]Validate"
value=
"Validate"
data-icon=
"check"
tal:attributes=
"name python: \'%s:method\' % (form_action, )"
/></div>
\n
<input
type=
"hidden"
name=
"came_from"
tal:attributes=
"value python: context.absolute_url()"
/>
\n
<input
type=
"hidden"
name=
"password_key"
tal:attributes=
"value python: request.get(\'reset_key\') or \'\'"
/>
\n
</form>
\n
</section>
\n
</article>
\n
</div>
\n
</div>
\n
<div
class=
"ui-loader ui-corner-all ui-body-a ui-loader-default"
><h1>
loading
</h1></div><div
class=
"ui-panel-dismiss"
></div>
\n
</body>
\n
</html>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebSite_viewResetPassword
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/login_form.xml
View file @
41bbb2be
...
...
@@ -71,6 +71,9 @@
<div
role=
"main"
class=
"ui-content gadget-content"
>
\n
<article
class=
"ui-content ui-body-c"
>
\n
<section
class=
"ui-content-header-plain"
>
\n
<tal:block
tal:condition=
"exists: request/portal_status_message"
>
\n
<span
tal:attributes=
"data-i18n request/portal_status_message"
><span
tal:content=
"request/portal_status_message"
></span></span>
\n
</tal:block>
\n
<h3
class=
"ui-content-title ui-body-c"
data-i18n=
"Connect"
>
Connect
</h3>
\n
</section>
\n
<section
class=
"ui-body-c ui-content-section"
>
\n
...
...
@@ -83,11 +86,15 @@
<div
class=
"ui-field-contain"
>
\n
<label
data-i18n=
"Password"
>
Password
<span></span></label>
\n
<div
class=
"ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"
><input
type=
"password"
name=
"__ac_password"
placeholder=
"Ex: A1bcF$99"
value=
""
required=
""
></div>
\n
</div>
\n
<div
class=
"ui-field-contain"
>
\n
<label></label>
\n
<div
tal:define=
"absolute_url python:context.absolute_url()"
>
\n
<a
tal:attributes=
"href python: \'%s/WebSite_viewRecoverAccount?came_from=%s\' % (absolute_url, absolute_url)"
>
I forgot my password!
</a>
\n
</div>
\n
</div><br/>
\n
<div
class=
"ui-btn ui-input-btn ui-btn-b ui-corner-all ui-shadow ui-btn-inline"
>
Log In
<input
data-theme=
"b"
data-inline=
"true"
type=
"submit"
data-i18n=
"[value]Log In"
value=
"Login"
data-icon=
"check"
tal:attributes=
"name python: \'%s:method\' % (form_action, )"
/></div>
\n
\n
<input
type=
"hidden"
name=
"url"
tal:attributes=
"value python: context.absolute_url()"
/>
\n
\n
<input
tal:condition=
"exists: request/came_from"
\n
type=
"hidden"
name=
"came_from"
\n
tal:attributes=
"value request/came_from"
/>
\n
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testRenderjsRecoverPassword.xml
0 → 100644
View file @
41bbb2be
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">
\n
<head>
\n
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
\n
<title>
Test RenderJS UI
</title>
\n
</head>
\n
<body>
\n
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
\n
<thead>
\n
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test RenderJS UI
</td></tr>
\n
</thead><tbody>
\n
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
\n
\n
<!-- Clean Up -->
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/bar_module/ListBoxZuite_reset
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
Reset Successfully.
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/ERP5Site_setupDummyMailHost
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
True
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/ERP5Site_createPersonToAskAccountRecover
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
OK
</td>
\n
<td></td>
\n
</tr>
\n
\n
<!-- Initialize -->
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/web_site_module/renderjs_runner/
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//button[@data-i18n=\'Menu\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
click
</td>
\n
<td>
//button[@data-i18n=\'Menu\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//a[@data-i18n=\'Logout\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
click
</td>
\n
<td>
//a[@data-i18n=\'Logout\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@value=\'Confirm\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
click
</td>
\n
<td>
//input[@value=\'Confirm\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@value=\'Login\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
Login
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
Password
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
clickAndWait
</td>
\n
<td>
//form[@class="login-form"]//a[text()="I forgot my password!"]
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@name=\'user_login\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@value=\'Validate\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
Login
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@name=\'user_login\']
</td>
\n
<td>
user_a_test
</td>
\n
</tr>
\n
<tr>
\n
<td>
click
</td>
\n
<td>
//input[@value=\'Validate\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@value=\'Login\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//form[@class="login-form"]//a[text()="I forgot my password!"]
</td>
\n
<td></td>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
Login
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
Password
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
An email has been sent to you.
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/MailHost/MailHost_redirectPageToURLFromLastMessage
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@value=\'Validate\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@name=\'password\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@name=\'password_confirm\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@name=\'password\']
</td>
\n
<td>
123
</td>
\n
</tr>
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@name=\'password_confirm\']
</td>
\n
<td>
123
</td>
\n
</tr>
\n
<tr>
\n
<td>
click
</td>
\n
<td>
//input[@value=\'Validate\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@name=\'__ac_name\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@name=\'__ac_password\']
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
assertTextPresent
</td>
\n
<td>
Password changed.
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@name=\'__ac_name\']
</td>
\n
<td>
user_a_test
</td>
\n
</tr>
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@name=\'__ac_password\']
</td>
\n
<td>
123
</td>
\n
</tr>
\n
<tr>
\n
<td>
click
</td>
\n
<td>
//input[@value=\'Login\']
</td>
\n
<td></td>
\n
</tr>
\n
<!--As the user don\'t have access to anything(no assignment), he come back to login page -->
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@name=\'__ac_name\']
</td>
\n
<td></td>
\n
</tr>
\n
</tbody></table>
\n
</body>
\n
</html>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testRenderjsRecoverPassword
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/ERP5Site_createPersonToAskAccountRecover.xml
0 → 100644
View file @
41bbb2be
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
alpha = \'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\'\n
new_password = \'\'.join([random.choice(alpha) for i in range(10)])\n
\n
person_module = context.getPortalObject().person_module\n
user_id = "user_a_test"\n
person = getattr(person_module, user_id, None)\n
if person:\n
if person.getReference() != user_id:\n
person.setReference(user_id)\n
else:\n
person = person_module.newContent(portal_type="Person",\n
reference=user_id,\n
id=user_id,\n
password=new_password,\n
default_email_text="userA@example.invalid")\n
assignment = person.newContent(portal_type=\'Assignment\')\n
assignment.open()\n
\n
# Make sure always a new password\n
person.setPassword(new_password)\n
return "OK"\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_createPersonToAskAccountRecover
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.xml
0 → 100644
View file @
41bbb2be
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
last_message = context.getLastLog()[-1]\n
line_list = filter(None, last_message.replace("=\\n","").split("\\n"))\n
for line in line_list:\n
if "http" in line:\n
return context.REQUEST.RESPONSE.redirect(line.replace("=3D", "="))\n
\n
raise RuntimeError("URL not found in the email")\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
MailHost_redirectPageToURLFromLastMessage
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment