Commit a29bb541 authored by Jérome Perrin's avatar Jérome Perrin

Configurator and workflow cleanups

* Assorted small fixes so that form comply to conventions
* Minimal fixes of invalid html
* make `mixin` usable in type definition 

The context is I was working on a custom configurator involving some matrixboxs, so I needed a simple business configuration item just to store the matrix result. This was possible with mixin, I just made a portal type based on Item class, enabling mxins for `Matrix` and `BusinessConfiguratorItem` and I did not have to define a class ( not sure this is really better ).

Then the matrixbox was not rendering properly, because browser was confused by the broken html and build a "different DOM" and selectors did not apply. This is what `configurator: fix (a bit) invalid HTML` addresses.

While doing this, fix some minor problems found with forms.

/reviewed-on !814
parents e6573300 6e0cad48
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Workflow_launchConfiguration</string> </value> <value> <string>string:${object_url}/Workflow_viewLaunchConfigurationDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>my_view_mode_listbox_business_configuration</string> <string>my_list_mode_listbox_business_configuration</string>
<string>my_view_mode_creation_date</string> <string>my_view_mode_creation_date</string>
<string>my_view_mode_translated_simulation_state_title</string> <string>my_view_mode_translated_simulation_state_title</string>
<string>my_view_mode_translated_validation_state_title</string> <string>my_view_mode_translated_validation_state_title</string>
......
...@@ -10,11 +10,8 @@ ...@@ -10,11 +10,8 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>all_columns</string>
<string>columns</string> <string>columns</string>
<string>editable_columns</string>
<string>portal_types</string> <string>portal_types</string>
<string>search_columns</string>
<string>selection_name</string> <string>selection_name</string>
<string>sort</string> <string>sort</string>
<string>title</string> <string>title</string>
...@@ -23,7 +20,7 @@ ...@@ -23,7 +20,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_view_mode_listbox_business_configuration</string> </value> <value> <string>my_list_mode_listbox_business_configuration</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -79,44 +76,13 @@ ...@@ -79,44 +76,13 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>all_columns</string> </key> <key> <string>columns</string> </key>
<value> <value>
<list> <list>
<tuple> <tuple>
<string>reference</string> <string>title</string>
<string>Site ID</string> <string>Business Configuration</string>
</tuple>
<tuple>
<string>resource_title</string>
<string>Workflow</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>Validation State</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>Installation State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>comment</string>
<string>Comments</string>
</tuple>
<tuple>
<string>getCurrentStateTitle</string>
<string>Wizard State</string>
</tuple> </tuple>
</list>
</value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple> <tuple>
<string>reference</string> <string>reference</string>
<string>Reference</string> <string>Reference</string>
...@@ -140,17 +106,6 @@ ...@@ -140,17 +106,6 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>creation_date</string>
<string>creation_date</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>
...@@ -170,33 +125,6 @@ ...@@ -170,33 +125,6 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>resource_title</string>
<string>Workflow</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>Installation State</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>business_configuration_module_selection</string> </value> <value> <string>business_configuration_module_selection</string> </value>
...@@ -218,7 +146,7 @@ ...@@ -218,7 +146,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Business Configuration</string> </value> <value> <string>Business Configurations</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -12,11 +12,8 @@ ...@@ -12,11 +12,8 @@
<list> <list>
<string>columns</string> <string>columns</string>
<string>count_method</string> <string>count_method</string>
<string>lines</string>
<string>list_method</string> <string>list_method</string>
<string>portal_types</string> <string>portal_types</string>
<string>search</string>
<string>select</string>
<string>selection_name</string> <string>selection_name</string>
<string>title</string> <string>title</string>
</list> </list>
...@@ -104,16 +101,12 @@ ...@@ -104,16 +101,12 @@
</item> </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_view_mode_listbox</string> </value>
</item> </item>
<item> <item>
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value> <value> <string>Base_viewFieldLibrary</string> </value>
</item> </item>
<item>
<key> <string>lines</string> </key>
<value> <int>10</int> </value>
</item>
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
<value> <value>
...@@ -139,14 +132,6 @@ ...@@ -139,14 +132,6 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>select</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>configuration_save_selection</string> </value> <value> <string>configuration_save_selection</string> </value>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_business_configuration</string> </value> <value> <string>my_list_mode_listbox_business_configuration</string> </value>
</item> </item>
<item> <item>
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
......
...@@ -98,9 +98,6 @@ ...@@ -98,9 +98,6 @@
<value> <value>
<list> <list>
<string>my_title</string> <string>my_title</string>
<string>my_configuration_state</string>
<string>my_translated_simulation_state_title</string>
<string>my_translated_validation_state_title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -111,6 +108,9 @@ ...@@ -111,6 +108,9 @@
<string>my_resource_title</string> <string>my_resource_title</string>
<string>my_specialise_title</string> <string>my_specialise_title</string>
<string>my_comment</string> <string>my_comment</string>
<string>my_translated_simulation_state_title</string>
<string>my_translated_validation_state_title</string>
<string>my_configuration_state</string>
</list> </list>
</value> </value>
</item> </item>
......
portal = context.getPortalObject() portal = context.getPortalObject()
request = context.REQUEST request = context.REQUEST
bc = context.business_configuration_module.newContent( bc = context.business_configuration_module.newContent(
resource = context.getRelativeUrl() resource=context.getRelativeUrl(),
title=title,
) )
request.set("field_your_business_configuration", bc.getRelativeUrl()) request.set("field_your_business_configuration", bc.getRelativeUrl())
# Configurator use a cookie to know what's the "current" configuration,
# we also need to initialize this cookie (yes, this is a ugly)
request.RESPONSE.setCookie(
'business_configuration_key',
bc.getRelativeUrl(),
path=portal.portal_configurator.absolute_url_path()
)
return portal.portal_configurator.login(REQUEST=request) return portal.portal_configurator.login(REQUEST=request)
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>title</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</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>Workflow_launchConfiguration</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>multipart/form-data</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>
</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>
<string>your_title</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Workflow_viewLaunchConfigurationDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</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>Launch Configuration</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>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_title</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The title for the new business configuration that will be created.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Business Configuration</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>context/getTitle</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -65,11 +65,11 @@ ...@@ -65,11 +65,11 @@
<table width="100%" class="Border"> <table width="100%" class="Border">
<tr> <tr>
<td tal:repeat="cell row" valign="top"> <td tal:repeat="cell row" valign="top">
<table width="100%"> <div width="100%">
<tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])"> <tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])">
<tal:block metal:use-macro="here/field_render/macros/field_render"/> <tal:block metal:use-macro="here/field_render/macros/field_render"/>
</tal:block> </tal:block>
</table> </div>
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -10,13 +10,17 @@ ...@@ -10,13 +10,17 @@
<key> <string>actbox_category</string> </key> <key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value> <value> <string>workflow</string> </value>
</item> </item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Build Business Configuration</string> </value> <value> <string>Build Business Configuration</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BusinessConfiguration_viewBuildWorkflowActionDialog?workflow_action=build_action</string> </value> <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=build_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
......
...@@ -10,13 +10,17 @@ ...@@ -10,13 +10,17 @@
<key> <string>actbox_category</string> </key> <key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value> <value> <string>workflow</string> </value>
</item> </item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Install Business Configuration</string> </value> <value> <string>Install Business Configuration</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=finish_install_action</string> </value> <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=install_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>my_int_index</string>
<string>my_title</string> <string>my_title</string>
<string>my_destination_title_list</string> <string>my_destination_title_list</string>
</list> </list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_int_index</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>my_int_index</string>
<string>my_title</string> <string>my_title</string>
<string>my_destination_title</string> <string>my_destination_title</string>
<string>my_guard_expression</string> <string>my_guard_expression</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_int_index</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -259,12 +259,24 @@ ...@@ -259,12 +259,24 @@
</item> </item>
<item> <item>
<key> <string>image_format</string> </key> <key> <string>image_format</string> </key>
<value> <string>gif</string> </value> <value> <string>png</string> </value>
</item>
<item>
<key> <string>image_pre_converted_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>image_quality</string> </key>
<value> <int>75</int> </value>
</item> </item>
<item> <item>
<key> <string>image_resolution</string> </key> <key> <string>image_resolution</string> </key>
<value> <int>75</int> </value> <value> <int>75</int> </value>
</item> </item>
<item>
<key> <string>input_type</string> </key>
<value> <string>text</string> </value>
</item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
......
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
<value> <value>
<list> <list>
<string>listbox_title</string> <string>listbox_title</string>
<string>listbox_destination_title_list</string>
<string>listbox_int_index</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -10,11 +10,13 @@ ...@@ -10,11 +10,13 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>anchor</string>
<string>columns</string> <string>columns</string>
<string>default_params</string> <string>default_params</string>
<string>editable_columns</string> <string>editable_columns</string>
<string>portal_types</string> <string>portal_types</string>
<string>selection_name</string> <string>selection_name</string>
<string>sort</string>
<string>title</string> <string>title</string>
</list> </list>
</value> </value>
...@@ -76,13 +78,17 @@ ...@@ -76,13 +78,17 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>anchor</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
<value> <value>
<list> <list>
<tuple> <tuple>
<string>id</string> <string>int_index</string>
<string>ID</string> <string>Index</string>
</tuple> </tuple>
<tuple> <tuple>
<string>title</string> <string>title</string>
...@@ -90,7 +96,7 @@ ...@@ -90,7 +96,7 @@
</tuple> </tuple>
<tuple> <tuple>
<string>destination_title_list</string> <string>destination_title_list</string>
<string>Possibles Transition</string> <string>Possible Transitions</string>
</tuple> </tuple>
<tuple> <tuple>
<string>description</string> <string>description</string>
...@@ -109,6 +115,10 @@ ...@@ -109,6 +115,10 @@
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
<list> <list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple> <tuple>
<string>title</string> <string>title</string>
<string>Title</string> <string>Title</string>
...@@ -139,6 +149,17 @@ ...@@ -139,6 +149,17 @@
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>workflow_state_selection</string> </value> <value> <string>workflow_state_selection</string> </value>
</item> </item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_destination_title_list</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_lines_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Possible Transitions</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_int_index</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<value> <value>
<list> <list>
<string>listbox_title</string> <string>listbox_title</string>
<string>listbox_int_index</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -10,11 +10,13 @@ ...@@ -10,11 +10,13 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string> <string>anchor</string>
<string>columns</string> <string>columns</string>
<string>selection_name</string>
<string>portal_types</string>
<string>editable_columns</string> <string>editable_columns</string>
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -75,13 +77,17 @@ ...@@ -75,13 +77,17 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>anchor</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
<value> <value>
<list> <list>
<tuple> <tuple>
<string>id</string> <string>int_index</string>
<string>ID</string> <string>Index</string>
</tuple> </tuple>
<tuple> <tuple>
<string>title</string> <string>title</string>
...@@ -98,6 +104,10 @@ ...@@ -98,6 +104,10 @@
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
<list> <list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple> <tuple>
<string>title</string> <string>title</string>
<string>Title</string> <string>Title</string>
...@@ -128,6 +138,17 @@ ...@@ -128,6 +138,17 @@
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>workflow_transition_selection</string> </value> <value> <string>workflow_transition_selection</string> </value>
</item> </item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_int_index</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string>
<string>items</string> <string>items</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -71,6 +71,10 @@ ...@@ -71,6 +71,10 @@
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -86,6 +90,12 @@ ...@@ -86,6 +90,12 @@
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value> <value> <string>Base_viewFieldLibrary</string> </value>
</item> </item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
...@@ -102,16 +112,13 @@ ...@@ -102,16 +112,13 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: [(x.getTitleOrId(), x.getId()) for x in here.portal_categories.contentValues()]</string> </value> <value> <string>python: [(\'\', \'\')] + sorted([(x.getCompactTranslatedTitle(), x.getId()) for x in here.portal_categories.contentValues()])</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -38,6 +38,7 @@ this_module = sys.modules[ __name__ ] ...@@ -38,6 +38,7 @@ this_module = sys.modules[ __name__ ]
document_classes = updateGlobals(this_module, globals(), document_classes = updateGlobals(this_module, globals(),
permissions_module=Permissions) permissions_module=Permissions)
import mixin
from Tool import ConfiguratorTool from Tool import ConfiguratorTool
# Define object classes and tools # Define object classes and tools
......
...@@ -648,3 +648,12 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin): ...@@ -648,3 +648,12 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
self.assertEqual(pay_link.getDeliveryBuilderList(), self.assertEqual(pay_link.getDeliveryBuilderList(),
["portal_deliveries/payment_transaction_builder"]) ["portal_deliveries/payment_transaction_builder"])
def test_configurator_item_mixin(self):
"""ConfiguratorItemMixin is available for TTW definition of portal types.
"""
self.assertIn(
'ConfiguratorItemMixin',
self.portal.portal_types.newContent(
portal_type='Base Type',
temp_object=True).getMixinTypeList())
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