Commit b865ec55 authored by Sebastien Robin's avatar Sebastien Robin

2009-11-23 Seb

* Add missing extension

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30803 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7f69f42f
### External Method
from Products.Formulator.MethodField import Method
#
# This function is useful to check if two fields is equal or not.
#
def get_field_data(field):
value_dict = {}
tales_dict = {}
if field.meta_type=='ProxyField':
template_field = field.getRecursiveTemplateField()
for ui_field_id in template_field.form.fields.keys():
value = field.get_recursive_orig_value(ui_field_id)
if isinstance(value, Method):
value = value.method_name
tales = field.get_recursive_tales(ui_field_id)
if tales:
tales_text = tales._text
else:
tales_text = ''
value_dict[ui_field_id] = value
tales_dict[ui_field_id] = tales_text
else:
for ui_field_id in field.form.fields.keys():
value = field.get_orig_value(ui_field_id)
if isinstance(value, Method):
value = value.method_name
tales = field.get_tales(ui_field_id)
if tales:
tales_text = tales._text
else:
tales_text = ''
value_dict[ui_field_id] = value
tales_dict[ui_field_id] = tales_text
return value_dict, tales_dict
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</item> </item>
<item> <item>
<key> <string>_module</string> </key> <key> <string>_module</string> </key>
<value> <string>proxy_field_util</string> </value> <value> <string>ProxyFieldUtils</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
542 538
\ No newline at end of file \ No newline at end of file
Glossary Glossary
PythonScriptParserUtility PythonScriptParserUtility
Security Security
SecurityCloner SecurityCloner
\ No newline at end of file ProxyFieldUtils
\ 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