From ab8e92b36463e2592469cdd137b09ce43c75c33f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 6 Jul 2023 16:00:30 +0200 Subject: đŸ’„ wizards: validate forms with CTRL+ENTER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/templates/ishtar/wizard/default_wizard.html | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ishtar_common/templates/ishtar/wizard/default_wizard.html') diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html index 405c52965..fcc020816 100644 --- a/ishtar_common/templates/ishtar/wizard/default_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html @@ -66,6 +66,11 @@ $(document).ready(function(){ {% block "js_extra_ready" %} {% endblock %} if ($("[autofocus]").length > 0) autofocus_field = "#" + $($("[autofocus]")[0]).attr('id'); + $(".wizard-form").keydown(function(e){ + if (e.ctrlKey && e.keyCode == 13) { + $("#submit_form").click(); + } + }); }); {% endlocalize %} {% endblock %} -- cgit v1.2.3