[Erp5-report] r20406 - /erp5/trunk/products/ERP5Form/ScribusUtils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 10 11:29:14 CEST 2008
Author: fabien
Date: Thu Apr 10 11:29:13 2008
New Revision: 20406
URL: http://svn.erp5.org?rev=20406&view=rev
Log:
this patch make editable property working. Now, it's possible to check the box
"readOnly" in the scribus property field and have an ERP5 field with
editable checkbox unchecked. But CSS is not adapted yet, so the field will not
appear on the web page (but it's present). I'm working to have something
visible.
Modified:
erp5/trunk/products/ERP5Form/ScribusUtils.py
Modified: erp5/trunk/products/ERP5Form/ScribusUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ScribusUtils.py?rev=20406&r1=20405&r2=20406&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ScribusUtils.py (original)
+++ erp5/trunk/products/ERP5Form/ScribusUtils.py Thu Apr 10 11:29:13 2008
@@ -1664,7 +1664,7 @@
anflag_properties['multiline'] = 0
anflag_properties['noExport'] = 0
anflag_properties['required'] = 0
- anflag_properties['readOnly'] = 0
+ anflag_properties['editable'] = 1
# analysing result
LOG('ScribusParser', INFO, ' => ANFLAG = ' + str(temp_ANFLAG))
# These tests uses some special variables
@@ -1701,7 +1701,7 @@
anflag_properties['required'] = 1
if temp_ANFLAG == long(def_readOnly):
# 'read only" field
- anflag_properties['readOnly'] = 1
+ anflag_properties['editable'] = 0
# getting maximum number of caracters the field can hold
# note : only used for textfields ('StringField', 'IntegerField',
@@ -1807,6 +1807,12 @@
object_name,
tooltipfield_properties_dict)
+ object_properties['editable'] = \
+ sp.getObjectTooltipProperty('editable',
+ anflag_properties['editable'],
+ object_name,
+ tooltipfield_properties_dict)
+
# getting type properties for special types
object_properties['rendering'] = 'single'
# Stringfields handle properties
@@ -2034,6 +2040,9 @@
# required attribute specify if the user has to fill this field
object_dict['attributes']['required'] =\
properties_field['required']
+ # editable attribute specify if the user can fill this field or not
+ object_dict['attributes']['editable'] =\
+ properties_field['editable']
# max number of caracters that can be entered in a field
# only used with String fieds (including Integer and Float fields)
if 'maximum_input' in properties_field.keys():
More information about the Erp5-report
mailing list