Commit 2a6dd346 authored by Romain Courteaud's avatar Romain Courteaud

Do not change category order anymore.

Do not display blank field when user has to fix some errors.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16764 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 55060973
No related merge requests found
......@@ -84,24 +84,24 @@ sub_field_list = []\n
default_sub_field_property_dict.update({\'required\': 0,\'field_type\': \'ListField\',\'size\': 1,\'item_list\': [(\'\', \'\')] + item_list,\'value\': None})\n
\n
z = 0\n
for i in range(1):\n
for value in value_list:\n
new_dict = default_sub_field_property_dict.copy()\n
new_dict[\'value\'] = value\n
new_dict[\'title\'] = \' \'\n
new_dict[\'key\'] = str(z)\n
z += 1\n
sub_field_list.append(new_dict)\n
\n
value_list.sort()\n
for value in value_list:\n
request = context.REQUEST\n
\n
if request.get(\'field_errors\', {}) == {}:\n
new_dict = default_sub_field_property_dict.copy()\n
new_dict[\'value\'] = value\n
new_dict[\'title\'] = \' \'\n
new_dict[\'key\'] = str(z)\n
z += 1\n
sub_field_list.append(new_dict)\n
\n
new_dict[\'title\'] = default_sub_field_property_dict[\'title\']\n
sub_field_list.reverse()\n
if len(sub_field_list):\n
sub_field_list[0][\'title\'] = default_sub_field_property_dict[\'title\']\n
return sub_field_list\n
......@@ -162,12 +162,13 @@ return sub_field_list\n
<string>None</string>
<string>z</string>
<string>_getiter_</string>
<string>range</string>
<string>i</string>
<string>value</string>
<string>new_dict</string>
<string>_write_</string>
<string>str</string>
<string>value</string>
<string>context</string>
<string>request</string>
<string>len</string>
<string>_getitem_</string>
</tuple>
</value>
......
483
\ No newline at end of file
484
\ 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