mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-07 14:15:34 +00:00
Implement audo-submit in TOTP entry screen. Fixes #905
This commit is contained in:
parent
336e71e52f
commit
ee62dc174c
3 changed files with 18 additions and 1 deletions
|
@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Update the Slack integration to not retry when Slack returns 400 "invalid_token"
|
||||
- Improve Pushover notifications (include tags, period, last ping type etc.)
|
||||
- Update the Pushover integration to not retry when Pushover reports invalid user
|
||||
- Implement audo-submit in TOTP entry screen (#905)
|
||||
|
||||
### Bug Fixes
|
||||
- Fix "Ping Details" dialog to handle email bodies not yet uploaded to object storage
|
||||
|
|
7
static/js/auto-submit.js
Normal file
7
static/js/auto-submit.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
$(function() {
|
||||
$("input[data-auto-submit]").on("keyup input", function() {
|
||||
if (this.validity.valid) {
|
||||
this.form.submit();
|
||||
}
|
||||
});
|
||||
})
|
|
@ -14,12 +14,15 @@
|
|||
|
||||
<div class="form-group {{ form.code.css_classes }}">
|
||||
<input
|
||||
id="code"
|
||||
type="text"
|
||||
name="code"
|
||||
pattern="[0-9]{6}"
|
||||
title="6-digit code"
|
||||
placeholder="6-digit code"
|
||||
data-auto-submit="1"
|
||||
class="form-control input-lg"
|
||||
required
|
||||
autofocus />
|
||||
{% if form.code.errors %}
|
||||
<div class="help-block">
|
||||
|
@ -37,4 +40,10 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{% compress js %}
|
||||
<script src="{% static 'js/auto-submit.js' %}"></script>
|
||||
{% endcompress %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Reference in a new issue