Commit 69b85693 authored by Nicolas Delaby's avatar Nicolas Delaby

Various improvements:

- rename field in dialog Raise Data Protection into Description
- Redirect on same object and submit Data Protection Request
- Do not create title
- add Answer field on Data Protection Request view
- add Type field on Data Protection Request view, which displays follow_up_portal_type
- Update listbox columns
- reference can not be deleted
- listbox rows on Erase some data dialog are not url

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33531 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 39fba176
...@@ -57,9 +57,6 @@ ...@@ -57,9 +57,6 @@
portal_type = \'Data Protection Request\'\n portal_type = \'Data Protection Request\'\n
module = portal.getDefaultModule(portal_type)\n module = portal.getDefaultModule(portal_type)\n
current_user = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n current_user = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
title = \'%s: %s - %s\' % (current_user is not None and current_user.getTitle() or \'\',\n
context.getTitle(),\n
getattr(context, \'getReference\', lambda x:x)(\'\'),)\n
\n \n
reference_index = portal.portal_ids.generateNewId(id_group=(\'data_protection_request\'), default=1)\n reference_index = portal.portal_ids.generateNewId(id_group=(\'data_protection_request\'), default=1)\n
reference = \'DPR-%s\' % (reference_index,)\n reference = \'DPR-%s\' % (reference_index,)\n
...@@ -67,11 +64,10 @@ data_protection = module.newContent(portal_type=portal_type,\n ...@@ -67,11 +64,10 @@ data_protection = module.newContent(portal_type=portal_type,\n
contributor_value=current_user,\n contributor_value=current_user,\n
follow_up_value=context,\n follow_up_value=context,\n
description=description,\n description=description,\n
reference=reference,\n reference=reference)\n
title=title)\n data_protection.submit()\n
\n
msg = portal.Base_translateString(\'New data protection request added.\')\n msg = portal.Base_translateString(\'New data protection request added.\')\n
return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items={\'portal_status_message\': msg}, **kw)\n return context.Base_redirect(form_id, keep_items={\'portal_status_message\': msg}, **kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -82,7 +78,7 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items= ...@@ -82,7 +78,7 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>description, **kw</string> </value> <value> <string>description, form_id=\'view\', **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -102,13 +98,14 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items= ...@@ -102,13 +98,14 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>description</string> <string>description</string>
<string>form_id</string>
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
...@@ -116,9 +113,6 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items= ...@@ -116,9 +113,6 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
<string>portal_type</string> <string>portal_type</string>
<string>module</string> <string>module</string>
<string>current_user</string> <string>current_user</string>
<string>None</string>
<string>getattr</string>
<string>title</string>
<string>reference_index</string> <string>reference_index</string>
<string>reference</string> <string>reference</string>
<string>data_protection</string> <string>data_protection</string>
...@@ -135,7 +129,9 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items= ...@@ -135,7 +129,9 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<string>view</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -63,7 +63,8 @@ def filterPropertyMapList(property_map):\n ...@@ -63,7 +63,8 @@ def filterPropertyMapList(property_map):\n
# We assume that categories, dates, and numerical values\n # We assume that categories, dates, and numerical values\n
# doesn\'t carry compromising data\n # doesn\'t carry compromising data\n
restricted_property_list = (\'id\', \'rid\', \'id_group\',\n restricted_property_list = (\'id\', \'rid\', \'id_group\',\n
\'id_generator\', \'last_id\',)\n \'id_generator\', \'last_id\',\n
\'reference\',)\n
return property_map[\'type\'] in (\'string\', \'data\', \'text\',) and \\\n return property_map[\'type\'] in (\'string\', \'data\', \'text\',) and \\\n
property_map[\'id\'] not in restricted_property_list and \\\n property_map[\'id\'] not in restricted_property_list and \\\n
document_to_inspect.getProperty(property_map[\'id\']) and \\\n document_to_inspect.getProperty(property_map[\'id\']) and \\\n
......
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Request Protection</string> </value> <value> <string>Description</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -91,7 +91,9 @@ ...@@ -91,7 +91,9 @@
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list/> <list>
<string>listbox_follow_up_portal_type</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<value> <value>
<list> <list>
<string>columns</string> <string>columns</string>
<string>editable_columns</string>
<string>portal_types</string> <string>portal_types</string>
<string>search_columns</string> <string>search_columns</string>
<string>selection_name</string> <string>selection_name</string>
...@@ -84,13 +85,25 @@ ...@@ -84,13 +85,25 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>title</string> <string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>follow_up_portal_type</string>
<string>Type</string> <string>Type</string>
</tuple> </tuple>
<tuple> <tuple>
<string>description</string> <string>description</string>
<string>Request Description</string> <string>Request Description</string>
</tuple> </tuple>
<tuple>
<string>follow_up_title</string>
<string>Follow Up</string>
</tuple>
<tuple>
<string>contributor_title</string>
<string>Requester</string>
</tuple>
<tuple> <tuple>
<string>translated_validation_state_title</string> <string>translated_validation_state_title</string>
<string>State</string> <string>State</string>
...@@ -98,6 +111,17 @@ ...@@ -98,6 +111,17 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>follow_up_portal_type</string>
<string>Type</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value> <value> <string>my_list_mode_listbox</string> </value>
...@@ -133,13 +157,21 @@ ...@@ -133,13 +157,21 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>title</string> <string>reference</string>
<string>Type</string> <string>Reference</string>
</tuple> </tuple>
<tuple> <tuple>
<string>description</string> <string>description</string>
<string>Request Description</string> <string>Request Description</string>
</tuple> </tuple>
<tuple>
<string>follow_up_title</string>
<string>Follow Up</string>
</tuple>
<tuple>
<string>contributor_title</string>
<string>Requester</string>
</tuple>
<tuple> <tuple>
<string>translated_validation_state_title</string> <string>translated_validation_state_title</string>
<string>State</string> <string>State</string>
...@@ -156,13 +188,21 @@ ...@@ -156,13 +188,21 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>title</string> <string>reference</string>
<string>Type</string> <string>Reference</string>
</tuple> </tuple>
<tuple> <tuple>
<string>description</string> <string>description</string>
<string>Request Description</string> <string>Request Description</string>
</tuple> </tuple>
<tuple>
<string>follow_up_title</string>
<string>Follow Up</string>
</tuple>
<tuple>
<string>contributor_title</string>
<string>Requester</string>
</tuple>
<tuple> <tuple>
<string>translated_validation_state_title</string> <string>translated_validation_state_title</string>
<string>State</string> <string>State</string>
......
...@@ -77,7 +77,9 @@ ...@@ -77,7 +77,9 @@
<item> <item>
<key> <string>bottom</string> </key> <key> <string>bottom</string> </key>
<value> <value>
<list/> <list>
<string>my_text_content</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -92,7 +94,6 @@ ...@@ -92,7 +94,6 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list>
<string>my_text_content</string>
<string>my_owner</string> <string>my_owner</string>
</list> </list>
</value> </value>
...@@ -101,9 +102,9 @@ ...@@ -101,9 +102,9 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>my_title</string>
<string>my_reference</string> <string>my_reference</string>
<string>my_follow_up_title</string> <string>my_follow_up_title</string>
<string>your_follow_up_portal_type</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_title</string> </value> <value> <string>your_follow_up_portal_type</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -121,7 +121,9 @@ ...@@ -121,7 +121,9 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -212,7 +214,7 @@ ...@@ -212,7 +214,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -240,7 +242,7 @@ ...@@ -240,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Title</string> </value> <value> <string>Type</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
...@@ -260,4 +262,20 @@ ...@@ -260,4 +262,20 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getFollowUpValue() is not None and here.getFollowUpValue().getTranslatedPortalType() or None</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -536,7 +536,24 @@ ...@@ -536,7 +536,24 @@
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>property_id</string>
<string>nothing</string>
</tuple>
<tuple>
<string>property_label</string>
<string>nothing</string>
</tuple>
<tuple>
<string>property_description</string>
<string>nothing</string>
</tuple>
<tuple>
<string>property_value</string>
<string>nothing</string>
</tuple>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
22 23
\ 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