mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-14 17:08:29 +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"
|
- Update the Slack integration to not retry when Slack returns 400 "invalid_token"
|
||||||
- Improve Pushover notifications (include tags, period, last ping type etc.)
|
- Improve Pushover notifications (include tags, period, last ping type etc.)
|
||||||
- Update the Pushover integration to not retry when Pushover reports invalid user
|
- Update the Pushover integration to not retry when Pushover reports invalid user
|
||||||
|
- Implement audo-submit in TOTP entry screen (#905)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
- Fix "Ping Details" dialog to handle email bodies not yet uploaded to object storage
|
- 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 }}">
|
<div class="form-group {{ form.code.css_classes }}">
|
||||||
<input
|
<input
|
||||||
|
id="code"
|
||||||
type="text"
|
type="text"
|
||||||
name="code"
|
name="code"
|
||||||
pattern="[0-9]{6}"
|
pattern="[0-9]{6}"
|
||||||
title="6-digit code"
|
title="6-digit code"
|
||||||
placeholder="6-digit code"
|
placeholder="6-digit code"
|
||||||
|
data-auto-submit="1"
|
||||||
class="form-control input-lg"
|
class="form-control input-lg"
|
||||||
|
required
|
||||||
autofocus />
|
autofocus />
|
||||||
{% if form.code.errors %}
|
{% if form.code.errors %}
|
||||||
<div class="help-block">
|
<div class="help-block">
|
||||||
|
@ -37,4 +40,10 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</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