Commit a0404c0a authored by Jérome Perrin's avatar Jérome Perrin

ERP5Form: set whitespace preserve by default on (multi) relation fields

This will apply to newly created relation fields.
parent 75b5c827
...@@ -527,6 +527,15 @@ class MultiRelationStringFieldValidator(Validator.LinesValidator): ...@@ -527,6 +527,15 @@ class MultiRelationStringFieldValidator(Validator.LinesValidator):
editor = MultiRelationEditor editor = MultiRelationEditor
default_validator_instance = Validator.LinesValidatorInstance default_validator_instance = Validator.LinesValidatorInstance
# For relation fields, we want to preserve whitespaces by default
# so that we can search for " things "
whitespace_preserve = fields.CheckBoxField('whitespace_preserve',
title="Preserve whitespace",
description=(
"Checked if the field preserves whitespace. This means even "
"just whitespace input is considered to be data."),
default=1)
def _generateItemUidList(self, field, key, relation_uid_list, REQUEST=None): def _generateItemUidList(self, field, key, relation_uid_list, REQUEST=None):
""" """
Generate tuple... Generate tuple...
......
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