Commit fda444f8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

xhtml_style: fix submitFormOnEnter().

replace method_name:method parameter instead of replacing form action, otherwise method_name like listbox_setPage does not work.
parent 210060a2
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
</tr> </tr>
<tr> <tr>
<td>verifyAbsoluteLocation</td> <td>verifyAbsoluteLocation</td>
<td tal:content="string:glob:${here/portal_url}/foo_module/0/listbox_setPage" /> <td tal:content="string:glob:${here/portal_url}/foo_module/0" />
<td></td> <td></td>
</tr> </tr>
<!-- Go to previous and verify --> <!-- Go to previous and verify -->
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</tr> </tr>
<tr> <tr>
<td>verifyAbsoluteLocation</td> <td>verifyAbsoluteLocation</td>
<td tal:content="string:glob:${here/portal_url}/foo_module/0/listbox_setPage" /> <td tal:content="string:glob:${here/portal_url}/foo_module/0" />
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -150,7 +150,8 @@ function submitFormOnEnter(event, form, method_name, clear_changed_flag, element ...@@ -150,7 +150,8 @@ function submitFormOnEnter(event, form, method_name, clear_changed_flag, element
if (form == "main_form") { if (form == "main_form") {
form = document.forms[form]; // backward compatibility form = document.forms[form]; // backward compatibility
} }
form.action = method_name; $('<input />').attr('type', 'hidden').attr('name', method_name + ':method').appendTo(form);
$('#hidden_button').prop('disabled', true);
if (clear_changed_flag === true) { if (clear_changed_flag === true) {
changed = false; changed = false;
} }
...@@ -358,3 +359,4 @@ function installDoubleSubmitDialogPrevention(confirmation_message) { ...@@ -358,3 +359,4 @@ function installDoubleSubmitDialogPrevention(confirmation_message) {
}); });
}); });
} }
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