equal
deleted
inserted
replaced
172 def open_form(self, form, values): |
172 def open_form(self, form, values): |
173 if form.needs_multipart: |
173 if form.needs_multipart: |
174 enctype = 'multipart/form-data' |
174 enctype = 'multipart/form-data' |
175 else: |
175 else: |
176 enctype = 'application/x-www-form-urlencoded' |
176 enctype = 'application/x-www-form-urlencoded' |
177 if form.action is None: |
|
178 action = self._cw.build_url('edit') |
|
179 else: |
|
180 action = form.action |
|
181 tag = ('<form action="%s" method="post" enctype="%s"' % ( |
177 tag = ('<form action="%s" method="post" enctype="%s"' % ( |
182 xml_escape(action or '#'), enctype)) |
178 xml_escape(form.form_action() or '#'), enctype)) |
183 if form.domid: |
179 if form.domid: |
184 tag += ' id="%s"' % form.domid |
180 tag += ' id="%s"' % form.domid |
185 if form.onsubmit: |
181 if form.onsubmit: |
186 tag += ' onsubmit="%s"' % xml_escape(form.onsubmit % dictattr(form)) |
182 tag += ' onsubmit="%s"' % xml_escape(form.onsubmit % dictattr(form)) |
187 if form.cssstyle: |
183 if form.cssstyle: |