Commit 02293294 authored by Mayoro Diagne's avatar Mayoro Diagne

2010-07-15 mayoro

* Customise change password dialog according to egov style

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37150 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8f280383
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
<string>widget_space</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>widget_space</string> </key>
<value>
<list>
<string>login</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>EGov_viewChangePasswordForm</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>EGov_viewChangePasswordForm</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</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>from AccessControl import getSecurityManager\n
from Products.ERP5Type.Message import translateString\n
\n
request = context.REQUEST\n
new_password = request.get("new_password")\n
former_password = request.get("current_password")\n
password_confirm = request.get("password_confirm")\n
\n
user = getSecurityManager().getUser()\n
persons = context.acl_users.erp5_users.getUserByLogin(user)\n
person = persons[0]\n
\n
if not person.checkPassword(former_password):\n
msg = translateString("Current password is wrong.")\n
elif new_password != password_confirm:\n
msg = translateString("Confirmation failed, passwords are not equals.")\n
return context.Base_redirect(form_id=\'EGov_viewChangePasswordForm\', keep_items = {\'portal_status_message\' : msg})\n
else:\n
msg = translateString("Password changed.")\n
person.setPassword(new_password)\n
\n
# clear erp5_content_short cache (see _authenticateCredentials in Products.ERP5Security.ERP5UserManager)\n
context.portal_caches.clearCache((\'erp5_content_short\',))\n
return context.WebSite_logout()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id=\'view\', **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form_id</string>
<string>kw</string>
<string>AccessControl</string>
<string>getSecurityManager</string>
<string>Products.ERP5Type.Message</string>
<string>translateString</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>new_password</string>
<string>former_password</string>
<string>password_confirm</string>
<string>user</string>
<string>persons</string>
<string>_getitem_</string>
<string>person</string>
<string>msg</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<string>view</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>EGov_setNewPassword</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</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> <string encoding="cdata"><![CDATA[
<!-- ============================================================== -->\n
<!--\n
Description:\n
This macro render a tabbed search panel.\n
-->\n
\n
<tal:block metal:define-macro="main">\n
<tal:block tal:define="global web_site_url web_site_url | nothing"/>\n
<tal:block tal:condition="not:web_site_url">\n
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n
</tal:block>\n
<div class="tabber">\n
<div class="tabbertab">\n
<h2 i18n:translate="" i18n:domain="ui">Change Password</h2>\n
<div>\n
<div class="fields">\n
<p><tal:block i18n:translate="" i18n:domain="ui">Reference</tal:block></p>\n
<p><tal:block i18n:translate="" i18n:domain="ui">Current Password</tal:block></p>\n
<p><tal:block i18n:translate="" i18n:domain="ui">New Password</tal:block></p>\n
<p><tal:block i18n:translate="" i18n:domain="ui">Confirm New Password</tal:block></p>\n
</div>\n
<div class="fields">\n
<p><input type="text" size="20" id="your_refernce" name="reference" disabled="disabled" \n
tal:attributes="value python: context.portal_membership.getAuthenticatedMember().getUserName()"/></p>\n
<p><input type="password" size="20" id="password" name="current_password" autocomplete="off"/></p>\n
<p><input type="password" size="20" id="password" name="new_password" autocomplete="off"/></p>\n
<p><input type="password" size="20" id="password" name="password_confirm" autocomplete="off"/></p>\n
</div>\n
</div>\n
<div class="clear"></div>\n
<div id="track_button">\n
<input i18n:domain="ui" i18n:attributes="value" type="submit"\n
name="EGov_setNewPassword:method"\n
value="Change Password"/>\n
</div>\n
<div class="clear"></div>\n
</div>\n
</div>\n
<div class="clear"></div>\n
</tal:block>\n
]]></string> </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_viewChangePasswordRenderer</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<a class="print" href="PDFDocument_viewAsPdf"\n <a class="print" href="PDFDocument_viewAsPdf"\n
tal:attributes="href python: context.getPrintFormUrl()" i18n:translate="" i18n:domain="ui">Print</a>\n tal:attributes="href python: context.getPrintFormUrl()" i18n:translate="" i18n:domain="ui">Print</a>\n
</tal:block> \n </tal:block> \n
<a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="PreferenceTool_viewChangePasswordDialog" \n <a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="EGov_viewChangePasswordForm" \n
i18n:translate="" i18n:domain="ui">Change Password</a>\n i18n:translate="" i18n:domain="ui">Change Password</a>\n
<a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" onclick="window.open(this.href, \'egov_help\',\'width=800,height=500,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes\'); return false;" i18n:translate="" i18n:domain="ui">Help</a>\n <a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" onclick="window.open(this.href, \'egov_help\',\'width=800,height=500,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes\'); return false;" i18n:translate="" i18n:domain="ui">Help</a>\n
<tal:block tal:condition="python: not here.portal_membership.isAnonymousUser()">\n <tal:block tal:condition="python: not here.portal_membership.isAnonymousUser()">\n
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" \n <a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" \n
href="./home" i18n:translate="" i18n:domain="ui">Home</a>\n href="./home" i18n:translate="" i18n:domain="ui">Home</a>\n
</tal:block>\n </tal:block>\n
<a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="PreferenceTool_viewChangePasswordDialog" \n <a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="EGov_viewChangePasswordForm" \n
i18n:translate="" i18n:domain="ui">Change Password</a>\n i18n:translate="" i18n:domain="ui">Change Password</a>\n
\n \n
<!--\n <!--\n
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
tal:attributes="href python: context.getPrintFormUrl()" i18n:translate="" i18n:domain="ui">Print</a>\n tal:attributes="href python: context.getPrintFormUrl()" i18n:translate="" i18n:domain="ui">Print</a>\n
</tal:block>\n </tal:block>\n
<!--<a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" i18n:translate="" i18n:domain="ui">Help</a>-->\n <!--<a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" i18n:translate="" i18n:domain="ui">Help</a>-->\n
<a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="PreferenceTool_viewChangePasswordDialog" \n <a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="EGov_viewChangePasswordForm" \n
i18n:translate="" i18n:domain="ui">Change Password</a>\n i18n:translate="" i18n:domain="ui">Change Password</a>\n
<a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" onclick="window.open(this.href, \'egov_help\',\'width=800,height=500,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes\'); return false;" i18n:translate="" i18n:domain="ui">Help</a>\n <a class="help" href="EGov_helpWithContext" tal:attributes="href python:\'help/\' + here.EGov_helpWithContext()" onclick="window.open(this.href, \'egov_help\',\'width=800,height=500,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes\'); return false;" i18n:translate="" i18n:domain="ui">Help</a>\n
<a class="logout" href="WebSite_logout" i18n:translate="" i18n:domain="ui">Logout</a> \n <a class="logout" href="WebSite_logout" i18n:translate="" i18n:domain="ui">Logout</a> \n
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" \n <a class="home" tal:attributes="href python:context.getWebSiteValue().absolute_url()" \n
href="./home" i18n:translate="" i18n:domain="ui">Home</a>\n href="./home" i18n:translate="" i18n:domain="ui">Home</a>\n
\n \n
<a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="PreferenceTool_viewChangePasswordDialog" \n <a class="preferences" tal:condition="python: context.EGov_checkUserIsAPersonOrOrganisation()==True" href="EGov_viewChangePasswordForm" \n
i18n:translate="" i18n:domain="ui">Change Password</a>\n i18n:translate="" i18n:domain="ui">Change Password</a>\n
\n \n
<!--\n <!--\n
......
2010-07-15 mayoro
* Customise change password dialog according to egov style
2010-07-12 mayoro 2010-07-12 mayoro
* Add removed propertysheet PDFForm, needed by PDF Type * Add removed propertysheet PDFForm, needed by PDF Type
......
735 738
\ No newline at end of file \ No newline at end of file
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