Commit 11b54990 authored by Jérome Perrin's avatar Jérome Perrin

Pressing enter key in a dialog triggers update action if the dialog has an...

Pressing enter key in a dialog triggers update action if the dialog has an update action. Otherwise, it will still trigger the default action.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18040 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fe10393a
......@@ -55,7 +55,7 @@
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<tal:block metal:define-macro="master">\n
<tal:block tal:define="form_action string:Base_callDialogMethod;\n
<tal:block tal:define="form_action python: form.update_action or \'Base_callDialogMethod\';\n
dialog_id form/id | template/id;\n
form_id request/form_id | string:view;\n
dialog_method form/action | dialog_id;\n
......@@ -78,10 +78,9 @@
tal:condition="python: form.update_action!=\'\'"\n
id="dialog_update_button"\n
name="Base_showUpdateDialog:method" type="submit" />\n
<input tal:attributes="value python: here.Base_getFormViewDialogActionButtonTitle(form);\n
name string:${form_action}:method"\n
<input tal:attributes="value python: here.Base_getFormViewDialogActionButtonTitle(form);"\n
i18n:attributes="value" i18n:domain="ui" accesskey="V"\n
id="dialog_submit_button" type="submit" />\n
id="dialog_submit_button" type="submit" name="Base_callDialogMethod:method" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
......
455
\ No newline at end of file
456
\ No newline at end of file
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