1.1 --- a/macros/FormField.py Sun Dec 02 00:40:22 2012 +0100
1.2 +++ b/macros/FormField.py Sun Dec 02 00:54:15 2012 +0100
1.3 @@ -8,7 +8,7 @@
1.4
1.5 from MoinMoin import wikiutil
1.6 from MoinSupport import *
1.7 -from MoinForms import parseMacroArguments
1.8 +from MoinForms import getFieldArguments, parseMacroArguments
1.9
1.10 Dependencies = ['pages']
1.11
1.12 @@ -97,21 +97,7 @@
1.13 except KeyError:
1.14 return showError(_("No entry for %s in %s.") % (name, dictpage), request)
1.15
1.16 - field_args = {}
1.17 -
1.18 - for field_arg in field_definition.split():
1.19 -
1.20 - # Record the key-value details.
1.21 -
1.22 - try:
1.23 - argname, argvalue = field_arg.split("=", 1)
1.24 - field_args[argname] = argvalue
1.25 -
1.26 - # Single keywords are interpreted as type descriptions.
1.27 -
1.28 - except ValueError:
1.29 - if not field_args.has_key("type"):
1.30 - field_args["type"] = field_arg
1.31 + field_args = getFieldArguments(field_definition)
1.32
1.33 # The field name is a combination of the path and the name.
1.34