Commit bcec9541 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 291769cd
......@@ -530,6 +530,15 @@ class MultiRelationStringFieldValidator(Validator.LinesValidator):
editor = MultiRelationEditor
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):
"""
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