Auto-detect common typos in email addresses

This commit is contained in:
Raphael Michel
2017-05-15 11:33:18 +02:00
parent 7d9a1b5e0c
commit 5ff6d0b014
5 changed files with 97 additions and 2 deletions

View File

@@ -27,6 +27,7 @@
<script type="text/javascript" src="{% static "pretixbase/js/asynctask.js" %}"></script>
<script type="text/javascript" src="{% static "pretixbase/js/asyncdownload.js" %}"></script>
<script type="text/javascript" src="{% static "pretixpresale/js/ui/cart.js" %}"></script>
<script type="text/javascript" src="{% static "pretixpresale/js/ui/typocheck.js" %}"></script>
<script type="text/javascript" src="{% static "lightbox/js/lightbox.min.js" %}"></script>
{% endcompress %}
<meta name="referrer" content="origin">

View File

@@ -74,6 +74,12 @@
</div>
{% endfor %}
</div>
<div class="alert alert-warning typo-alert">
<strong>{% trans "Are you sure your email address is correct?" %}</strong><br>
{% blocktrans trimmed with entered="<span data-typodisplay></span>" suggestion="<span data-typosuggest></span>" %}
You entered "{{ entered }}". Did you mean "{{ suggestion }}"?
{% endblocktrans %}
</div>
<div class="row checkout-button-row">
<div class="col-md-4">
<a class="btn btn-block btn-default btn-lg"