1.1 --- a/MoinForms.py Fri Dec 07 01:05:58 2012 +0100
1.2 +++ b/MoinForms.py Sun Dec 09 23:36:33 2012 +0100
1.3 @@ -641,15 +641,18 @@
1.4
1.5 queryparams = []
1.6
1.7 - for argname in ["fragment", "action"]:
1.8 + for argname, default in [("fragment", None), ("action", "MoinFormHandlerAction")]:
1.9 if attrs and attrs.has_key(argname):
1.10 queryparams.append("%s=%s" % (argname, attrs[argname]))
1.11 + elif default:
1.12 + queryparams.append("%s=%s" % (argname, default))
1.13
1.14 querystr = "&".join(queryparams)
1.15
1.16 - write(fmt.rawHTML('<form method="post" action="%s">' %
1.17 - escattr(page.url(request, querystr))
1.18 - ))
1.19 + write(fmt.rawHTML('<form method="post" action="%s"%s>' % (
1.20 + escattr(page.url(request, querystr)),
1.21 + attrs.has_key("fragment") and (' id="%s"' % attrs["fragment"]) or ""
1.22 + )))
1.23
1.24 # Obtain page text for the form, incorporating subregions and applicable
1.25 # sections.