Commit ec8784f6 authored by Fabien Morin's avatar Fabien Morin

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.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20406 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9861ce84
...@@ -1664,7 +1664,7 @@ class ScribusParser: ...@@ -1664,7 +1664,7 @@ class ScribusParser:
anflag_properties['multiline'] = 0 anflag_properties['multiline'] = 0
anflag_properties['noExport'] = 0 anflag_properties['noExport'] = 0
anflag_properties['required'] = 0 anflag_properties['required'] = 0
anflag_properties['readOnly'] = 0 anflag_properties['editable'] = 1
# analysing result # analysing result
LOG('ScribusParser', INFO, ' => ANFLAG = ' + str(temp_ANFLAG)) LOG('ScribusParser', INFO, ' => ANFLAG = ' + str(temp_ANFLAG))
# These tests uses some special variables # These tests uses some special variables
...@@ -1701,7 +1701,7 @@ class ScribusParser: ...@@ -1701,7 +1701,7 @@ class ScribusParser:
anflag_properties['required'] = 1 anflag_properties['required'] = 1
if temp_ANFLAG == long(def_readOnly): if temp_ANFLAG == long(def_readOnly):
# 'read only" field # 'read only" field
anflag_properties['readOnly'] = 1 anflag_properties['editable'] = 0
# getting maximum number of caracters the field can hold # getting maximum number of caracters the field can hold
# note : only used for textfields ('StringField', 'IntegerField', # note : only used for textfields ('StringField', 'IntegerField',
...@@ -1807,6 +1807,12 @@ class ScribusParser: ...@@ -1807,6 +1807,12 @@ class ScribusParser:
object_name, object_name,
tooltipfield_properties_dict) tooltipfield_properties_dict)
object_properties['editable'] = \
sp.getObjectTooltipProperty('editable',
anflag_properties['editable'],
object_name,
tooltipfield_properties_dict)
# getting type properties for special types # getting type properties for special types
object_properties['rendering'] = 'single' object_properties['rendering'] = 'single'
# Stringfields handle properties # Stringfields handle properties
...@@ -2034,6 +2040,9 @@ class ScribusParser: ...@@ -2034,6 +2040,9 @@ class ScribusParser:
# required attribute specify if the user has to fill this field # required attribute specify if the user has to fill this field
object_dict['attributes']['required'] =\ object_dict['attributes']['required'] =\
properties_field['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 # max number of caracters that can be entered in a field
# only used with String fieds (including Integer and Float fields) # only used with String fieds (including Integer and Float fields)
if 'maximum_input' in properties_field.keys(): if 'maximum_input' in properties_field.keys():
......
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