summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_files/templates/ishtar/wizard/wizard_person_orga.html2
-rw-r--r--changelog/en/changelog_2022-06-15.md4
-rw-r--r--changelog/fr/changelog_2023-01-25.md4
-rw-r--r--ishtar_common/templates/ishtar/wizard/confirm_wizard.html11
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html5
-rw-r--r--ishtar_common/templates/ishtar/wizard/relations_wizard.html2
-rw-r--r--ishtar_common/templates/ishtar/wizard/towns_wizard.html2
7 files changed, 26 insertions, 4 deletions
diff --git a/archaeological_files/templates/ishtar/wizard/wizard_person_orga.html b/archaeological_files/templates/ishtar/wizard/wizard_person_orga.html
index 36f1aa4f8..39b4a7762 100644
--- a/archaeological_files/templates/ishtar/wizard/wizard_person_orga.html
+++ b/archaeological_files/templates/ishtar/wizard/wizard_person_orga.html
@@ -17,7 +17,7 @@ $(function() {
update_form();
});
</script>
-<form action="." method="post" name='wizard'{% if wizard.form.file_upload %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
+<form class='wizard-form' action="." method="post" name='wizard'{% if wizard.form.file_upload %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
<div class='form'>
{% if wizard.form.media %}{{ wizard.form.media }}{% endif %}
{{ wizard.management_form }}
diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md
index 257529eb7..678dfd1d8 100644
--- a/changelog/en/changelog_2022-06-15.md
+++ b/changelog/en/changelog_2022-06-15.md
@@ -1,8 +1,12 @@
v4.0.53 - 2999-12-31
--------------------
+### Features/improvements ###
+- wizards: validate forms with CTRL+ENTER
+
### Bug fixes ###
- wizards: fix autofocus of first field
+- do not overload when no complete_id is available
v4.0.52 - 2023-07-06
--------------------
diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md
index 80aeb3df0..3bf424d58 100644
--- a/changelog/fr/changelog_2023-01-25.md
+++ b/changelog/fr/changelog_2023-01-25.md
@@ -1,8 +1,12 @@
v4.0.53 - 2999-12-31
--------------------
+### Fonctionnalités/améliorations ###
+- `wizards` : validation des formulaires avec CTRL+ENTER
+
### Corrections de dysfonctionnements ###
- correction de l'autofocus du premier champ
+- ne pas surcharger les identifiants complets quand ils sont vides
v4.0.52 - 2023-07-06
--------------------
diff --git a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
index e4fd739f6..1f0d0e4d9 100644
--- a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
@@ -5,7 +5,7 @@
{% include "ishtar/blocks/wizard_breadcrumb.html" %}
-<form action="." method="post">{% csrf_token %}
+<form class='wizard-form' action="." method="post">{% csrf_token %}
<div class='form container'>
{% block "warning_informations" %}{% endblock %}
{% block "warning_message" %}
@@ -62,4 +62,13 @@
</div>
</form>
+<script type="text/javascript">{% localize off %}
+$(document).ready(function(){
+ $(document).keydown(function(e){
+ if (e.ctrlKey && e.keyCode == 13) {
+ $("#submit_form").click();
+ }
+ });
+});
+{% endlocalize %}</script>
{% endblock %}
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 %}</script>
{% endblock %}
diff --git a/ishtar_common/templates/ishtar/wizard/relations_wizard.html b/ishtar_common/templates/ishtar/wizard/relations_wizard.html
index c22b58f3d..df61502e2 100644
--- a/ishtar_common/templates/ishtar/wizard/relations_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/relations_wizard.html
@@ -4,7 +4,7 @@
{{wizard.form.media}}
{% endblock %}
{% block wizard_form %}
-<form action="." method="post">{% csrf_token %}
+<form action="." class="wizard-form" method="post">{% csrf_token %}
<div class='form container'>
{{ wizard.form.media }}
{{ wizard.management_form }}
diff --git a/ishtar_common/templates/ishtar/wizard/towns_wizard.html b/ishtar_common/templates/ishtar/wizard/towns_wizard.html
index 889108f32..022fcdb4f 100644
--- a/ishtar_common/templates/ishtar/wizard/towns_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/towns_wizard.html
@@ -5,7 +5,7 @@
{{wizard.form.media}}
{% endblock %}
{% block wizard_form %}
-<form action="." method="post">{% csrf_token %}
+<form class='wizard-form' action="." method="post">{% csrf_token %}
<div class='form'>
{% if TOWNS %}
{% if wizard.form.forms %}