Allow passing form instructions as a list of strings.
This commit is contained in:
parent
af9632519c
commit
63b58edda1
@ -201,7 +201,8 @@ class Form(ElementBase):
|
|||||||
del self['instructions']
|
del self['instructions']
|
||||||
if instructions in [None, '']:
|
if instructions in [None, '']:
|
||||||
return
|
return
|
||||||
instructions = instructions.split('\n')
|
if not isinstance(instructions, list):
|
||||||
|
instructions = instructions.split('\n')
|
||||||
for instruction in instructions:
|
for instruction in instructions:
|
||||||
inst = ET.Element('{%s}instructions' % self.namespace)
|
inst = ET.Element('{%s}instructions' % self.namespace)
|
||||||
inst.text = instruction
|
inst.text = instruction
|
||||||
|
Loading…
Reference in New Issue
Block a user