From 15403213613a5c68a97a5e4bc90e25a705e20658 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Wed, 5 Dec 2007 09:32:53 +0000 Subject: [PATCH] Define editable TALES expression on Person_viewAssignment, as fields from Person_viewFieldLibrary are used in PreferenceTool_viewChangePasswordDialog. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18016 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../Person_viewAssignment/my_password.xml | 41 +++++++++++++++- .../Person_viewAssignment/my_reference.xml | 40 ++++++++++++++-- .../password_confirm.xml | 47 +++++++++++++++++-- .../Person_viewFieldLibrary/my_password.xml | 19 +++----- .../Person_viewFieldLibrary/my_reference.xml | 15 ++---- bt5/erp5_base/bt/revision | 2 +- 6 files changed, 133 insertions(+), 31 deletions(-) diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_password.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_password.xml index be0a59bcf8..21b761841c 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_password.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_password.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> - <tuple/> + <tuple> + <string>Products.ERP5Form.ProxyField</string> + <string>ProxyField</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -20,6 +23,7 @@ <value> <list> <string>title</string> + <string>enabled</string> </list> </value> </item> @@ -61,6 +65,12 @@ <key> <string>tales</string> </key> <value> <dictionary> + <item> + <key> <string>enabled</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -73,6 +83,10 @@ <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -80,6 +94,10 @@ <key> <string>values</string> </key> <value> <dictionary> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string>my_password</string> </value> @@ -102,4 +120,23 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.TALESField</string> + <string>TALESMethod</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: request.AUTHENTICATED_USER.has_permission(\'Set own password\', here)</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_reference.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_reference.xml index 31c87dc4fa..4a57790763 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_reference.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/my_reference.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> - <tuple/> + <tuple> + <string>Products.ERP5Form.ProxyField</string> + <string>ProxyField</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -18,7 +21,9 @@ <item> <key> <string>delegated_list</string> </key> <value> - <list/> + <list> + <string>enabled</string> + </list> </value> </item> <item> @@ -59,6 +64,12 @@ <key> <string>tales</string> </key> <value> <dictionary> + <item> + <key> <string>enabled</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -78,6 +89,10 @@ <key> <string>values</string> </key> <value> <dictionary> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string>my_reference</string> </value> @@ -96,4 +111,23 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.TALESField</string> + <string>TALESMethod</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: request.AUTHENTICATED_USER.has_permission(\'Manage users\', here)</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/password_confirm.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/password_confirm.xml index 91963976ec..7e4dfe8bc4 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/password_confirm.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewAssignment/password_confirm.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> - <tuple/> + <tuple> + <string>Products.ERP5Form.ProxyField</string> + <string>ProxyField</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -21,6 +24,7 @@ <list> <string>title</string> <string>default</string> + <string>enabled</string> </list> </value> </item> @@ -63,11 +67,17 @@ <value> <dictionary> <item> - <key> <string>default</string> </key> + <key> <string>default</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> </item> + <item> + <key> <string>enabled</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -80,6 +90,10 @@ <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -87,6 +101,14 @@ <key> <string>values</string> </key> <value> <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string>my_password</string> </value> @@ -128,4 +150,23 @@ </dictionary> </pickle> </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.TALESField</string> + <string>TALESMethod</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: request.AUTHENTICATED_USER.has_permission(\'Set own password\', here)</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_password.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_password.xml index 96c4688372..aebbfb625c 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_password.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_password.xml @@ -18,7 +18,6 @@ <list> <string>title</string> <string>description</string> - <string>enabled</string> <string>external_validator</string> </list> </value> @@ -62,17 +61,17 @@ <value> <dictionary> <item> - <key> <string>description</string> </key> + <key> <string>description</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>enabled</string> </key> + <key> <string>enabled</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> </item> <item> - <key> <string>external_validator</string> </key> + <key> <string>external_validator</string> </key> <value> <string></string> </value> </item> <item> @@ -88,7 +87,7 @@ <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -99,17 +98,13 @@ <value> <dictionary> <item> - <key> <string>description</string> </key> + <key> <string>description</string> </key> <value> <string>The password of the user.\n \n Leaving this password empty will not modify existing password.</string> </value> </item> <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>external_validator</string> </key> + <key> <string>external_validator</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> </value> @@ -127,7 +122,7 @@ Leaving this password empty will not modify existing password.</string> </value> <value> <string>Click to edit the target</string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>title</string> </key> <value> <string>User Password</string> </value> </item> </dictionary> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_reference.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_reference.xml index 81ee1d26e3..06d47e23a5 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_reference.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewFieldLibrary/my_reference.xml @@ -18,7 +18,6 @@ <list> <string>title</string> <string>description</string> - <string>enabled</string> </list> </value> </item> @@ -61,11 +60,11 @@ <value> <dictionary> <item> - <key> <string>description</string> </key> + <key> <string>description</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>enabled</string> </key> + <key> <string>enabled</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> @@ -83,7 +82,7 @@ <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -94,15 +93,11 @@ <value> <dictionary> <item> - <key> <string>description</string> </key> + <key> <string>description</string> </key> <value> <string>The username this person will use to log in the system.\n \n The system will check that there isn\'t another user with the same username.</string> </value> </item> - <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> - </item> <item> <key> <string>field_id</string> </key> <value> <string>my_string_field</string> </value> @@ -116,7 +111,7 @@ The system will check that there isn\'t another user with the same username.</st <value> <string>Click to edit the target</string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>title</string> </key> <value> <string>User Login</string> </value> </item> </dictionary> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 8a32cf7839..99bc3d5186 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -250 \ No newline at end of file +253 \ No newline at end of file -- 2.30.9