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 @@
<td>"Update" action is done with "A value from the user".</td>
<td></td>
</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>
<td>clickAndWait</td>
<td>Base_callDialogMethod:method</td>
......@@ -87,4 +97,4 @@
<td></td>
</tr>
</body>
</html>
</html>
\ No newline at end of file
"""Call the Foo_viewDummyDialog"""
kw.update(context.REQUEST.form)
return context.ERP5Site_redirect("%s/Foo_viewDummyDialog" % context.absolute_url(),
keep_items={'portal_status_message': '"Update" action is done with "%s".' % string_field}, **kw)
return context.Base_renderForm(
'Foo_viewDummyDialog',
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 @@
<value>
<list>
<string>your_string_field</string>
<string>your_inspect_request</string>
</list>
</value>
</item>
......
......@@ -22,5 +22,6 @@ if REQUEST is None:
for key, value in keep_items.items():
REQUEST.set(key, value)
REQUEST.form[key] = value
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