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

pdm: use disable_node on quantity_unit category

So that user can see the hierarchy (especially when categories are configured
as indented items) but not select nodes
parent 6c257c49
......@@ -10,8 +10,8 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
......@@ -71,6 +71,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>
......@@ -86,6 +90,12 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -108,7 +118,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\', filter_node=1)</string> </value>
<value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\', disable_node=True)</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>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>resource_quantity_unit</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Test setting quantity unit</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test setting quantity unit
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=draft&delivery_type=Internal">
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tr>
<td>assertSelected</td>
<td>//select[@name="subfield_field_my_quantity_unit_list_default:list"]</td>
<td>label=Unit/Piece</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="subfield_field_my_quantity_unit_list_default:list"]/option[@disabled and text()="Mass"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>xpath=(//select[@name="subfield_field_my_quantity_unit_list_default:list"])[2]/option[@disabled and text()="Mass"]</td>
<td></td>
</tr>
<tr>
<td>assertSelected</td>
<td>xpath=(//select[@name="subfield_field_my_quantity_unit_list_default:list"])[2]</td>
<td>label=</td>
</tr>
<tr>
<td>select</td>
<td>xpath=(//select[@name="subfield_field_my_quantity_unit_list_default:list"])[2]</td>
<td>label=Mass/Ton</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Base_edit:method</td>
<td></td>
</tr>
<tr>
<td>assertSelected</td>
<td>//select[@name="subfield_field_my_quantity_unit_list_default:list"]</td>
<td>label=Unit/Piece</td>
</tr>
<tr>
<td>assertSelected</td>
<td>xpath=(//select[@name="subfield_field_my_quantity_unit_list_default:list"])[2]</td>
<td>label=Mass/Ton</td>
</tr>
<tr>
<td>assertSelected</td>
<td>xpath=(//select[@name="subfield_field_my_quantity_unit_list_default:list"])[3]</td>
<td>label=</td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/Zuite_waitForActivities</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ 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