Commit eaafdb46 authored by Jérome Perrin's avatar Jérome Perrin

xhtml_style: fill request.form during Base_renderForm

Base_renderForm was using request.set - which only sets in request.other,
and this causes Base_renderForm to behaves differently from Base_redirect
with forms looking explicitly in request.form, like for example listbox
does before calling the list method.
parent 9cabec51
Pipeline #38765 passed with stage
in 0 seconds
...@@ -50,6 +50,16 @@ ...@@ -50,6 +50,16 @@
<td>"Update" action is done with "A value from the user".</td> <td>"Update" action is done with "A value from the user".</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertValue</td>
<td>//input[@name="field_your_string_field"]</td>
<td>A value from the user</td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>A value pushed by update action</td>
<td></td>
</tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>Base_callDialogMethod:method</td> <td>Base_callDialogMethod:method</td>
......
"""Call the Foo_viewDummyDialog""" """Call the Foo_viewDummyDialog"""
kw.update(context.REQUEST.form) return context.Base_renderForm(
return context.ERP5Site_redirect("%s/Foo_viewDummyDialog" % context.absolute_url(), 'Foo_viewDummyDialog',
keep_items={'portal_status_message': '"Update" action is done with "%s".' % string_field}, **kw) message='"Update" action is done with "%s".' % string_field,
keep_items={
'key_posted_during_on_update': 'A value pushed by update action'
}
)
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<value> <value>
<list> <list>
<string>your_string_field</string> <string>your_string_field</string>
<string>your_inspect_request</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -22,5 +22,6 @@ if REQUEST is None: ...@@ -22,5 +22,6 @@ if REQUEST is None:
for key, value in keep_items.items(): for key, value in keep_items.items():
REQUEST.set(key, value) REQUEST.set(key, value)
REQUEST.form[key] = value
return getattr(context, form_id)() return getattr(context, form_id)()
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