From 5f830b6294cf76f05aeb6ee8f58c256ceb9fcd67 Mon Sep 17 00:00:00 2001
From: Thibaut Deheunynck <thibaut@nexedi.com>
Date: Thu, 19 Jun 2008 16:35:43 +0000
Subject: [PATCH] Now you can specify the property orientation in tooltipfield
 for a RadioField

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21719 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/ScribusUtils.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Form/ScribusUtils.py b/product/ERP5Form/ScribusUtils.py
index 24e87fa7c2..b774f002f5 100644
--- a/product/ERP5Form/ScribusUtils.py
+++ b/product/ERP5Form/ScribusUtils.py
@@ -1879,13 +1879,25 @@ class ScribusParser:
         # object is listbox, and listbox have several possible values
         # WARNING listbox have not been tested in graphic rendering for
         # the moment. is there any use for listbox in PDF-like rendering ?
-        if str(object_properties['type']) in ('ListBox', 'RadioField') :
+        if str(object_properties['type']) == 'ListBox':
           # checking if this listbox and the radioField has different possible values
           object_properties['items'] = \
                 sp.getObjectTooltipProperty('items',
                                             '',
                                             object_name,
                                             tooltipfield_properties_dict)
+        if str(object_properties['type']) == 'RadioField':
+          # checking if the radioField has different possible values
+          object_properties['items'] = \
+                sp.getObjectTooltipProperty('items',
+                                            '',
+                                            object_name,
+                                            tooltipfield_properties_dict)
+          object_properties['orientation'] = \
+                sp.getObjectTooltipProperty('orientation',
+                                            '',
+                                            object_name,
+                                            tooltipfield_properties_dict)
         # object is datetimefield and need several informations
         if str(object_properties['type']) == 'DateTimeField':
           # has been tested successfully
@@ -2148,6 +2160,8 @@ class ScribusParser:
       for word_item in properties_field['items'].split('|'):
         items.append((word_item, word_item.capitalize()))
       object_dict['attributes']['items'] = items
+      object_dict['attributes']['orientation'] = \
+         properties_field['orientation']
     #elif object_dict['erp_type'] == 'CheckBoxField':
       # checkboxfield needs to have their field data updated
       # this is not done automatically so it is needed to do
-- 
2.30.9