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 @@
portal_type = \'Data Protection Request\'\n
module = portal.getDefaultModule(portal_type)\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
reference_index = portal.portal_ids.generateNewId(id_group=(\'data_protection_request\'), default=1)\n
reference = \'DPR-%s\' % (reference_index,)\n
......@@ -67,11 +64,10 @@ data_protection = module.newContent(portal_type=portal_type,\n
contributor_value=current_user,\n
follow_up_value=context,\n
description=description,\n
reference=reference,\n
title=title)\n
\n
reference=reference)\n
data_protection.submit()\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>
</item>
<item>
......@@ -82,7 +78,7 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>description, **kw</string> </value>
<value> <string>description, form_id=\'view\', **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -102,13 +98,14 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>description</string>
<string>form_id</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
......@@ -116,9 +113,6 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
<string>portal_type</string>
<string>module</string>
<string>current_user</string>
<string>None</string>
<string>getattr</string>
<string>title</string>
<string>reference_index</string>
<string>reference</string>
<string>data_protection</string>
......@@ -135,7 +129,9 @@ return data_protection.Base_redirect(\'DataProtectionRequest_view\', keep_items=
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<string>view</string>
</tuple>
</value>
</item>
<item>
......
......@@ -63,7 +63,8 @@ def filterPropertyMapList(property_map):\n
# We assume that categories, dates, and numerical values\n
# doesn\'t carry compromising data\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
property_map[\'id\'] not in restricted_property_list and \\\n
document_to_inspect.getProperty(property_map[\'id\']) and \\\n
......
......@@ -260,7 +260,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Request Protection</string> </value>
<value> <string>Description</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......
......@@ -91,7 +91,9 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
<list>
<string>listbox_follow_up_portal_type</string>
</list>
</value>
</item>
<item>
......
......@@ -14,6 +14,7 @@
<value>
<list>
<string>columns</string>
<string>editable_columns</string>
<string>portal_types</string>
<string>search_columns</string>
<string>selection_name</string>
......@@ -84,13 +85,25 @@
<value>
<list>
<tuple>
<string>title</string>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>follow_up_portal_type</string>
<string>Type</string>
</tuple>
<tuple>
<string>description</string>
<string>Request Description</string>
</tuple>
<tuple>
<string>follow_up_title</string>
<string>Follow Up</string>
</tuple>
<tuple>
<string>contributor_title</string>
<string>Requester</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
......@@ -98,6 +111,17 @@
</list>
</value>
</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>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
......@@ -133,13 +157,21 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Type</string>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>description</string>
<string>Request Description</string>
</tuple>
<tuple>
<string>follow_up_title</string>
<string>Follow Up</string>
</tuple>
<tuple>
<string>contributor_title</string>
<string>Requester</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
......@@ -156,13 +188,21 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Type</string>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>description</string>
<string>Request Description</string>
</tuple>
<tuple>
<string>follow_up_title</string>
<string>Follow Up</string>
</tuple>
<tuple>
<string>contributor_title</string>
<string>Requester</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_follow_up_portal_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>listbox_follow_up_portal_type</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</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: cell.getFollowUpValue() is not None and cell.getFollowUpValue().getTranslatedPortalType() or None</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -77,7 +77,9 @@
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
<list>
<string>my_text_content</string>
</list>
</value>
</item>
<item>
......@@ -92,7 +94,6 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>my_text_content</string>
<string>my_owner</string>
</list>
</value>
......@@ -101,9 +102,9 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_reference</string>
<string>my_follow_up_title</string>
<string>your_follow_up_portal_type</string>
</list>
</value>
</item>
......
......@@ -11,7 +11,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
<value> <string>your_follow_up_portal_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -121,7 +121,9 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -212,7 +214,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -240,7 +242,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Title</string> </value>
<value> <string>Type</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......@@ -260,4 +262,20 @@
</dictionary>
</pickle>
</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>
......@@ -536,7 +536,24 @@
<item>
<key> <string>url_columns</string> </key>
<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>
</item>
</dictionary>
......
22
\ No newline at end of file
23
\ 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