summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/wizard/default_wizard.html
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-07-07 13:08:35 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-07-07 13:12:29 +0200
commit746a7350b5c2373ebc83b6b54b3d6f53cee61c27 (patch)
treeb307e4ebe919d3cc5faffc9a175d8195b776cc8f /ishtar_common/templates/ishtar/wizard/default_wizard.html
parenta6011ef3d696f20be30d80eb04a1ba8d3308a5eb (diff)
downloadIshtar-746a7350b5c2373ebc83b6b54b3d6f53cee61c27.tar.bz2
Ishtar-746a7350b5c2373ebc83b6b54b3d6f53cee61c27.zip
💄 wizards: automatic scroll on field when navigating with TAB key
Diffstat (limited to 'ishtar_common/templates/ishtar/wizard/default_wizard.html')
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html17
1 files changed, 3 insertions, 14 deletions
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
index fcc020816..c4a304111 100644
--- a/ishtar_common/templates/ishtar/wizard/default_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -54,23 +54,12 @@ var form_changed = false;
{% block "js_extra_generic" %}
{% endblock %}
$(document).ready(function(){
- $('form :input').change(function(){form_changed=true;});
- $('.change_step').click(function(){
- if(!form_changed ||
- confirm("{% trans "The form has changed. If you don't validate it, all your changes will be lost." %}")){
- return true;
- }
- return false;
- });
+{% if not form.SEARCH_AND_SELECT %}
+ register_wizard_form();
+{% endif %}
{% if open_url %}load_window("{{open_url}}");{% endif %}
{% 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 %}</script>
{% endblock %}